@cloudbase/lowcode-builder 0.1.5-mpbeta.3 → 0.1.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.
@@ -107,7 +107,7 @@ function generateWxml(widgets, docTag, wxmlDataPrefix, ctx, usingComponents, com
107
107
  }
108
108
  const attrPrefix = `${wxmlDataPrefix.widgetProp}${id}${curForNodes
109
109
  .map((forNodeId) => `[${wxmlDataPrefix.forIndex}${forNodeId}]`)
110
- .join('')}`;
110
+ .join('')}.`;
111
111
  const idAttr = curForNodes.length < 1
112
112
  ? id
113
113
  : `{{'${id}'${curForNodes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/lowcode-builder",
3
- "version": "0.1.5-mpbeta.3",
3
+ "version": "0.1.5",
4
4
  "description": "云开发 Tencent CloudBase Framework Low Code Plugin,将低码配置生成完整项目并一键部署云开发资源。",
5
5
  "author": "yhsunshining@gmail.com",
6
6
  "homepage": "https://github.com/TencentCloudBase/cloudbase-framework#readme",
@@ -23,7 +23,7 @@ const evtListeners = {<% Object.entries(eventHandlers).map(([handlerName, listen
23
23
  handler: <% if (l.type == 'rematch') {%> _handler<%= l.handler %> <%} else if (l.type === 'inline') {%> function({event, lists, forItems, $context}, $comp){ <%= l.handler %> } <%} else {%> <%= l.handler %> <%} %>,
24
24
  data: <%= stringifyObj(l.data, {depth: null}) %>,
25
25
  boundData: {<% Object.entries(l.boundData).map(([prop, expr])=>{%>'<%= prop %>':($comp, lists, forItems, event, $context) => {const $for=forItems;return (
26
- <%= expr %>
26
+ <%= expr === '' ? 'undefined': expr %>
27
27
  )},
28
28
  <%}) %>}
29
29
  },<%})%>
@@ -53,7 +53,7 @@ const handler = {<% handlers.forEach(h => {%>
53
53
  const dataBinds = {<% Object.entries(dataBinds).map(([id, widgetBinds])=>{%>
54
54
  <%= id %>: { <% Object.entries(widgetBinds).map(([prop, expr]) => { %>
55
55
  <%= prop %>: function ($comp, lists, forItems, event, $context) {const $for=forItems; return (
56
- <%= expr %>
56
+ <%= expr === '' ? 'undefined': expr %>
57
57
  ); },<% }) %>
58
58
  },<%}) %>
59
59
  }
@@ -21,7 +21,7 @@ const evtListeners = {<% Object.entries(eventHanlders).map(([handlerName, listen
21
21
  handler: <% if (l.type === 'rematch') {%> handlers.<%= l.handler %> <%} else if (l.type == 'material') {%> function(...args) { return require('../../materials/<%= l.handlerModule %>/actions/<%= l.handler %>/index').default(...args) } <%} else if (l.type == 'inline') {%> function({event, lists, forItems, $context}, $page){const $for = forItems; return <%= l.handler %> } <%} else {%> <%= l.handler %> <%} %>,
22
22
  data: <%= stringifyObj(l.data, {depth: null}) %>,
23
23
  boundData: {<% Object.entries(l.boundData).map(([prop, expr])=>{%>'<%= prop %>':($page, lists, forItems, event, $context) => {const $for = forItems; return (
24
- <%= expr %>
24
+ <%= expr === '' ? 'undefined': expr %>
25
25
  )},
26
26
  <%}) %>}
27
27
  },<%})%>
@@ -30,7 +30,7 @@ const evtListeners = {<% Object.entries(eventHanlders).map(([handlerName, listen
30
30
  const dataBinds = {<% Object.entries(dataBinds).map(([id, widgetBinds])=>{%>
31
31
  <%= id %>: { <% Object.entries(widgetBinds).map(([prop, expr]) => { %>
32
32
  <%= prop %>: function ($page, lists, forItems, event, $context) {const $for = forItems; return (
33
- <%= expr %>
33
+ <%= expr === '' ? 'undefined': expr %>
34
34
  ); },<% }) %>
35
35
  },<%}) %>
36
36
  }