This commit is contained in:
Mrx
2026-02-02 16:08:50 +08:00
parent 9b6fcd1f84
commit 224aa52b7f
2 changed files with 20 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ export namespace PlatformUserApi {
nickname: string;
info: string;
inside: number;
disable: number; // 0-可用 1-禁用
create_time: string;
update_time: string;
}
@@ -23,6 +24,7 @@ export namespace PlatformUserApi {
nickname: string;
info: string;
inside: number;
disable: number; // 0-可用 1-禁用
}
}

View File

@@ -36,6 +36,18 @@ export function useFormSchema(): VbenFormSchema[] {
},
defaultValue: 0,
},
{
component: 'Switch',
fieldName: 'disable',
label: '是否封禁',
componentProps: {
checkedChildren: '封禁',
unCheckedChildren: '可用',
checkedValue: 1,
unCheckedValue: 0,
},
defaultValue: 0,
},
];
}
@@ -104,6 +116,12 @@ export function useColumns<T = PlatformUserApi.PlatformUserItem>(
width: 100,
formatter: ({ cellValue }) => (cellValue === 1 ? '是' : '否'),
},
{
field: 'disable',
title: '封禁状态',
width: 100,
formatter: ({ cellValue }) => (cellValue === 1 ? '已封禁' : '正常'),
},
{
field: 'create_time',
title: '创建时间',