@dcloudio/uni-mp-qq 3.0.0-alpha-3021320211117003 → 3.0.0-alpha-3021320211117004

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.
Files changed (2) hide show
  1. package/dist/uni.mp.esm.js +12 -0
  2. package/package.json +6 -6
@@ -510,6 +510,16 @@ function findVmByVueId(instance, vuePid) {
510
510
  return parentVm;
511
511
  }
512
512
  }
513
+ }
514
+ /**
515
+ * @param properties
516
+ */
517
+ function fixProperties(properties) {
518
+ Object.keys(properties).forEach((name) => {
519
+ if (properties[name] === null) {
520
+ properties[name] = undefined;
521
+ }
522
+ });
513
523
  }
514
524
 
515
525
  const PROP_TYPES = [String, Number, Boolean, Object, Array, null];
@@ -820,6 +830,8 @@ function initLifetimes({ mocks, isPage, initRelation, vueOptions, }) {
820
830
  // 初始化 vue 实例
821
831
  const mpInstance = this;
822
832
  const isMiniProgramPage = isPage(mpInstance);
833
+ // 微信小程序 properties 为了解决警告问题,目前所有 type 都默认为 null,故导致部分 prop 默认值初始化不正确,故将 null 值 替换为 undefined
834
+ fixProperties(properties);
823
835
  this.$vm = $createComponent({
824
836
  type: vueOptions,
825
837
  props: properties,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-mp-qq",
3
- "version": "3.0.0-alpha-3021320211117003",
3
+ "version": "3.0.0-alpha-3021320211117004",
4
4
  "description": "uni-app mp-qq",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -22,14 +22,14 @@
22
22
  },
23
23
  "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
24
24
  "devDependencies": {
25
- "@dcloudio/uni-mp-weixin": "3.0.0-alpha-3021320211117003",
25
+ "@dcloudio/uni-mp-weixin": "3.0.0-alpha-3021320211117004",
26
26
  "@vue/compiler-core": "3.2.22"
27
27
  },
28
28
  "dependencies": {
29
- "@dcloudio/uni-cli-shared": "3.0.0-alpha-3021320211117003",
30
- "@dcloudio/uni-mp-vite": "3.0.0-alpha-3021320211117003",
31
- "@dcloudio/uni-mp-vue": "3.0.0-alpha-3021320211117003",
32
- "@dcloudio/uni-shared": "3.0.0-alpha-3021320211117003",
29
+ "@dcloudio/uni-cli-shared": "3.0.0-alpha-3021320211117004",
30
+ "@dcloudio/uni-mp-vite": "3.0.0-alpha-3021320211117004",
31
+ "@dcloudio/uni-mp-vue": "3.0.0-alpha-3021320211117004",
32
+ "@dcloudio/uni-shared": "3.0.0-alpha-3021320211117004",
33
33
  "fs-extra": "^10.0.0"
34
34
  }
35
35
  }