{
field: 'id',
label: t('userDemo.departmentName'),
table: {
slots: {
default: (data: any) => {
return <>{data.row.departmentName}</>
}
}
},
form: {
component: 'TreeSelect',
componentProps: {
nodeKey: 'id',
props: {
label: 'departmentName'
},
checkStrictly: true, //使父级选项可以被选中
showCheckbox: true, //用选择框来选择
checkOnClickNode: true //允许节点点击选中},
optionApi: async () => {
const res = await getDepartmentApi()
return res.data.list
}
}
最新评论: