@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.
@@ -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.8",
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",
@@ -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() {
@@ -270,7 +270,7 @@ module.exports = function (options) {
270
270
  priority: 100, // 优先级
271
271
  },
272
272
  utils: {
273
- test: /(lodash|dayjs|axios|kbone-api|fastclick)/,
273
+ test: /(lodash|dayjs|axios|kbone-api)/,
274
274
  chunks: 'all',
275
275
  priority: 100, // 优先级
276
276
  },