From d0c4dfca97b93cb45a9145f72a21a4b6bbf55961 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Sun, 4 Aug 2024 19:24:18 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=B1:=20[client]=20sync=20upgrade=20wit?= =?UTF-8?q?h=202=20commits=20[trident-sync]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit perf: 全部支持拖动调整列宽 --- .../certd-client/src/plugin/fast-crud/index.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/ui/certd-client/src/plugin/fast-crud/index.tsx b/packages/ui/certd-client/src/plugin/fast-crud/index.tsx index bef56eb2c..cfba16536 100644 --- a/packages/ui/certd-client/src/plugin/fast-crud/index.tsx +++ b/packages/ui/certd-client/src/plugin/fast-crud/index.tsx @@ -336,6 +336,22 @@ function install(app: any, options: any = {}) { return columnProps; } }); + + //默认宽度,支持自动拖动调整列宽 + registerMergeColumnPlugin({ + name: "resize-column-plugin", + order: 2, + handle: (columnProps: ColumnCompositionProps) => { + if (!columnProps.column) { + columnProps.column = {}; + } + columnProps.column.resizable = true; + if (!columnProps.column.width) { + columnProps.column.width = 100; + } + return columnProps; + } + }); } export default {