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 20a0ab3fa..1a2fb7707 100644 --- a/apps/web-antd/src/api/infra/file-config/index.ts +++ b/apps/web-antd/src/api/infra/file-config/index.ts @@ -16,6 +16,7 @@ export namespace InfraFileConfigApi { accessKey?: string; accessSecret?: string; pathStyle?: boolean; + enablePublicAccess?: 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 58cc4cd93..b28d53deb 100644 --- a/apps/web-antd/src/views/infra/fileConfig/data.ts +++ b/apps/web-antd/src/views/infra/fileConfig/data.ts @@ -200,6 +200,25 @@ export function useFormSchema(): VbenFormSchema[] { }, defaultValue: false, }, + { + fieldName: 'config.enablePublicAccess', + label: '公开访问', + 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-ele/src/api/infra/file-config/index.ts b/apps/web-ele/src/api/infra/file-config/index.ts index 20a0ab3fa..1a2fb7707 100644 --- a/apps/web-ele/src/api/infra/file-config/index.ts +++ b/apps/web-ele/src/api/infra/file-config/index.ts @@ -16,6 +16,7 @@ export namespace InfraFileConfigApi { accessKey?: string; accessSecret?: string; pathStyle?: boolean; + enablePublicAccess?: boolean; domain: string; } diff --git a/apps/web-ele/src/views/infra/fileConfig/data.ts b/apps/web-ele/src/views/infra/fileConfig/data.ts index 282d70f19..1fee714de 100644 --- a/apps/web-ele/src/views/infra/fileConfig/data.ts +++ b/apps/web-ele/src/views/infra/fileConfig/data.ts @@ -213,6 +213,25 @@ export function useFormSchema(): VbenFormSchema[] { }, defaultValue: false, }, + { + fieldName: 'config.enablePublicAccess', + label: '公开访问', + 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-naive/src/api/infra/file-config/index.ts b/apps/web-naive/src/api/infra/file-config/index.ts index a16cf2bc0..e74f6aad9 100644 --- a/apps/web-naive/src/api/infra/file-config/index.ts +++ b/apps/web-naive/src/api/infra/file-config/index.ts @@ -16,6 +16,7 @@ export namespace InfraFileConfigApi { accessKey?: string; accessSecret?: string; pathStyle?: boolean; + enablePublicAccess?: boolean; domain: string; } diff --git a/apps/web-naive/src/views/infra/fileConfig/data.ts b/apps/web-naive/src/views/infra/fileConfig/data.ts index f28895add..1a9183d9a 100644 --- a/apps/web-naive/src/views/infra/fileConfig/data.ts +++ b/apps/web-naive/src/views/infra/fileConfig/data.ts @@ -214,6 +214,25 @@ export function useFormSchema(): VbenFormSchema[] { }, defaultValue: false, }, + { + fieldName: 'config.enablePublicAccess', + label: '公开访问', + 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',