This commit is contained in:
lzh
2025-12-31 10:50:50 +08:00
parent d45226b90b
commit 647dd1ac7e
468 changed files with 33538 additions and 14843 deletions

View File

@@ -72,9 +72,10 @@ setupVbenVxeTable({
// 表格配置项可以用 cellRender: { name: 'CellImage' },
vxeUI.renderer.add('CellImage', {
renderTableDefault(_renderOpts, params) {
renderTableDefault(renderOpts, params) {
const { props } = renderOpts;
const { column, row } = params;
return h(Image, { src: row[column.field] });
return h(Image, { src: row[column.field], ...props });
},
});

View File

@@ -17,6 +17,7 @@ export namespace InfraFileConfigApi {
accessSecret?: string;
pathStyle?: boolean;
enablePublicAccess?: boolean;
region?: string;
domain: string;
}

View File

@@ -12,6 +12,7 @@ export namespace SystemSocialClientApi {
clientId: string;
clientSecret: string;
agentId?: string;
publicKey?: string;
status: number;
createTime?: Date;
}

View File

@@ -5,6 +5,8 @@ import { registerLoadingDirective } from '@vben/common-ui/es/loading';
import { preferences } from '@vben/preferences';
import { initStores } from '@vben/stores';
import '@vben/styles';
// import '@vben/styles/antd';
// 引入组件库的少量全局样式变量
import { useTitle } from '@vueuse/core';
@@ -15,8 +17,6 @@ import { initSetupVbenForm } from './adapter/form';
import App from './app.vue';
import { router } from './router';
// import '@vben/styles/antd';
// 引入组件库的少量全局样式变量
import 'tdesign-vue-next/es/style/index.css';
async function bootstrap(namespace: string) {

View File

@@ -77,7 +77,8 @@ function handleRowCheckboxChange({
}: {
records: InfraDataSourceConfigApi.DataSourceConfig[];
}) {
checkedIds.value = records.map((item) => item.id!);
// 过滤掉id为 0 的主数据源
checkedIds.value = records.map((item) => item.id!).filter((id) => id !== 0);
}
const [Grid, gridApi] = useVbenVxeGrid({
@@ -138,6 +139,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
variant: 'text',
icon: ACTION_ICON.EDIT,
auth: ['infra:data-source-config:update'],
disabled: row.id === 0,
onClick: handleEdit.bind(null, row),
},
{
@@ -146,6 +148,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
type: 'danger',
icon: ACTION_ICON.DELETE,
auth: ['infra:data-source-config:delete'],
disabled: row.id === 0,
popConfirm: {
title: $t('ui.actionMessage.deleteConfirm', [row.name]),
confirm: handleDelete.bind(null, row),

View File

@@ -229,6 +229,18 @@ export function useFormSchema(): VbenFormSchema[] {
},
defaultValue: false,
},
{
fieldName: 'config.region',
label: '区域',
component: 'Input',
componentProps: {
placeholder: '请填写区域,一般仅 AWS 需要填写',
},
dependencies: {
triggerFields: ['storage'],
show: (formValues) => formValues.storage === 20,
},
},
// 通用
{
fieldName: 'config.domain',

View File

@@ -81,6 +81,18 @@ export function useFormSchema(): VbenFormSchema[] {
values.socialType === SystemUserSocialTypeEnum.WECHAT_ENTERPRISE.type,
},
},
{
fieldName: 'publicKey',
label: 'publicKey',
component: 'Input',
componentProps: {
placeholder: '请输入 publicKey 公钥',
},
dependencies: {
triggerFields: ['socialType'],
show: (values) => values.socialType === 40,
},
},
{
fieldName: 'status',
label: '状态',