Vue3 重构:邮件模版的新增和修改操作

This commit is contained in:
YunaiV
2023-03-18 10:39:19 +08:00
parent 4d03e46142
commit ba327cd8ae
5 changed files with 98 additions and 28 deletions

View File

@@ -42,14 +42,14 @@ const crudSchemas = reactive<CrudSchema[]>([
span: 24
},
componentProps: {
valueHtml: ''
valueHtml: '',
height: 200
}
}
},
{
label: '邮箱账号',
field: 'accountId',
isSearch: true,
width: '200px',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return accounts.find((account) => account.id === cellValue)?.mail
@@ -57,9 +57,17 @@ const crudSchemas = reactive<CrudSchema[]>([
search: {
show: true,
component: 'Select',
api: () => {
return accounts
},
api: () => accounts,
componentProps: {
optionsAlias: {
labelField: 'mail',
valueField: 'id'
}
}
},
form: {
component: 'Select',
api: () => accounts,
componentProps: {
optionsAlias: {
labelField: 'mail',
@@ -104,6 +112,11 @@ const crudSchemas = reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
}
},
{
label: '操作',
field: 'action',
isForm: false
}
])
export const { allSchemas } = useCrudSchemas(crudSchemas)