This commit is contained in:
Mrx
2026-02-02 14:55:34 +08:00
parent 3bf38a294e
commit 8f08614a17
2 changed files with 36 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ export namespace PlatformUserApi {
nickname: string; nickname: string;
info: string; info: string;
inside: number; inside: number;
disable: number; // 0 可用 1 禁用
create_time: string; create_time: string;
update_time: string; update_time: string;
} }
@@ -19,10 +20,11 @@ export namespace PlatformUserApi {
} }
export interface UpdatePlatformUserRequest { export interface UpdatePlatformUserRequest {
mobile: string; mobile?: string;
nickname: string; nickname?: string;
info: string; info?: string;
inside: number; inside?: number;
disable?: number; // 0 可用 1 禁用
} }
} }

View File

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