From 92ee1ecf68cedcd4ea6e14c7086f6f2ba21ea441 Mon Sep 17 00:00:00 2001 From: luojie <125330818@qq.com> Date: Wed, 25 Feb 2026 19:14:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86][upd?= =?UTF-8?q?ate]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Template/CustomTable.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/Template/CustomTable.vue b/src/components/Template/CustomTable.vue index f090cfe..e0bd489 100644 --- a/src/components/Template/CustomTable.vue +++ b/src/components/Template/CustomTable.vue @@ -707,6 +707,10 @@ export default { return true; }, onAddRow() { + if (this.$listeners && this.$listeners['onAddRow']) { + this.$emit('onAddRow'); + return; + } this.addRow({ actSolutionVolumePrecision: 3,//小数点精度默认为3 actSolutionConcentrationPrecision: 3,//小数点精度默认为3 @@ -714,10 +718,14 @@ export default { targetStartSolutionVolumePrecision: 3,//小数点精度默认为3 }); }, + // 添加行 addRow(row = {}) { this.localDataSource.push(row); }, + addRows(rows = []) { + this.localDataSource.push(...rows); + }, getDataSource() { return this.localDataSource; },