feat-wip(components): 数据字典相关页面代码提交

This commit is contained in:
2025-12-04 20:21:21 +08:00
parent b579b4542d
commit c263fa3a01

View File

@ -31,13 +31,12 @@ const { columns, columnChecks, data, loading, getData, getDataByPage, mobilePagi
columns: () => [ columns: () => [
{ {
type: 'selection', type: 'selection',
align: 'center', align: 'center'
width: 48
}, },
{ {
key: 'index', key: 'index',
title: $t('common.index'), title: $t('common.index'),
width: 64, width: 50,
align: 'center', align: 'center',
render: (_, index) => index + 1 render: (_, index) => index + 1
}, },
@ -45,18 +44,19 @@ const { columns, columnChecks, data, loading, getData, getDataByPage, mobilePagi
key: 'name', key: 'name',
title: $t('page.sys.core.dictionary.fields.name'), title: $t('page.sys.core.dictionary.fields.name'),
align: 'center', align: 'center',
minWidth: 120 resizable: true
}, },
{ {
key: 'code', key: 'code',
title: $t('page.sys.core.dictionary.fields.code'), title: $t('page.sys.core.dictionary.fields.code'),
align: 'center', align: 'center',
minWidth: 120 resizable: true
}, },
{ {
key: 'type', key: 'type',
title: $t('page.sys.core.dictionary.fields.type'), title: $t('page.sys.core.dictionary.fields.type'),
width: 100, width: 80,
resizable: true,
render: row => { render: row => {
if (row.type === null) { if (row.type === null) {
return null; return null;
@ -68,19 +68,18 @@ const { columns, columnChecks, data, loading, getData, getDataByPage, mobilePagi
key: 'createTime', key: 'createTime',
title: $t('page.sys.core.dictionary.fields.createTime'), title: $t('page.sys.core.dictionary.fields.createTime'),
align: 'center', align: 'center',
width: 120 resizable: true
}, },
{ {
key: 'updateTime', key: 'updateTime',
title: $t('page.sys.core.dictionary.fields.updateTime'), title: $t('page.sys.core.dictionary.fields.updateTime'),
align: 'center', align: 'center',
minWidth: 120 resizable: true
}, },
{ {
key: 'operate', key: 'operate',
title: $t('common.operate'), title: $t('common.operate'),
align: 'center', align: 'center',
minWidth: 130,
render: row => ( render: row => (
<div class="flex-center gap-8px"> <div class="flex-center gap-8px">
<NButton type="primary" ghost size="small" onClick={() => edit(row.id)}> <NButton type="primary" ghost size="small" onClick={() => edit(row.id)}>
@ -148,6 +147,7 @@ function edit(id: string) {
size="small" size="small"
:flex-height="!appStore.isMobile" :flex-height="!appStore.isMobile"
:scroll-x="702" :scroll-x="702"
:bordered="true"
:loading="loading" :loading="loading"
remote remote
:row-key="row => row.id" :row-key="row => row.id"