From a654e6dfd23444812daaa647bb7cc8f166a7980f Mon Sep 17 00:00:00 2001 From: yaojn Date: Fri, 10 Nov 2023 17:47:18 +0800 Subject: [PATCH] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E5=A4=84=E7=90=86-=E8=A1=A8=E6=A0=BC=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=AF=BC=E5=85=A5=E7=9A=84=E5=80=BC=E5=92=8C?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=B8=8D=E4=B8=80=E8=87=B4=20=20=20-=20[?= =?UTF-8?q?=E5=85=B3=E8=81=94]#[1020970628775936]=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E5=A4=84=E7=90=86-=E8=A1=A8=E6=A0=BC=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=AF=BC=E5=85=A5=E7=9A=84=E5=80=BC=E5=92=8C?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=B8=8D=E4=B8=80=E8=87=B4=20http://192.168.?= =?UTF-8?q?0.96:8090/demo/rdm.html#/bug-detail/939050947543040/93905094754?= =?UTF-8?q?3057/1020970628775936?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/TsSheet/form/component/formcheckbox.vue | 2 +- src/resources/plugins/TsSheet/form/component/formradio.vue | 2 +- .../TsSheet/form/component/formtableinputer/index.vue | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/resources/plugins/TsSheet/form/component/formcheckbox.vue b/src/resources/plugins/TsSheet/form/component/formcheckbox.vue index cb483415..52e27f80 100644 --- a/src/resources/plugins/TsSheet/form/component/formcheckbox.vue +++ b/src/resources/plugins/TsSheet/form/component/formcheckbox.vue @@ -140,7 +140,7 @@ export default { return dataList; }, actualValue() { - if (this.value) { + if (!this.$utils.isEmpty(this.value)) { //将this.value 改成 this.$utils.isEmpty 解决值为0的时候,被清空的问题 if (!(this.value instanceof Array)) { return [this.value]; } else { diff --git a/src/resources/plugins/TsSheet/form/component/formradio.vue b/src/resources/plugins/TsSheet/form/component/formradio.vue index 5e48b56b..381f1475 100644 --- a/src/resources/plugins/TsSheet/form/component/formradio.vue +++ b/src/resources/plugins/TsSheet/form/component/formradio.vue @@ -138,7 +138,7 @@ export default { return dataList; }, actualValue() { - if (this.value) { + if (!this.$utils.isEmpty(this.value)) { // 将this.value 改成 this.$utils.isEmpty 解决值为0的时候,被清空的问题 if (this.value instanceof Array && this.value.length > 0) { return this.value[0]; } else { diff --git a/src/resources/plugins/TsSheet/form/component/formtableinputer/index.vue b/src/resources/plugins/TsSheet/form/component/formtableinputer/index.vue index 0b9cd2b4..e09bc065 100644 --- a/src/resources/plugins/TsSheet/form/component/formtableinputer/index.vue +++ b/src/resources/plugins/TsSheet/form/component/formtableinputer/index.vue @@ -399,7 +399,6 @@ export default { let selectedItem = this.extraList.find((extraItem) => extraItem.uuid == key); let {config = {}, handler = ''} = selectedItem || {}; let {dataSource = '', isMultiple = false} = config; - console.log('handler', handler); if (handler == 'formtable') { this.$set(item, [key], null); } else if (dataSource == 'matrix' && (isMultiple || handler == 'formradio')) { @@ -557,7 +556,7 @@ export default { let resultValue; let selectedItem = this.extraList.find((extraItem) => extraItem.uuid == uuid); let {config = {}, handler = ''} = selectedItem || {}; - if (value) { + if (!this.$utils.isEmpty(value)) { let {dataSource = '', isMultiple = false} = config || {}; if (dataSource === 'matrix' && (isMultiple || handler == 'formradio')) { // 矩阵 @@ -575,9 +574,9 @@ export default { } } else if (dataSource == 'static' && (isMultiple || (handler == 'formcheckbox'))) { resultValue = []; - resultValue.push(value); + resultValue = typeof value == 'string' ? value.split(',') : [typeof value == 'number' ? String(value) : value]; } else { - resultValue = value; + resultValue = typeof value == 'number' ? String(value) : value; } } return resultValue; -- Gitee