You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

58 lines
1.1 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import * as DictTypeApi from '@/api/system/dict/dict.type'
// 表单校验
export const SelectedSetRules = reactive({
description: [required],
code: [required],
available: [required],
concurrencyStamp: [required]
})
export const SelectedSet = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'code',
sort: 'custom',
isForm: false,
isSearch: true,
fixed: 'left'
},
{
label: '描述',
field: 'description',
sort: 'custom',
isSearch: true
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
table: {
width: 110
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: false,
isDetail: false
}
]))