From 7bb8e9bdc4b1c4658584d81473db5a8611943444 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Fri, 25 Apr 2025 19:25:06 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=B1:=20[client]=20sync=20upgrade=20wit?= =?UTF-8?q?h=203=20commits=20[trident-sync]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build: publish success perf: 优化antdv单元格合并示例,使用customCell方法,以及增加操作列合并演示 --- packages/ui/certd-client/CHANGELOG.md | 7 ++ packages/ui/certd-client/package.json | 10 +-- .../src/plugin/antdv-async/index.ts | 13 ++++ .../src/views/crud/feature/merge/crud.tsx | 69 +++++++++++-------- 4 files changed, 65 insertions(+), 34 deletions(-) diff --git a/packages/ui/certd-client/CHANGELOG.md b/packages/ui/certd-client/CHANGELOG.md index 8763675c..e9e8fc1c 100644 --- a/packages/ui/certd-client/CHANGELOG.md +++ b/packages/ui/certd-client/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.25.10](https://github.com/fast-crud/fast-crud/compare/v1.25.9...v1.25.10) (2025-04-25) + +### Performance Improvements + +* 新增editable-select组件 ([8681285](https://github.com/fast-crud/fast-crud/commit/86812851de435cb2406d06898396c368d5eda414)) +* 优化antdv单元格合并示例,使用customCell方法,以及增加操作列合并演示 ([1068f9a](https://github.com/fast-crud/fast-crud/commit/1068f9aaa9b7732acb7082cc2ce3b1fadf1f8521)) + ## [1.25.9](https://github.com/fast-crud/fast-crud/compare/v1.25.8...v1.25.9) (2025-04-16) ### Bug Fixes diff --git a/packages/ui/certd-client/package.json b/packages/ui/certd-client/package.json index c79d4c31..79fd0d3c 100644 --- a/packages/ui/certd-client/package.json +++ b/packages/ui/certd-client/package.json @@ -1,6 +1,6 @@ { "name": "@fast-crud/fs-admin-antdv4", - "version": "1.25.9", + "version": "1.25.10", "private": true, "scripts": { "dev": "vite", @@ -27,10 +27,10 @@ "@aws-sdk/client-s3": "^3.535.0", "@aws-sdk/s3-request-presigner": "^3.535.0", "@ctrl/tinycolor": "^4.1.0", - "@fast-crud/fast-crud": "^1.25.9", - "@fast-crud/fast-extends": "^1.25.9", - "@fast-crud/ui-antdv4": "^1.25.9", - "@fast-crud/ui-interface": "^1.25.9", + "@fast-crud/fast-crud": "^1.25.10", + "@fast-crud/fast-extends": "^1.25.10", + "@fast-crud/ui-antdv4": "^1.25.10", + "@fast-crud/ui-interface": "^1.25.10", "@iconify/tailwind": "^1.2.0", "@iconify/vue": "^4.1.1", "@manypkg/get-packages": "^2.2.2", diff --git a/packages/ui/certd-client/src/plugin/antdv-async/index.ts b/packages/ui/certd-client/src/plugin/antdv-async/index.ts index 53a3d85e..0be9e78f 100644 --- a/packages/ui/certd-client/src/plugin/antdv-async/index.ts +++ b/packages/ui/certd-client/src/plugin/antdv-async/index.ts @@ -221,5 +221,18 @@ export default { "AResult", defineAsyncComponent(() => import("ant-design-vue/es/result")) ); + + app.component( + "ATableSummaryCell", + defineAsyncComponent(() => import("ant-design-vue/es/vc-table/Cell/index")) + ); + app.component( + "ATableSummaryRow", + defineAsyncComponent(() => import("ant-design-vue/es/vc-table/Footer/Row")) + ); + app.component( + "ATableSummary", + defineAsyncComponent(() => import("ant-design-vue/es/vc-table/Footer/Summary")) + ); } }; diff --git a/packages/ui/certd-client/src/views/crud/feature/merge/crud.tsx b/packages/ui/certd-client/src/views/crud/feature/merge/crud.tsx index 5beb398e..b7cb1f31 100644 --- a/packages/ui/certd-client/src/views/crud/feature/merge/crud.tsx +++ b/packages/ui/certd-client/src/views/crud/feature/merge/crud.tsx @@ -52,6 +52,19 @@ export default async function ({ crudExpose }: CreateCrudOptionsProps): Promise< } } }, + rowHandle: { + fixed: null, + title: "操作列行合并", + customCell: (_: any, index: any) => { + if (index === 4) { + return { rowSpan: 2 }; + } else if (index === 5) { + return { rowSpan: 0 }; + } else { + return { rowSpan: 1 }; + } + } + }, columns: { id: { title: "id", @@ -69,57 +82,55 @@ export default async function ({ crudExpose }: CreateCrudOptionsProps): Promise< title: "上下合并", type: "text", column: { - customRender: ({ text, index }: any, cellRender: any) => { - const obj: any = { - props: {} - }; + customCell: (_: any, index: any) => { if (index === 2) { - obj.children = text + "(我合并了)"; - obj.props.rowSpan = 2; + return { + rowSpan: 2 + }; } else if (index === 3) { - obj.props.rowSpan = 0; - } else { - obj.children = cellRender(); + return { + rowSpan: 0 + }; } - return obj; + }, + formatter({ value, index }) { + if (index === 2) { + return value + "(我上下合并了)"; + } + return value; } } }, colMerge1: { - title: "左右合并", + title: "左右合并1", type: "text", column: { align: "center", - customRender({ text, index, record, dataIndex }: any, cellRender: any) { - if (index !== 4) { + customCell(value: any, index: any) { + if (index === 4) { return { - children: cellRender() + colSpan: 2 }; } - return { - children: text + "(我合并了)", - props: { - colSpan: 2 - } - }; + }, + formatter({ value, index }) { + if (index === 4) { + return value + "(我左右合并了)"; + } + return value; } } }, colMerge2: { - title: "左右合并", + title: "左右合并2", type: "text", column: { - customRender({ text, index, record, dataIndex }: any, cellRender: any) { - if (index !== 4) { + customCell(_: any, index: any) { + if (index === 4) { return { - children: cellRender() + colSpan: 0 }; } - return { - props: { - colSpan: 0 - } - }; } } },