@dongmingzhixiu/vuexir-compiler 0.7.4 → 0.7.5

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.
@@ -1436,7 +1436,8 @@ function emitNodeInner(node, ctx, depth, loop, useParamModifier = false, parentS
1436
1436
  return out;
1437
1437
  }
1438
1438
  case 'button': {
1439
- const chain = modChain([...stretchModifiers(parentStretch, node), ...sizeModifiers(p, ctx), ...absM(p), ...clipModifiers(p), ...visualModifiers(p), ...borderModifiers(p), ...paddingModifiers(p), ...alphaArr, ...transformModifiers(p)], pad + ' ');
1439
+ const flex = p.flex !== undefined ? flexModifier(p, ctx) : '';
1440
+ const chain = modChain([...stretchModifiers(parentStretch, node), ...sizeModifiers(p, ctx), flex, ...absM(p), ...clipModifiers(p), ...visualModifiers(p), ...borderModifiers(p), ...paddingModifiers(p), ...alphaArr, ...transformModifiers(p)], pad + ' ');
1440
1441
  // R108:动态按钮文案(props.bind)优先;Kotlin 里用字符串模板插值
1441
1442
  const label = p.bind !== undefined ? String(p.bind) : (p.label ?? '');
1442
1443
  const click = kotlinClickAction(p, ctx, loop);
@@ -2369,9 +2369,9 @@ function walkElement(node, classProps, comboRules, scopedRules, pseudoRules, war
2369
2369
  mapping = { type: 'group' };
2370
2370
  if (mapping.type === 'text' && content.length === 0 && ['i', 'span', 'b'].includes(node.tag))
2371
2371
  mapping = { type: 'spacer' };
2372
- // R108:button 只接受 label/bind —— 布局属性丢弃、缺 label 时占位(避免整页失败)
2372
+ // R108:button 文案使用 label/bind,保留作为父容器子项的 flex。
2373
2373
  if (mapping.type === 'button') {
2374
- const badProps = ['flexDirection', 'justifyContent', 'alignItems', 'gap', 'flex', 'textAlign', 'lineHeight', 'lineHeightMultiplier', 'overflow', 'clip'];
2374
+ const badProps = ['flexDirection', 'justifyContent', 'alignItems', 'gap', 'textAlign', 'lineHeight', 'lineHeightMultiplier', 'overflow', 'clip'];
2375
2375
  for (const k of badProps)
2376
2376
  delete props[k];
2377
2377
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dongmingzhixiu/vuexir-compiler",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "description": "Vue SFC → IR → 原生源码(SwiftUI / Compose)编译器核心:纯函数、零 IO",
5
5
  "type": "module",
6
6
  "license": "MIT",