From 7b290dc643e694a4b4424dfd6dd1d849ee98754c Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 26 Jan 2022 13:26:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8B=E6=8B=89=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/widget/DeWidget/DeSelectGrid.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue index 17c719eb5c..2fa8a45e49 100644 --- a/frontend/src/components/widget/DeWidget/DeSelectGrid.vue +++ b/frontend/src/components/widget/DeWidget/DeSelectGrid.vue @@ -127,14 +127,20 @@ export default { }, 'element.options.attrs.multiple': function(value, old) { if (typeof old === 'undefined' || value === old) return - // if (!this.inDraw) { - this.value = value ? [] : null - this.element.options.value = '' - // } + if (!this.inDraw) { + this.value = value ? [] : null + this.element.options.value = '' + } else { + this.value = this.fillValueDerfault() + } this.show = false this.$nextTick(() => { this.show = true + if (value) { + this.checkAll = this.value.length === this.datas.length + this.isIndeterminate = this.value.length > 0 && this.value.length < this.datas.length + } }) } },