统一平台资源中文展示并修复模拟订单状态

This commit is contained in:
czl231
2026-08-15 22:06:42 +08:00
parent a20e228296
commit a663821853
24 changed files with 1048 additions and 175 deletions

View File

@@ -1,6 +1,6 @@
/**
* 功能:静态检查资源详情关联表中的设备参数可完整查看且不会撑宽表格。
* 版本v1.1.0
* 版本v1.2.0
*/
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
@@ -10,11 +10,11 @@ const detail = readFileSync(
'utf8',
);
assert.match(detail, /isCollectionJsonColumn\(column\)/, '关联表 JSON 字段缺少专用展示分支');
assert.match(detail, /isCollectionJsonField\(definition\.name, collection\.key, column\)/, '关联表 JSON 字段缺少专用展示分支');
assert.match(detail, />查看参数<\/a-button>/, '设备参数缺少完整查看入口');
assert.match(detail, /formatCollectionJson\(record\[column\]\)/, '设备参数没有格式化完整内容');
assert.match(detail, /JSON\.stringify\(JSON\.parse\(text\), null, 2\)/, '字符串 JSON 未格式化');
assert.match(detail, /isCollectionJsonColumn\(column\)\) return 100/, '设备参数列未使用紧凑宽度');
assert.match(detail, /isCollectionJsonField\(props\.definition\.name, collectionKey, column\)/, '设备参数列未使用契约化紧凑宽度');
assert.match(detail, /max-width: min\(560px, 70vw\)/, '参数浮层缺少视口宽度限制');
assert.match(detail, /class="collection-table-shell"/, '关联表缺少独立宽度约束容器');
assert.match(detail, /\.detail-stack[\s\S]*?min-width: 0;/, '详情栈仍可能被子内容反向撑宽');