From 2b1c48c0d64fc885c778f76541673f9508574aac Mon Sep 17 00:00:00 2001 From: zhengwr Date: Tue, 16 Jun 2026 22:09:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(input-table):=20headerToolbar=20=E9=80=8F?= =?UTF-8?q?=E4=BC=A0=E4=B8=BA=E5=BA=95=E5=B1=82=20table=20actions(editGrid?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E6=8C=89=E9=92=AE=E8=90=BD=E8=A1=A8?= =?UTF-8?q?=E5=A4=B4=E5=B7=A5=E5=85=B7=E6=A0=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitignore | 4 ++++ packages/amis/src/renderers/Form/InputTable.tsx | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 11a7996..22cf187 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,7 @@ revision.json !/.vscode/iconConfig.json publish.sh + +# OMC 工具临时目录,勿入库 +.omc/ +**/.omc/ diff --git a/packages/amis/src/renderers/Form/InputTable.tsx b/packages/amis/src/renderers/Form/InputTable.tsx index 8a5cfdd..791c79a 100644 --- a/packages/amis/src/renderers/Form/InputTable.tsx +++ b/packages/amis/src/renderers/Form/InputTable.tsx @@ -2015,7 +2015,10 @@ export default class FormTable< autoFillHeight, tableContentClassName, onEvent, - showIndex + showIndex, + // 透传 headerToolbar 为底层 table 的 actions:Table.renderActions('header') 会把它与列切换 ⊞ 图标 + // 并排渲染在表头工具栏,使 input-table(editGrid)的「添加」按钮落到与普通列表 CRUD 一致的工具栏位置。 + actions: (this.props as any).headerToolbar }, { ref: this.tableRef,