feat: 封装密码输入框组件 (#1149)

* feat: 封装密码输入框组件

* feat: 批量替换密码输入框组件

* perf: 修改样式

* feat: 批量替换密码输入框组件

Co-authored-by: “怀磊” <2280131253@qq.com>
Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
fit2bot
2021-11-02 18:51:58 +08:00
committed by GitHub
parent b68616501c
commit e1c6d0a686
13 changed files with 100 additions and 3 deletions

View File

@@ -0,0 +1,45 @@
<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" />
</div>
</template>
<script>
export default {
props: {
value: {
type: String,
default: () => ''
},
type: {
type: String,
default: () => 'input'
},
text: {
type: String,
default() {
return this.$t('common.Update')
}
},
placeholder: {
type: String,
default: () => ''
}
},
data() {
return {
isShow: false,
curValue: this.value
}
},
methods: {
onChange(e) {
this.$emit('input', this.curValue)
}
}
}
</script>
<style scoped>
</style>

View File

@@ -7,6 +7,7 @@ import UploadField from './UploadField'
import UploadKey from './UploadKey'
import UserPassword from './UserPassword'
import WeekCronSelect from './WeekCronSelect'
import UpdateToken from './UpdateToken'
export default {
DatetimeRangePicker,
@@ -17,7 +18,8 @@ export default {
UploadKey,
UploadField,
UserPassword,
WeekCronSelect
WeekCronSelect,
UpdateToken
}
export {
@@ -29,5 +31,6 @@ export {
UploadKey,
UploadField,
UserPassword,
WeekCronSelect
WeekCronSelect,
UpdateToken
}