@mybricks/to-code-taro 1.1.6 → 1.1.7

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.
@@ -290,13 +290,17 @@ var getNextCode = (props, config, isSameScope, event) => {
290
290
  return `const ${componentNameWithId}_${sanitizedPinId}_result: any = `;
291
291
  };
292
292
  function getFrameInputValueExpr(meta, config, event) {
293
- var _a, _b, _c;
293
+ var _a, _b, _c, _d;
294
294
  const scene = (_a = config.getCurrentScene) == null ? void 0 : _a.call(config);
295
295
  const inputPinId = ((_b = meta == null ? void 0 : meta.inputs) == null ? void 0 : _b[0]) || "getCurValue";
296
296
  const proxyKey = `${meta == null ? void 0 : meta.id}-${inputPinId}`;
297
297
  const pinProxy = (_c = scene == null ? void 0 : scene.pinValueProxies) == null ? void 0 : _c[proxyKey];
298
298
  const pinId = pinProxy == null ? void 0 : pinProxy.pinId;
299
299
  if (typeof pinId === "string" && pinId) {
300
+ const paramsMap = (_d = config.getParams) == null ? void 0 : _d.call(config);
301
+ if (paramsMap == null ? void 0 : paramsMap[pinId]) {
302
+ return paramsMap[pinId];
303
+ }
300
304
  return `params?.inputValues?.[${JSON.stringify(pinId)}]`;
301
305
  }
302
306
  }
@@ -66,7 +66,7 @@ ${indent2}component={${componentName}}`;
66
66
  ui += `
67
67
  ${indent2}id='${meta.id}'`;
68
68
  ui += `
69
- ${indent2}className='${meta.id} mybricks_com'`;
69
+ ${indent2}className='mybricks_com ${meta.id}'`;
70
70
  if (meta.name) {
71
71
  ui += `
72
72
  ${indent2}name='${meta.name}'`;
@@ -121,11 +121,7 @@ var RenderManager = class {
121
121
  code += `${indent}${indent3}params?.wrap?.(descriptors)
122
122
  `;
123
123
  } else {
124
- code += `${indent}${indent3}<>
125
- `;
126
124
  code += modifiedRenderCode.split("\n").map((line) => `${indent}${indent2}${line}`).join("\n") + "\n";
127
- code += `${indent}${indent3}</>
128
- `;
129
125
  }
130
126
  code += `${indent}${indent2});
131
127
  `;
@@ -75,11 +75,11 @@ function ${componentName}() {
75
75
  ${combinedJsCode}
76
76
  return (
77
77
  <PageScopeContext.Provider value={pageScopeRef}>
78
- <>
79
- ${uiResult.split("\n").map((line) => ` ${line}`).join("\n")}
78
+ ` + (hasPopups ? ` <>
79
+ ` : "") + `${uiResult.split("\n").map((line) => ` ${line}`).join("\n")}
80
80
  ` + (hasPopups ? ` <PopupRenderer popupMap={POPUP_MAP} />
81
- ` : "") + ` </>
82
- </PageScopeContext.Provider>
81
+ ` : "") + (hasPopups ? ` </>
82
+ ` : "") + ` </PageScopeContext.Provider>
83
83
  );
84
84
  }
85
85
 
@@ -36,7 +36,6 @@ export function updateAppConfig(appConfigFile, normalItems, items) {
36
36
  if (entryPagePath) {
37
37
  content.entryPagePath = entryPagePath;
38
38
  }
39
- content.window = content.window || {};
40
39
 
41
40
  // 添加 TabBar 配置(从 items 中读取)
42
41
  var tabBarConfigItem = items.find(function (item) {
@@ -44,7 +43,7 @@ export function updateAppConfig(appConfigFile, normalItems, items) {
44
43
  });
45
44
  if (tabBarConfigItem !== null && tabBarConfigItem !== void 0 && tabBarConfigItem.content) {
46
45
  var tabBar = parseLooseObject("{".concat(tabBarConfigItem.content, "}"));
47
- Object.assign(content.window, tabBar);
46
+ Object.assign(content, tabBar);
48
47
  }
49
48
  appConfigFile.content = "export default defineAppConfig(".concat(JSON.stringify(content, null, 2), ")");
50
49
  }
@@ -159,7 +159,7 @@ var generateSlotUi = function generateSlotUi(ui, props, childrenUi, childrenResu
159
159
  // 插槽根容器增强:加上可读的标识,便于用户定位/调试
160
160
  // - className: slot-<parentComId>
161
161
  var parentComId = config === null || config === void 0 ? void 0 : config.parentComId;
162
- var slotMarkClass = parentComId ? "slot-".concat(parentComId) : "";
162
+ var slotMarkClass = parentComId ? "mybricks_slot slot-".concat(parentComId) : "";
163
163
  var classNameStr = [rootClassName, slotMarkClass].filter(Boolean).join(" ");
164
164
  var classNameAttr = classNameStr ? " className='".concat(classNameStr, "'") : "";
165
165