20260917165839

This commit is contained in:
oneao committed 2026-09-17 16:58:40 +08:00
1 parent 182ed86966
commit 38e1e66c3b
108 files changed
+2497 -1215

No files matched your search

@@ -46,10 +46,15 @@ describe('schemaModel:view/edit 配置 ↔ 编辑器草稿', () => {
expect(rows[1].b_group_id).toBe(outer.b_id)
expect(rows[2].b_group_id).toBe(inner.b_id)
expect(inner.b_parent_id).toBe(outer.b_id)
// 分组 id 即 JSON 节点 id(原数据缺 id 时按先序补齐)
expect(outer.b_id).toBe('group1')
expect(inner.b_id).toBe('group2')
const back = editorToSchema('view', rows, groups, schema)
const outerNode = back.columns.find((n) => n.type === 'group')
expect(outerNode.title).toBe('基本信息')
expect(outerNode.id).toBe('group1')
expect(outerNode.children[1].id).toBe('group2')
expect(outerNode.children.map((n) => n.field ?? n.title)).toEqual(['age', '扩展'])
// 列宽等已知属性保留
expect(back.columns.find((n) => n.field === 'name').width).toBe(120)