From eb3766ac63b11370164059400a943e00337eea5e Mon Sep 17 00:00:00 2001 From: "p1j123456@126.com" Date: Fri, 6 May 2022 21:34:42 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E8=A1=A8=E5=8D=95=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/basic/VolForm.vue" | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git "a/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" "b/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" index 38022017..72c06afe 100644 --- "a/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" +++ "b/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" @@ -691,9 +691,18 @@ export default defineComponent({ }, methods: { getColWidth(item) { - //2021.08.30增加动态计算表单宽度 + //2022.05.06 增加动态计算表单宽度 let _span = 0; this.formRules.forEach((row, xIndex) => { + //2022.04.20 追加表单中隐藏的元素不参与动态计算表单宽度 + let rowLength = 0; // 初始化表单元素的数量 + row.forEach((item) => { + if (item.hidden != true) { + // 计算宽度是,不计隐藏的元素 + rowLength++; + } + }); + if (row.length > _span) _span = row.length; }); let rete = -- Gitee From 48b393aa1712f876562a9a89ffa0da8681d49182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E7=9A=84=E5=A4=A9=E7=A9=BA?= Date: Fri, 6 May 2022 13:39:15 +0000 Subject: [PATCH 2/4] =?UTF-8?q?update=20Vol.Vue3=E7=89=88=E6=9C=AC/src/com?= =?UTF-8?q?ponents/basic/VolForm.vue.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/basic/VolForm.vue" | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git "a/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" "b/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" index 72c06afe..4dfc2985 100644 --- "a/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" +++ "b/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" @@ -691,14 +691,14 @@ export default defineComponent({ }, methods: { getColWidth(item) { - //2022.05.06 增加动态计算表单宽度 + //2021.08.31 增加动态计算表单宽度 let _span = 0; this.formRules.forEach((row, xIndex) => { - //2022.04.20 追加表单中隐藏的元素不参与动态计算表单宽度 + //2022.05.06 追加表单中隐藏的元素不参与动态计算表单宽度 let rowLength = 0; // 初始化表单元素的数量 row.forEach((item) => { if (item.hidden != true) { - // 计算宽度是,不计隐藏的元素 + // 计算宽度时,不计隐藏的元素 rowLength++; } }); -- Gitee From de4f0952e0efc2d0cca084ce7d214f0345c175c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E7=9A=84=E5=A4=A9=E7=A9=BA?= Date: Fri, 6 May 2022 13:40:09 +0000 Subject: [PATCH 3/4] =?UTF-8?q?update=20Vol.Vue3=E7=89=88=E6=9C=AC/src/com?= =?UTF-8?q?ponents/basic/VolForm.vue.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/basic/VolForm.vue" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" "b/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" index 4dfc2985..067075d8 100644 --- "a/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" +++ "b/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolForm.vue" @@ -691,7 +691,7 @@ export default defineComponent({ }, methods: { getColWidth(item) { - //2021.08.31 增加动态计算表单宽度 + //2021.08.30 增加动态计算表单宽度 let _span = 0; this.formRules.forEach((row, xIndex) => { //2022.05.06 追加表单中隐藏的元素不参与动态计算表单宽度 -- Gitee From dd41c546a9147f6148db11b4234e55d447d8db20 Mon Sep 17 00:00:00 2001 From: "p1j123456@126.com" Date: Fri, 6 May 2022 21:46:52 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=87=8D=E5=A4=8D=E7=9A=84bug=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=B7=BB=E5=8A=A0=E8=A1=8C=E6=97=B6=EF=BC=8C=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E5=88=97=E6=9C=89=E7=BC=96=E8=BE=91=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=EF=BC=8C=E8=AE=BE=E7=BD=AE=E5=BC=80=E5=90=AF=E7=BC=96=E8=BE=91?= =?UTF-8?q?(=E9=81=BF=E5=85=8D=E5=85=B3=E9=97=AD=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E6=97=A0=E6=B3=95=E5=86=8D=E6=AC=A1=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E7=BC=96=E8=BE=91)=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/basic/VolTable.vue" | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git "a/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolTable.vue" "b/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolTable.vue" index cab57545..3de6336f 100644 --- "a/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolTable.vue" +++ "b/Vol.Vue3\347\211\210\346\234\254/src/components/basic/VolTable.vue" @@ -903,8 +903,9 @@ export default defineComponent({ validateRow(row, option1) { if (!this.validateColum(option1, row)) { this.errorFiled = option1.field; - _errMsg = option1.title + _errMsg; - this.$message.error(_errMsg); + // 2022.05.06 修改错误信息重复的问题 + let errMsg = option1.title + _errMsg; + this.$message.error(errMsg); return false; } this.errorFiled = ''; @@ -1016,6 +1017,8 @@ export default defineComponent({ row = {}; } this.columns.forEach((x) => { + // 2022.05.06 添加行时,如果列有编辑属性,设置开启编辑(避免关闭编辑后,无法再次启用编辑) + x.readonly = false; if (!row.hasOwnProperty(x.field)) { if (x.edit && x.edit.type == 'switch') { row[x.field] = x.type == 'bool' ? false : 0; -- Gitee