From 36aa7f82b078a053a102331b3c6f132fb9d492f9 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 17 Mar 2025 00:06:03 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=88=9B=E5=BB=BA=E8=AF=81=E4=B9=A6?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E7=BA=BF=E6=97=B6=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E5=8F=82=E6=95=B0=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/certd/pipeline/certd-form/crud.tsx | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx index 9fab545b..c22d41d6 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/crud.tsx @@ -10,6 +10,7 @@ export default function (certPlugins: any[], formWrapperRef: any): CreateCrudOpt const inputs: any = {}; const userStore = useUserStore(); const settingStore = useSettingStore(); + const moreParams = []; for (const plugin of certPlugins) { for (const inputKey in plugin.input) { if (inputs[inputKey]) { @@ -18,7 +19,8 @@ export default function (certPlugins: any[], formWrapperRef: any): CreateCrudOpt } const inputDefine = _.cloneDeep(plugin.input[inputKey]); if (!inputDefine.required && !inputDefine.maybeNeed) { - continue; + moreParams.push(inputKey); + // continue; } useReference(inputDefine); inputs[inputKey] = { @@ -34,7 +36,11 @@ export default function (certPlugins: any[], formWrapperRef: any): CreateCrudOpt let inputDefineShow = true; if (inputDefine.show != null) { const computeShow = inputDefine.show as any; - inputDefineShow = computeShow.computeFn({ form }); + if (computeShow === false) { + inputDefineShow = false; + } else if (computeShow && computeShow.computeFn) { + inputDefineShow = computeShow.computeFn({ form }); + } } return form?.certApplyPlugin === plugin.name && inputDefineShow; }) @@ -52,6 +58,15 @@ export default function (certPlugins: any[], formWrapperRef: any): CreateCrudOpt width: 1350, saveRemind: false, title: "创建证书流水线" + }, + group: { + groups: { + more: { + header: "更多参数", + columns: moreParams, + collapsed: true + } + } } }, columns: { @@ -61,7 +76,8 @@ export default function (certPlugins: any[], formWrapperRef: any): CreateCrudOpt dict: dict({ data: [ { value: "CertApply", label: "JS-ACME" }, - { value: "CertApplyLego", label: "Lego-ACME" } + { value: "CertApplyLego", label: "Lego-ACME" }, + { value: "CertUpload", label: "上传自定义证书" } ] }), form: {