From be7e50139061c7e36ea16f66162138d1cbf2e3bc Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 29 Aug 2022 10:26:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF-=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E6=8C=89=E9=92=AE):=20=E8=BF=87=E6=BB=A4=E5=99=A8?= =?UTF-8?q?=E5=85=A8=E9=80=89=E5=90=8E=E6=B8=85=E7=A9=BA=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E9=87=8D=E7=BD=AE=E5=85=A8=E9=80=89=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ElTreeSelect/index.vue | 3 +++ frontend/src/components/ElVisualSelect/index.vue | 3 +++ frontend/src/components/widget/DeWidget/DeSelect.vue | 3 ++- frontend/src/components/widget/DeWidget/DeSelectGrid.vue | 2 +- frontend/src/components/widget/DeWidget/DeSelectTree.vue | 3 ++- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/ElTreeSelect/index.vue b/frontend/src/components/ElTreeSelect/index.vue index 7eeb7bd775..b94e91d902 100644 --- a/frontend/src/components/ElTreeSelect/index.vue +++ b/frontend/src/components/ElTreeSelect/index.vue @@ -229,6 +229,9 @@ export default { off(document, 'mouseup', this._popoverHideFun) }, methods: { + resetSelectAll() { + this.selectAll = false + }, selectAllChane(val) { if (val) { this.ids = this._checkSum() diff --git a/frontend/src/components/ElVisualSelect/index.vue b/frontend/src/components/ElVisualSelect/index.vue index 4308dd42cf..4519b8f42c 100644 --- a/frontend/src/components/ElVisualSelect/index.vue +++ b/frontend/src/components/ElVisualSelect/index.vue @@ -114,6 +114,9 @@ export default { }) }, methods: { + resetSelectAll() { + this.selectAll = false + }, setSelect(id) { if (Array.isArray(this.selectValue)) { return this.selectValue.map(ele => ele.id).includes(id) && 'selected' diff --git a/frontend/src/components/widget/DeWidget/DeSelect.vue b/frontend/src/components/widget/DeWidget/DeSelect.vue index 9c1ef73a6e..8fb364e606 100644 --- a/frontend/src/components/widget/DeWidget/DeSelect.vue +++ b/frontend/src/components/widget/DeWidget/DeSelect.vue @@ -213,7 +213,8 @@ export default { }, methods: { clearHandler() { - this.value = null + this.value = this.element.options.attrs.multiple ? [] : null + this.$refs.deSelect && this.$refs.deSelect.resetSelectAll && this.$refs.deSelect.resetSelectAll() }, filterMethod(key) { this.keyWord = key diff --git a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue index 4ea1abdc6a..a6c976adf3 100644 --- a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue +++ b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue @@ -213,7 +213,7 @@ export default { }, methods: { clearHandler() { - this.value = null + this.value = this.element.options.attrs.multiple ? [] : null }, resetDefaultValue(id) { if (this.inDraw && this.manualModify && this.element.id === id) { diff --git a/frontend/src/components/widget/DeWidget/DeSelectTree.vue b/frontend/src/components/widget/DeWidget/DeSelectTree.vue index fd815eb905..72e4286b82 100644 --- a/frontend/src/components/widget/DeWidget/DeSelectTree.vue +++ b/frontend/src/components/widget/DeWidget/DeSelectTree.vue @@ -223,7 +223,8 @@ export default { methods: { clearHandler() { - this.value = null + this.value = this.element.options.attrs.multiple ? [] : null + this.$refs.deSelectTree && this.$refs.deSelectTree.resetSelectAll && this.$refs.deSelectTree.resetSelectAll() }, resetDefaultValue(id) { if (this.inDraw && this.manualModify && this.element.id === id) {