Files
xk-admin/apps/web-antd/src/views/system/base-config/config/table.ts
李琦 f0a33a628b feat:
1. 更新框架
2. 修复框架更新后导致的问题
2026-08-10 18:44:39 +08:00

67 lines
1.6 KiB
TypeScript

import type { VxeGridProps } from '#/adapter/vxe-table';
import { getBaseConfigList } from '#/views/system/base-config/api';
interface RowType {
id: string;
name: string;
logo: string;
introduce: string;
created_at: string;
}
export const gridOptions: VxeGridProps<RowType> = {
checkboxConfig: {
highlight: true,
labelField: '',
},
columnConfig: {
useKey: true,
},
rowConfig: {
useKey: true,
},
columns: [
{ field: 'id', align: 'left', title: 'ID', width: 100 },
{ field: 'desc', align: 'left', title: '协议名称' },
// { field: 'content', title: '协议介绍', slots: { default: 'content' } },
{ field: 'end_txt', title: '协议端口' },
{ field: 'created_at', title: '创建时间' },
{ type: 'html', title: '操作', slots: { default: 'action' } },
],
keepSource: true,
pagerConfig: {},
proxyConfig: {
ajax: {
// 请求后端接口方法
query: async ({ page }, formValues) => {
return await getBaseConfigList({
page: page.currentPage,
pageSize: page.pageSize,
...formValues,
});
},
},
},
height: 'auto',
border: false,
toolbarConfig: {
// 是否显示搜索表单控制按钮
// @ts-ignore 正式环境时有完整的类型声明
search: true,
refresh: true, // 刷新
print: false, // 打印
export: false, // 导出
// custom: true, // 自定义列
zoom: true, // 最大化最小化
slots: {
buttons: 'toolbar-actions',
},
custom: {
// 自定义列-图标
icon: 'vxe-icon-menu',
},
},
showOverflow: false,
};