20260915221013

This commit is contained in:
oneao committed 2026-09-15 22:10:13 +08:00
1 parent 1f56cc3efb
commit dce29f250e
54 files changed
+3732 -574

No files matched your search

@@ -118,4 +118,19 @@ describe('ModuleFieldsPanel 参与勾选', () => {
expect('__query' in stripped).toBe(false)
wrapper.unmount()
})
/**
* 回归点:b_i18n 是派生值(field.{模块编码}.{字段名}),加载阶段不得自动补齐。
* 补了会让草稿与基线不一致,表现为「打开模块什么都没改,切换节点却提示有未保存的修改」。
* 它只在用户编辑(onCellChange)与父级保存前(beforeSave)物化。
*/
it('模块加载后不自动派生 b_i18n,草稿保持与库中一致', async () => {
setActivePinia(createPinia())
const { wrapper, localFields } = mountPanel()
await settle()
expect(localFields[0].b_i18n).toBeNull()
expect(localFields[1].b_i18n).toBeNull()
expect(wrapper.emitted('update:modelValue')).toBeUndefined()
wrapper.unmount()
})
})