fix: 搭建代码生成页面

This commit is contained in:
2025-05-13 16:34:31 +08:00
parent 14d70d05a8
commit 4eb2194415
6 changed files with 325 additions and 248 deletions

View File

@@ -4,21 +4,7 @@ import filedType from '#/util/json/filedType.json';
import formType from '#/util/json/formType.json';
import { getAdminList } from '#/views/system/admin/api';
interface RowType {
id: string;
nick_name: string;
email: string;
avatar: string;
roles: { name: string }[];
open_id: string;
code: string;
platform_id: string;
phone: string;
desc: string;
created_at: string;
}
export const gridOptions: VxeGridProps<RowType> = {
export const gridOptions: VxeGridProps = {
title: '时间字段由系统生成',
titleHelpMessage:
'创建时间:created_at 编辑时间:updated_at 删除时间:deleted_at',
@@ -70,19 +56,6 @@ export const gridOptions: VxeGridProps<RowType> = {
dataIndex: 'comment',
editRow: true,
},
// {
// title: '主键',
// tableTitleHelp: '表中该字段是否为主键',
// dataIndex: 'isKey',
// width: 80,
// editRow: true,
// editComponent: 'Switch',
// editComponentProps: {
// checkedChildren: '是',
// unCheckedChildren: '否',
// size: 'default',
// },
// },
{
title: '非空',
tableTitleHelp: '表中字段是否为必填',
@@ -203,140 +176,3 @@ export const gridOptions: VxeGridProps<RowType> = {
},
showOverflow: false,
};
// const columns: BasicColumn[] = [
// {
// title: '字段名称',
// tableTitleHelp: '表中字段名称,为英文开头,纯小写 多个单词下划线隔开',
// dataIndex: 'name',
// editRow: true,
// },
// {
// title: '字段类型',
// tableTitleHelp: '表中字段储存类型',
// dataIndex: 'type',
// editRow: true,
// editComponent: 'Select',
// editComponentProps: {
// options: filedType,
// showSearch: true,
// },
// },
// {
// title: '字段长度',
// tableTitleHelp: '表中字段储存类型长度',
// dataIndex: 'type_number',
// editRow: true,
// width: 100,
// },
// {
// title: '默认值',
// tableTitleHelp: '表中字段的默认值',
// dataIndex: 'default',
// editRow: true,
// width: 100,
// },
// {
// title: '备注',
// tableTitleHelp: '表中字段备注',
// dataIndex: 'comment',
// editRow: true,
// },
// // {
// // title: '主键',
// // tableTitleHelp: '表中该字段是否为主键',
// // dataIndex: 'isKey',
// // width: 80,
// // editRow: true,
// // editComponent: 'Switch',
// // editComponentProps: {
// // checkedChildren: '是',
// // unCheckedChildren: '否',
// // size: 'default',
// // },
// // },
// {
// title: '非空',
// tableTitleHelp: '表中字段是否为必填',
// dataIndex: 'null',
// width: 80,
// editRow: true,
// editComponent: 'Switch',
// editComponentProps: {
// checkedChildren: '是',
// unCheckedChildren: '否',
// size: 'default',
// },
// },
// {
// title: '表单',
// tableTitleHelp: '是否在表单中展示该字段',
// dataIndex: 'formShow',
// width: 80,
// editRow: true,
// editComponent: 'Switch',
// editComponentProps: {
// checkedChildren: '是',
// unCheckedChildren: '否',
// size: 'default',
// },
// },
// {
// title: '表格',
// tableTitleHelp: '是否在表格中展示该字段',
// dataIndex: 'tableShow',
// width: 80,
// editRow: true,
// editComponent: 'Switch',
// editComponentProps: {
// checkedChildren: '是',
// unCheckedChildren: '否',
// size: 'default',
// },
// },
// {
// title: '搜索',
// tableTitleHelp: '是否在表格中搜索该字段',
// dataIndex: 'search',
// width: 80,
// editRow: true,
// editComponent: 'Switch',
// editComponentProps: {
// checkedChildren: '是',
// unCheckedChildren: '否',
// size: 'default',
// },
// },
// {
// title: '搜索方式',
// tableTitleHelp: '是否在表格中搜索该字段',
// dataIndex: 'searchValue',
// editRow: true,
// editComponent: 'Select',
// editComponentProps: {
// options: [
// {
// label: '绝对查询',
// value: '=',
// },
// {
// label: '模糊查询',
// value: 'like',
// },
// ],
// size: 'default',
// },
// },
// {
// title: '表单类型',
// tableTitleHelp: '在表单中展示该字段的组件类型 如不在表单中展示则不填',
// dataIndex: 'formType',
// width: 250,
// editRow: true,
// editComponent: 'Select',
// editComponentProps: {
// options: formType,
// showSearch: true,
// },
// },
// ];