From 5dd3f2d321e4b7f54264d94f1f8c311d46c44ab3 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 29 Dec 2023 14:35:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E6=9C=AC=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=99=A8=E5=85=B3=E9=97=AD=E9=A6=96=E9=A1=B9?= =?UTF-8?q?=E5=90=8E=E5=86=8D=E5=BC=80=E5=90=AF=E9=BB=98=E8=AE=A4=E5=80=BC?= =?UTF-8?q?=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/widget/deWidget/DeSelect.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/frontend/src/components/widget/deWidget/DeSelect.vue b/core/frontend/src/components/widget/deWidget/DeSelect.vue index a4795c5a66..94f7eabab2 100644 --- a/core/frontend/src/components/widget/deWidget/DeSelect.vue +++ b/core/frontend/src/components/widget/deWidget/DeSelect.vue @@ -164,8 +164,10 @@ export default { 'defaultValueStr': function(value, old) { if (value === old) return this.$nextTick(() => { - this.value = this.fillValueDerfault() - this.changeValue(value) + if (!this.selectFirst) { + this.value = this.fillValueDerfault() + this.changeValue(value) + } }) }, 'element.options.attrs.fieldId': function(value, old) { @@ -363,8 +365,8 @@ export default { const id = ele.id const eleVal = ele.options.value.toString() if (this.inDraw && this.manualModify && this.element.id === id) { - if (this.selectFirst) { - this.fillFirstValue() + if (ele.options.attrs.selectFirst) { + this.fillFirstValue(true) this.firstChange(this.value) return } @@ -503,8 +505,8 @@ export default { } return this.value.split(',') }, - fillFirstValue() { - if (!this.selectFirst) { + fillFirstValue(isSelectFirst) { + if (!this.selectFirst && !isSelectFirst) { return } let defaultV = this.data[0].id