@cloudbase/lowcode-builder 0.1.22 → 0.1.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/lowcode-builder",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
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",
@@ -5,7 +5,7 @@ import mergeRenderer from './merge-renderer'
5
5
  import { runWatchers } from './watch'
6
6
  import sdk from './weapp-sdk'
7
7
  import lodashGet from 'lodash.get';
8
-
8
+ import { resolveWidgetData } from './widget';
9
9
 
10
10
  /**
11
11
  * Lowcodes of all components
@@ -13,7 +13,11 @@ import lodashGet from 'lodash.get';
13
13
  export const compLowcodes = {}
14
14
 
15
15
  export function createComponent(key, behaviors, properties, events, handler, dataBinds, evtListeners, widgetProps, index, lifeCycle, stateFn, computedFuncs, config, libCommonRes, undefined, context) {
16
-
16
+ const initData = {};
17
+ for (const id in widgetProps) {
18
+ const props = widgetProps[id]
19
+ initData['' + id] = resolveWidgetData(props)
20
+ }
17
21
  compLowcodes[key] = {
18
22
  index,
19
23
  stateFn,
@@ -45,7 +49,7 @@ export function createComponent(key, behaviors, properties, events, handler, dat
45
49
  ...properties,
46
50
  },
47
51
 
48
- data: {},
52
+ data: initData,
49
53
 
50
54
  lifetimes: {
51
55
  created() {