perf: vxe

This commit is contained in:
xingyu4j
2022-11-12 15:52:43 +08:00
parent 94527ae9ae
commit 725cc4e41b
9 changed files with 304 additions and 299 deletions

View File

@ -13,7 +13,7 @@
<template #status_default="{ row }">
<DictTag :type="DICT_TYPE.COMMON_STATUS" :value="row.status" />
</template>
<template #action_default="{ row }">
<template #actionbtns_default="{ row }">
<XTextButton
preIcon="ep:edit"
:title="t('action.edit')"

View File

@ -13,79 +13,52 @@ export const rules = reactive({
})
// CrudSchema
const crudSchemas = reactive<VxeCrudSchema[]>([
{
title: t('common.index'),
field: 'id',
type: 'seq',
form: {
show: false
},
detail: {
show: false
}
},
{
title: '岗位名称',
field: 'name',
search: {
show: true
}
},
{
title: '岗位编码',
field: 'code',
search: {
show: true
}
},
{
title: '岗位顺序',
field: 'sort'
},
{
title: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
table: {
slots: {
default: 'status_default'
const crudSchemas = reactive<VxeCrudSchema>({
primaryKey: 'id',
primaryType: 'seq',
action: true,
columns: [
{
title: '岗位名称',
field: 'name',
search: {
show: true
}
},
search: {
show: true
}
},
{
title: '备注',
field: 'remark',
table: {
show: false
}
},
{
title: t('common.createTime'),
field: 'createTime',
formatter: 'formatDate',
form: {
show: false
}
},
{
title: t('table.action'),
field: 'action',
table: {
width: '240px',
slots: {
default: 'action_default'
{
title: '岗位编码',
field: 'code',
search: {
show: true
}
},
form: {
show: false
{
title: '岗位顺序',
field: 'sort'
},
detail: {
show: false
{
title: t('common.status'),
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
search: {
show: true
}
},
{
title: '备注',
field: 'remark',
table: {
show: false
}
},
{
title: t('common.createTime'),
field: 'createTime',
formatter: 'formatDate',
form: {
show: false
}
}
}
])
]
})
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)