@dongmingzhixiu/vuexir-compiler 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codegen/swiftui.js +7 -1
- package/package.json +1 -1
package/dist/codegen/swiftui.js
CHANGED
|
@@ -921,7 +921,13 @@ function emitNodeInner(node, ctx) {
|
|
|
921
921
|
// 布尔 state → String(describing:)(Text(Bool) 无构造匹配,typecheck 失败)
|
|
922
922
|
? pad(`Text(String(describing: ${bindKey}))`)
|
|
923
923
|
: pad(`Text(${bindKey})`)
|
|
924
|
-
: pad(
|
|
924
|
+
: pad((() => {
|
|
925
|
+
if (/^_vrn/.test(String(content).trim())) {
|
|
926
|
+
ctx.warnings.push(`${ctx.path}: 文本内容「${content}」像是内部状态名 → 已置空(R134)`);
|
|
927
|
+
return 'Text("")';
|
|
928
|
+
}
|
|
929
|
+
return `Text("${swiftStringEscape(content)}")`;
|
|
930
|
+
})());
|
|
925
931
|
line += `.font(${fontExpr(fs, props.fontWeight, 'normal')})`;
|
|
926
932
|
// M2 :style 动态 → 运行时从 state 读取(fontSize 数值 / color hex 字符串)
|
|
927
933
|
if (props.fontSizeDynamic !== undefined) {
|