update 选择用户组件调整

This commit is contained in:
danshihao
2023-12-12 15:42:24 +08:00
parent 481353001b
commit 2d3a253f4d
+10 -2
View File
@@ -6,7 +6,11 @@
:autoSize="true" :autoSize="true"
:rows="1" :rows="1"
readOnly readOnly
class="user-input" :disabled="disabled"
:class="{
'input-readonly': !disabled,
'user-input': showBtn
}"
:placeholder="placeholder" :placeholder="placeholder"
:value="checkedValue" :value="checkedValue"
@click="selectClick" @click="selectClick"
@@ -85,6 +89,10 @@ export default {
methods: { methods: {
selectClick () { selectClick () {
console.log('点击了') console.log('点击了')
// 禁用后不弹框
if (this.disabled) {
return
}
this.$refs.selectModal.open(this.value) this.$refs.selectModal.open(this.value)
}, },
selectChange (ids) { selectChange (ids) {
@@ -119,7 +127,7 @@ export default {
} }
// 因为需要加title,所以不能把鼠标事件去掉 // 因为需要加title,所以不能把鼠标事件去掉
/deep/ .ant-input-disabled { /deep/ .input-readonly.ant-input-disabled {
background: #fff; background: #fff;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
cursor: default; cursor: default;