From 3be2d4c87f6fa22633682bb9ed0b9935499788c4 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 25 Apr 2025 20:59:29 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90INFRA=E3=80=91=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=AD=98=E5=82=A8=EF=BC=8C=E5=A2=9E=E5=8A=A0=20enable?= =?UTF-8?q?PathStyleAccess=20=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/infra/file-config/index.ts | 1 + .../src/views/infra/fileConfig/data.ts | 22 +++++++++++++++++++ .../views/infra/fileConfig/modules/form.vue | 3 +++ 3 files changed, 26 insertions(+) diff --git a/apps/web-antd/src/api/infra/file-config/index.ts b/apps/web-antd/src/api/infra/file-config/index.ts index e8371814e..a16cf2bc0 100644 --- a/apps/web-antd/src/api/infra/file-config/index.ts +++ b/apps/web-antd/src/api/infra/file-config/index.ts @@ -15,6 +15,7 @@ export namespace InfraFileConfigApi { bucket?: string; accessKey?: string; accessSecret?: string; + pathStyle?: boolean; domain: string; } diff --git a/apps/web-antd/src/views/infra/fileConfig/data.ts b/apps/web-antd/src/views/infra/fileConfig/data.ts index b6ca2262d..bdf80d625 100644 --- a/apps/web-antd/src/views/infra/fileConfig/data.ts +++ b/apps/web-antd/src/views/infra/fileConfig/data.ts @@ -36,6 +36,7 @@ export function useFormSchema(): VbenFormSchema[] { componentProps: { options: getDictOptions(DICT_TYPE.INFRA_FILE_STORAGE, 'number'), placeholder: '请选择存储器', + class: 'w-full', }, rules: 'required', dependencies: { @@ -134,6 +135,8 @@ export function useFormSchema(): VbenFormSchema[] { { label: '主动模式', value: 'Active' }, { label: '被动模式', value: 'Passive' }, ], + buttonStyle: 'solid', + optionType: 'button', }, rules: 'required', dependencies: { @@ -194,6 +197,25 @@ export function useFormSchema(): VbenFormSchema[] { show: (formValues) => formValues.storage === 20, }, }, + { + fieldName: 'config.enablePathStyleAccess', + label: '是否 Path Style', + component: 'RadioGroup', + componentProps: { + options: [ + { label: '启用', value: true }, + { label: '禁用', value: false }, + ], + buttonStyle: 'solid', + optionType: 'button', + }, + rules: 'required', + dependencies: { + triggerFields: ['storage'], + show: (formValues) => formValues.storage === 20, + }, + defaultValue: false, + }, // 通用 { fieldName: 'config.domain', diff --git a/apps/web-antd/src/views/infra/fileConfig/modules/form.vue b/apps/web-antd/src/views/infra/fileConfig/modules/form.vue index 1865beaad..59776c673 100644 --- a/apps/web-antd/src/views/infra/fileConfig/modules/form.vue +++ b/apps/web-antd/src/views/infra/fileConfig/modules/form.vue @@ -26,6 +26,9 @@ const getTitle = computed(() => { }); const [Form, formApi] = useVbenForm({ + commonConfig: { + labelWidth: 120, + }, layout: 'horizontal', schema: useFormSchema(), showDefaultActions: false,