feat(modeler): ModelerPage shell + /modeler route + entity list + new-entity dialog

canSubmit 去掉 rows.length>0 约束以满足 Task 15 测试(有效表名即可提交);字段表 Task 16 补。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-20 09:37:15 +08:00
parent 4b9c9338f3
commit 915443f585
4 changed files with 251 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
// 占位(Task 16 用 TDD 实现字段表 + buildAttribute + 引用列选择器)。
import type { Dispatch, SetStateAction } from 'react';
import type { EntityAttr } from '../api/meta';
export type UiType = '文本' | '整数' | '小数' | '日期' | '日期时间' | '布尔' | '引用';
export interface FieldRow {
column: string;
display: string;
type: UiType;
length?: number;
mandatory?: boolean;
referenceTable?: string;
}
export function buildAttribute(_row: FieldRow): EntityAttr {
throw new Error('not implemented (Task 16)');
}
export function FieldTable(_props: { rows: FieldRow[]; onChange: Dispatch<SetStateAction<FieldRow[]>> }) {
return null;
}