@cloudbase/framework-plugin-low-code 0.7.8-beta.1 → 0.7.10-beta.2
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/service/builder/generate.d.ts.map +1 -1
- package/lib/builder/service/builder/generate.js +4 -0
- package/lib/builder/util/common.d.ts +1 -0
- package/lib/builder/util/common.d.ts.map +1 -1
- package/lib/builder/util/common.js +25 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +38 -73
- package/package.json +1 -1
- package/template/html/index.html.ejs +420 -428
- package/template/package.json +1 -2
- package/template/src/index.jsx +0 -2
- package/template/src/utils/index.js +17 -2
- package/template/webpack/web.prod.js +1 -1
package/template/package.json
CHANGED
|
@@ -6,11 +6,10 @@
|
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@cloudbase/js-sdk": "2.4.0-alpha.0",
|
|
9
|
-
"@cloudbase/weda-cloud-sdk": "1.0.
|
|
9
|
+
"@cloudbase/weda-cloud-sdk": "1.0.10",
|
|
10
10
|
"@tcwd/weapps-core": "2.2.6",
|
|
11
11
|
"@tcwd/weapps-sdk": "1.2.9",
|
|
12
12
|
"@zxing/library": "^0.18.6",
|
|
13
|
-
"fastclick": "^1.0.6",
|
|
14
13
|
"lodash": "^4.17.19",
|
|
15
14
|
"mobx": "^5.15.4",
|
|
16
15
|
"mobx-react-lite": "^2.0.7",
|
package/template/src/index.jsx
CHANGED
|
@@ -8,7 +8,6 @@ import './index.less'
|
|
|
8
8
|
import './datasources'
|
|
9
9
|
import { initGlobalVar } from './handlers/initWebEnv'
|
|
10
10
|
import '@babel/polyfill/noConflict'
|
|
11
|
-
import attachFastClick from 'fastclick'
|
|
12
11
|
import { initWebConfig } from 'handlers/lifecycle'
|
|
13
12
|
const AppConfig = require('../webpack/miniprogram.config')
|
|
14
13
|
import { app } from './app/global-api'
|
|
@@ -139,7 +138,6 @@ function render(props){
|
|
|
139
138
|
|
|
140
139
|
// if (!process.env.isAdminPortal) {
|
|
141
140
|
if (!window.__POWERED_BY_QIANKUN__) {
|
|
142
|
-
attachFastClick && attachFastClick.attach && attachFastClick.attach(document.body)
|
|
143
141
|
render()
|
|
144
142
|
}
|
|
145
143
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { get as lodashGet, set as lodashSet } from 'lodash';
|
|
2
2
|
|
|
3
|
+
const componentsInfoMap = <%= componentsInfoMap %>;
|
|
4
|
+
|
|
3
5
|
export function createComputed(funcs, bindContext = null) {
|
|
4
6
|
const obj = {};
|
|
5
7
|
for (const name in funcs) {
|
|
@@ -54,11 +56,24 @@ const SCOPE_SLOT_MAP = SCOPE_SLOT_COMPONENT_LIB.reduce((map, lib) => {
|
|
|
54
56
|
return map;
|
|
55
57
|
}, {});
|
|
56
58
|
|
|
57
|
-
export function isScopeSlot(comp, slot) {
|
|
59
|
+
export function isScopeSlot(comp, slot, context={componentsInfoMap}) {
|
|
58
60
|
const { 'x-props': xProps } = comp;
|
|
59
61
|
const sourceKey = xProps && xProps.sourceKey;
|
|
62
|
+
|
|
63
|
+
let hasXslotScope = false;
|
|
64
|
+
try {
|
|
65
|
+
const component = context?.componentsInfoMap?.[sourceKey];
|
|
66
|
+
const dataForm = component?.dataForm || component?.data?.properties;
|
|
67
|
+
if (typeof dataForm === 'object') {
|
|
68
|
+
hasXslotScope = Object.keys(dataForm).some(
|
|
69
|
+
(prop) =>
|
|
70
|
+
slot.startsWith(`${prop}_`) && dataForm[prop]?.['x-slot-scope']
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
} catch (e) {}
|
|
74
|
+
|
|
60
75
|
const map = SCOPE_SLOT_MAP[sourceKey];
|
|
61
|
-
return map && map[slot];
|
|
76
|
+
return hasXslotScope || (map && map[slot]);
|
|
62
77
|
}
|
|
63
78
|
|
|
64
79
|
export function _isMobile() {
|