From 2d3a253f4dd2daf1d2304fb8ed1a5f29f106e629 Mon Sep 17 00:00:00 2001 From: danshihao Date: Tue, 12 Dec 2023 15:42:24 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=80=89=E6=8B=A9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/selection/UserSelection.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/selection/UserSelection.vue b/src/components/selection/UserSelection.vue index 684eca29..5be3b536 100644 --- a/src/components/selection/UserSelection.vue +++ b/src/components/selection/UserSelection.vue @@ -6,7 +6,11 @@ :autoSize="true" :rows="1" readOnly - class="user-input" + :disabled="disabled" + :class="{ + 'input-readonly': !disabled, + 'user-input': showBtn + }" :placeholder="placeholder" :value="checkedValue" @click="selectClick" @@ -85,6 +89,10 @@ export default { methods: { selectClick () { console.log('点击了') + // 禁用后不弹框 + if (this.disabled) { + return + } this.$refs.selectModal.open(this.value) }, selectChange (ids) { @@ -119,7 +127,7 @@ export default { } // 因为需要加title,所以不能把鼠标事件去掉 - /deep/ .ant-input-disabled { + /deep/ .input-readonly.ant-input-disabled { background: #fff; color: rgba(0, 0, 0, 0.65); cursor: default;