From c31d2ac629e18fea310541e1304613a155c90042 Mon Sep 17 00:00:00 2001 From: yaojn Date: Fri, 19 Sep 2025 10:22:35 +0800 Subject: [PATCH] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E5=8D=95=E9=80=89?= =?UTF-8?q?=E6=A1=86=E8=81=94=E5=8A=A8bug=20=20=20=20-=20[=E5=85=B3?= =?UTF-8?q?=E8=81=94]#[1512390636568576]=E5=8D=95=E9=80=89=E6=A1=86?= =?UTF-8?q?=E8=81=94=E5=8A=A8bug=20http://192.168.0.96:8090/demo/rdm.html#?= =?UTF-8?q?/bug-detail/939050947543040/939050947543057/1512390636568576?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/plugins/TsForm/TsFormRadio.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/resources/plugins/TsForm/TsFormRadio.vue b/src/resources/plugins/TsForm/TsFormRadio.vue index d8f807c2..6f08edd2 100755 --- a/src/resources/plugins/TsForm/TsFormRadio.vue +++ b/src/resources/plugins/TsForm/TsFormRadio.vue @@ -212,8 +212,7 @@ export default { onChangeValue() { let isSame = this.$utils.isSame(this.value, this.currentValue); // 使用isSame比较两个字符串是否一致,避免 '' == 0 为true情况,导致没有emit on-change方法,form表单获取不到值问题 let value = this.currentValue; - //20210129_zqp_新增支持on-change方法第二个参数获取选中的选项的完整数据 - let selectedItem = []; + let selectedItem = null; if (this.nodeList && this.nodeList.length && value) { selectedItem = this.nodeList.find(n => { return n[this.valueName] === value; @@ -236,7 +235,7 @@ export default { } else { this.validMesage = ''; } - this.setSelectList(selectedItem[this.textName] || ''); + this.setSelectList(selectedItem?.[this.textName] || ''); }, setSelectList(selectedLabel) { let _this = this; -- Gitee