From 80019d4dc15ef45ab2a38796616aa97a81d935eb Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Thu, 11 Jul 2024 19:23:48 +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 docs: 1 docs: 1 --- .../src/views/crud/component/uploader/form/crud.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 16c4f4a2..b592dc02 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 @@ -57,7 +57,17 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti multiple: true, //可选择多个 uploader: { type: "form", - keepName: true + keepName: true, + successHandle(res: any) { + //这里我的后台返回res是一个key 字符串 + //此方法需要返回的数据结构为 {key:"string",url:"string"...} + // 如果 有返回url,那么buildUrl将不会被执行 + return { key: res }; + } + }, + valueType: "key", + async buildUrl(value: string) { + return "http://www.docmirror.cn:7070/api/upload/form/download?key=" + value; } }, helper: "可以同时选择多个文件"