From d53dadbe531181e1d605cca1845ef3731cf37399 Mon Sep 17 00:00:00 2001 From: sakurayinfei <970412446@qq.com> Date: Wed, 12 Nov 2025 17:04:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(table):=20=E5=A4=84=E7=90=86=E9=97=A8?= =?UTF-8?q?=E7=A6=81=E2=80=9C=E4=B8=8D=E4=BD=BF=E7=94=A8=20undefined=20?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=8F=98=E9=87=8F=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/opendesign/src/table/useTableMeta.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/opendesign/src/table/useTableMeta.ts b/packages/opendesign/src/table/useTableMeta.ts index 2bad88c8..8f061f63 100644 --- a/packages/opendesign/src/table/useTableMeta.ts +++ b/packages/opendesign/src/table/useTableMeta.ts @@ -164,7 +164,7 @@ function markSection( } } } -function markTable(sections: Array, options: TableMetaOptions) { +function markTable(sections: Array, options: TableMetaOptions) { const { markCellLastCol, markCellLastRow, markRowLast, splitBySection } = options; const marker = { cellColMarker: markCellLastCol === true ? DEFAULT_CELL_LAST_COL_MARKER : markCellLastCol, @@ -180,8 +180,8 @@ function markTable(sections: Array, options: TableMeta }); } const processTable = (el: HTMLTableElement, cellMap: WeakMap, options: TableMetaOptions) => { - let head = undefined; - let foot = undefined; + let head = null; + let foot = null; let maxCols = 0; // 处理表格数据 if (el.tHead) { @@ -247,9 +247,9 @@ function shouldRefactorTableMeta(records: MutationRecord[]) { } export function useTableMeta(elRef: HTMLTableElement | Ref, options: TableMetaOptions = {}) { const cellMap = new WeakMap(); - const head = shallowRef(); - const bodies = shallowRef(); - const foot = shallowRef(); + const head = shallowRef(null); + const bodies = shallowRef([]); + const foot = shallowRef(null); let mutationObserver: MutationObserver | null = null; const updateMeta = (el: HTMLTableElement) => { -- Gitee From 7eb491e03c263f44ae436ddede9f26ff56e09b05 Mon Sep 17 00:00:00 2001 From: sakurayinfei <970412446@qq.com> Date: Wed, 12 Nov 2025 17:04:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(eslint):=20=E6=B7=BB=E5=8A=A0=20no-und?= =?UTF-8?q?ef-init=20=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index ae1ee675..7e1f9968 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -80,5 +80,6 @@ module.exports = { caughtErrorsIgnorePattern: '^_' } ], + 'no-undef-init': 'error', }, }; \ No newline at end of file -- Gitee