feat:【INFRA】文件存储,增加 enablePathStyleAccess 选项

pull/83/MERGE
YunaiV 2025-04-25 20:59:29 +08:00
parent b2011aea91
commit 3be2d4c87f
3 changed files with 26 additions and 0 deletions

View File

@ -15,6 +15,7 @@ export namespace InfraFileConfigApi {
bucket?: string;
accessKey?: string;
accessSecret?: string;
pathStyle?: boolean;
domain: string;
}

View File

@ -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',

View File

@ -26,6 +26,9 @@ const getTitle = computed(() => {
});
const [Form, formApi] = useVbenForm({
commonConfig: {
labelWidth: 120,
},
layout: 'horizontal',
schema: useFormSchema(),
showDefaultActions: false,