refactor: 重新生成单表和树表代码生成示例

This commit is contained in:
puhui999
2025-04-16 15:24:39 +08:00
parent 51d6e087cf
commit 0e3d3af66a
6 changed files with 63 additions and 54 deletions

View File

@@ -4,6 +4,7 @@ import type { Demo02CategoryApi } from '#/api/infra/demo/demo02';
import type { VxeTableGridOptions } from '@vben/plugins/vxe-table';
import { getDemo02CategoryList } from '#/api/infra/demo/demo02';
import { getRangePickerDefaultProps } from '#/utils/date';
import { handleTree } from '#/utils/tree';
import { useAccess } from '@vben/access';
@@ -82,8 +83,8 @@ export function useGridFormSchema(): VbenFormSchema[] {
label: '创建时间',
component: 'RangePicker',
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
// TODO @puhui999缺了你写的哪个时间选择哈
},
},
];
@@ -120,7 +121,7 @@ export function useGridColumns(
field: 'operation',
title: '操作',
minWidth: 200,
align: 'right',
align: 'center',
fixed: 'right',
headerAlign: 'center',
showOverflow: false,
@@ -133,7 +134,7 @@ export function useGridColumns(
name: 'CellOperation',
options: [
{
code: 'add_child', // TODO @puhui999append 使用这个单词哈,和之前 vben 官方示例一致
code: 'append',
text: '新增下级',
show: hasAccessByCodes(['infra:demo02-category:create']),
},