mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 11:24:17 +00:00
fix: 优化UpdateToken组件:创建时直接显示输入框和防止浏览器自动填充密码
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button v-show="!isShow" type="text" icon="el-icon-edit" @click="isShow=true">{{ text }}</el-button>
|
||||
<el-input v-show="isShow" v-model="curValue" :type="type" :placeholder="placeholder" show-password @change="onChange" />
|
||||
<el-button v-show="!isShow" type="text" icon="el-icon-edit" @click="isShow=true">
|
||||
{{ text }}
|
||||
</el-button>
|
||||
<el-input
|
||||
v-show="isShow"
|
||||
v-model.trim="curValue"
|
||||
show-password
|
||||
:type="type"
|
||||
autocomplete="new-password"
|
||||
:placeholder="placeholder"
|
||||
@change="onChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -33,6 +43,11 @@ export default {
|
||||
curValue: this.value
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$route.path.indexOf('/create') !== -1) {
|
||||
this.isShow = true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChange(e) {
|
||||
this.$emit('input', this.curValue)
|
||||
|
||||
Reference in New Issue
Block a user