From 6e8b0eeca981edbe7de9903337d024dda18c828c Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Tue, 10 Sep 2024 19:24:33 +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 fix: 修复antdv 文件上传 success事件无效的bug --- .../src/plugin/fast-crud/index.tsx | 1 + .../crud/component/uploader/form/crud.tsx | 20 +++++++++++++++++++ 2 files changed, 21 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 cfba1653..24d05e90 100644 --- a/packages/ui/certd-client/src/plugin/fast-crud/index.tsx +++ b/packages/ui/certd-client/src/plugin/fast-crud/index.tsx @@ -60,6 +60,7 @@ function install(app: any, options: any = {}) { } }, rowHandle: { + fixed: "right", buttons: { view: { type: "link", text: null, icon: "ion:eye-outline" }, copy: { show: true, type: "link", text: null, icon: "ion:copy-outline" }, diff --git a/packages/ui/certd-client/src/views/crud/component/uploader/form/crud.tsx b/packages/ui/certd-client/src/views/crud/component/uploader/form/crud.tsx index b592dc02..f477097b 100644 --- a/packages/ui/certd-client/src/views/crud/component/uploader/form/crud.tsx +++ b/packages/ui/certd-client/src/views/crud/component/uploader/form/crud.tsx @@ -37,6 +37,9 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti } } }, + table: { + scroll: { x: 2000 } + }, columns: { id: { title: "ID", @@ -141,11 +144,28 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti component: { uploader: { type: "form" + }, + on: { + success(ctx) { + // 上传成功后的回调 + console.log("success", ctx); + ctx.form.avatarSize = ctx.$event.file.size; + } } }, helper: "就是照片墙limit=1的效果" } }, + avatarSize: { + title: "头像文件大小", + type: "number", + form: { + component: { + disabled: true + }, + helper: "左边头像上传成功后,会自动填充文件大小" + } + }, cropper: { title: "裁剪", type: "cropper-uploader",