From ee1911f25cb1dd2d34460f160991bf5d68f7bceb Mon Sep 17 00:00:00 2001 From: yaojn Date: Mon, 27 May 2024 11:13:30 +0800 Subject: [PATCH] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=20=E5=A4=84=E7=90=86?= =?UTF-8?q?=E7=A6=81=E7=94=A8(=E5=8F=AA=E8=AF=BB)=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=80=BC=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/plugins/TsForm/TsFormSelect.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/plugins/TsForm/TsFormSelect.vue b/src/resources/plugins/TsForm/TsFormSelect.vue index 4e49961e..ad05d31d 100755 --- a/src/resources/plugins/TsForm/TsFormSelect.vue +++ b/src/resources/plugins/TsForm/TsFormSelect.vue @@ -648,7 +648,7 @@ export default { }, setDefaultValue() { //默认选中第一个的判断 ,1、defaultValueIsFirst 2、必填且nodeList长度为1 - if (this.readonly || this.disabled || this.nodeList.length <= 0) { + if ((this.readonly || this.disabled) && this.nodeList.length <= 0) { // 处理禁用(只读)状态下,默认值不生效的问题 return; } if ((this.$utils.isEmpty(this.currentValue) && this.defaultValueIsFirst) || (this.firstSelect && this.$utils.isEmpty(this.currentValue) && this.isRequired && this.nodeList.length == 1 && !this.nodeList[0]._disabled)) { -- Gitee