@cloudbase/lowcode-builder 1.3.15-private.3 → 1.4.0
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/lib/builder/mp/util.js
CHANGED
|
@@ -200,8 +200,10 @@ function generateDataContainerListeners() {
|
|
|
200
200
|
{
|
|
201
201
|
trigger: 'onDataChange',
|
|
202
202
|
jsCode: `({event})=>{
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
if(event.currentTarget) {
|
|
204
|
+
app.utils.set(event.currentTarget._scope, 'dataContext.data', event?.detail?.data);
|
|
205
|
+
app.utils.set(event.currentTarget._scope, 'dataContext.state', event?.detail?.state);
|
|
206
|
+
}
|
|
205
207
|
}`,
|
|
206
208
|
type: weapps_core_1.ActionType.Inline,
|
|
207
209
|
data: {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/lowcode-builder",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
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",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@cloudbase/cals": "^0.5.12",
|
|
42
|
-
"@cloudbase/lowcode-generator": "1.
|
|
42
|
+
"@cloudbase/lowcode-generator": "^1.4.0",
|
|
43
43
|
"axios": "^0.21.0",
|
|
44
44
|
"browserfs": "^1.4.3",
|
|
45
45
|
"browserify-zlib": "^0.2.0",
|
|
@@ -475,7 +475,7 @@
|
|
|
475
475
|
crossorigin
|
|
476
476
|
src="<%=
|
|
477
477
|
cdnEndpoints.cdngo
|
|
478
|
-
%>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.
|
|
478
|
+
%>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.da139663b6611f478d6a.bundle.js"
|
|
479
479
|
></script>
|
|
480
480
|
</body>
|
|
481
481
|
</html>
|
|
@@ -33,11 +33,13 @@ export function generateDataContext(widget) {
|
|
|
33
33
|
while (widget?._scope) {
|
|
34
34
|
const current = widget;
|
|
35
35
|
// 此处采用代理的方式,是为了可以获取到最新的 _scope.dataContext 防止 dataContext 引用被重新赋值
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
if(current?._scope?.id){
|
|
37
|
+
Object.defineProperty(dataContext, current._scope.id, {
|
|
38
|
+
get() {
|
|
39
|
+
return current?._scope?.dataContext;
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
41
43
|
widget = widget.parent;
|
|
42
44
|
}
|
|
43
45
|
return dataContext;
|
|
@@ -790,14 +790,28 @@ class UserWidget {
|
|
|
790
790
|
}
|
|
791
791
|
|
|
792
792
|
get custom() {
|
|
793
|
-
const
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
793
|
+
const instance = this._widget._getInstanceRef?.()?.current || {};
|
|
794
|
+
const userCustomMember = untracked(() => {
|
|
795
|
+
const { methods = {}, ...restInstance } = instance;
|
|
796
|
+
return new Proxy(
|
|
797
|
+
{
|
|
798
|
+
...this._widget._methods,
|
|
799
|
+
...restInstance,
|
|
800
|
+
...methods,
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
get(_, prop) {
|
|
804
|
+
if (prop in methods) {
|
|
805
|
+
return methods[prop];
|
|
806
|
+
}
|
|
807
|
+
if (prop !== 'methods' && prop in instance) {
|
|
808
|
+
return instance[prop];
|
|
809
|
+
}
|
|
810
|
+
return this._widget._methods?.[prop];
|
|
811
|
+
},
|
|
812
|
+
},
|
|
813
|
+
);
|
|
814
|
+
});
|
|
801
815
|
return userCustomMember;
|
|
802
816
|
}
|
|
803
817
|
}
|