@mpxjs/core 2.7.50 → 2.7.56

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": "@mpxjs/core",
3
- "version": "2.7.50",
3
+ "version": "2.7.56",
4
4
  "description": "mpx runtime core",
5
5
  "keywords": [
6
6
  "miniprogram",
@@ -42,5 +42,5 @@
42
42
  "url": "https://github.com/didi/mpx/issues"
43
43
  },
44
44
  "sideEffects": false,
45
- "gitHead": "f1fe0f7381ee7e153b0eb7994f25ade5c9f4f0ef"
45
+ "gitHead": "ec0c4c8e63558622a0bd4cf4cf1ca5aafaae1499"
46
46
  }
@@ -1,10 +1,17 @@
1
1
  import { error } from '../helper/log'
2
2
 
3
+ const BEHAVIORS_MAP = [
4
+ 'wx://form-field',
5
+ 'wx://form-field-group',
6
+ 'wx://form-field-button',
7
+ 'wx://component-export'
8
+ ]
9
+
3
10
  export default {
4
11
  convert (options) {
5
12
  if (options.behaviors) {
6
13
  options.behaviors.forEach((behavior, idx) => {
7
- if (typeof behavior === 'string') {
14
+ if (BEHAVIORS_MAP.includes(behavior)) {
8
15
  error(`Built-in behavior "${behavior}" is not supported in tt environment!`, global.currentResource)
9
16
  options.behaviors.splice(idx, 1)
10
17
  }
@@ -52,7 +52,7 @@ export default function getRefsMixin () {
52
52
  selectorQuery.exec = function (originalCb = noop) {
53
53
  const cb = function (results) {
54
54
  results.forEach((item, index) => {
55
- cbs[index](item)
55
+ cbs[index] && cbs[index](item)
56
56
  })
57
57
  originalCb(results)
58
58
  }
package/src/vue.web.js CHANGED
@@ -1,3 +1,3 @@
1
- import vue from 'vue'
1
+ import Vue from 'vue'
2
2
 
3
- export default vue
3
+ export default Vue