@dcloudio/uni-quickapp-webview 3.0.0-alpha-3021320211115001 → 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.
- package/dist/uni.compiler.js +0 -3
- package/dist/uni.mp.esm.js +17 -14
- package/package.json +5 -5
- package/src/compiler/options.ts +0 -3
- package/tsconfig.json +1 -0
package/dist/uni.compiler.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var uniCliShared = require('@dcloudio/uni-cli-shared');
|
|
4
4
|
var initMiniProgramPlugin = require('@dcloudio/uni-mp-vite');
|
|
5
5
|
var path = require('path');
|
|
6
|
-
var uniShared = require('@dcloudio/uni-shared');
|
|
7
6
|
var shared = require('@vue/shared');
|
|
8
7
|
|
|
9
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -57,8 +56,6 @@ function formatAppJson(_appJson, manifestJson, _pagesJson) {
|
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
const compilerOptions = {
|
|
60
|
-
isNativeTag: uniShared.isNativeTag,
|
|
61
|
-
isCustomElement: uniShared.isCustomElement,
|
|
62
59
|
nodeTransforms: [uniCliShared.transformRef, uniCliShared.transformComponentLink],
|
|
63
60
|
};
|
|
64
61
|
const miniProgram = {
|
package/dist/uni.mp.esm.js
CHANGED
|
@@ -491,6 +491,16 @@ function initRefs(instance, mpInstance) {
|
|
|
491
491
|
return $refs;
|
|
492
492
|
},
|
|
493
493
|
});
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* @param properties
|
|
497
|
+
*/
|
|
498
|
+
function fixProperties(properties) {
|
|
499
|
+
Object.keys(properties).forEach((name) => {
|
|
500
|
+
if (properties[name] === null) {
|
|
501
|
+
properties[name] = undefined;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
494
504
|
}
|
|
495
505
|
|
|
496
506
|
const PROP_TYPES = [String, Number, Boolean, Object, Array, null];
|
|
@@ -886,6 +896,13 @@ function initLifetimes$1({ mocks, isPage, initRelation, vueOptions, }) {
|
|
|
886
896
|
if (mpType === 'page' && !mpInstance.route && mpInstance.__route__) {
|
|
887
897
|
mpInstance.route = mpInstance.__route__;
|
|
888
898
|
}
|
|
899
|
+
// 字节跳动小程序 properties
|
|
900
|
+
// 父组件在 attached 中 setData 设置了子组件的 props,在子组件的 attached 中,并不能立刻拿到
|
|
901
|
+
// 此时子组件的 properties 中获取到的值,除了一部分初始化就有的值,只要在模板上绑定了,动态设置的 prop 的值均会根据类型返回,不会应用 prop 自己的默认值
|
|
902
|
+
// 举例: easyinput 的 styles 属性,类型为 Object,`<easyinput :styles="styles"/>` 在 attached 中 styles 的值为 null
|
|
903
|
+
// 目前 null 值会影响 render 函数执行,临时解决方案,调整 properties 中的 null 值为 undefined,让 Vue 来补充为默认值
|
|
904
|
+
// 已知的其他隐患,当使用默认值时,可能组件行为不正确,比如 countdown 组件,默认值是0,导致直接就触发了 timeup 事件,这个应该是组件自身做处理?
|
|
905
|
+
// 难道要等父组件首次 setData 完成后,再去执行子组件的初始化?
|
|
889
906
|
fixProperties(properties);
|
|
890
907
|
this.$vm = $createComponent({
|
|
891
908
|
type: vueOptions,
|
|
@@ -910,20 +927,6 @@ function initLifetimes$1({ mocks, isPage, initRelation, vueOptions, }) {
|
|
|
910
927
|
{
|
|
911
928
|
return { attached, detached };
|
|
912
929
|
}
|
|
913
|
-
}
|
|
914
|
-
function fixProperties(properties) {
|
|
915
|
-
// 字节跳动小程序 properties
|
|
916
|
-
// 父组件在 attached 中 setData 设置了子组件的 props,在子组件的 attached 中,并不能立刻拿到
|
|
917
|
-
// 此时子组件的 properties 中获取到的值,除了一部分初始化就有的值,只要在模板上绑定了,动态设置的 prop 的值均会根据类型返回,不会应用 prop 自己的默认值
|
|
918
|
-
// 举例: easyinput 的 styles 属性,类型为 Object,`<easyinput :styles="styles"/>` 在 attached 中 styles 的值为 null
|
|
919
|
-
// 目前 null 值会影响 render 函数执行,临时解决方案,调整 properties 中的 null 值为 undefined,让 Vue 来补充为默认值
|
|
920
|
-
// 已知的其他隐患,当使用默认值时,可能组件行为不正确,比如 countdown 组件,默认值是0,导致直接就触发了 timeup 事件,这个应该是组件自身做处理?
|
|
921
|
-
// 难道要等父组件首次 setData 完成后,再去执行子组件的初始化?
|
|
922
|
-
Object.keys(properties).forEach((name) => {
|
|
923
|
-
if (properties[name] === null) {
|
|
924
|
-
properties[name] = undefined;
|
|
925
|
-
}
|
|
926
|
-
});
|
|
927
930
|
}
|
|
928
931
|
|
|
929
932
|
const instances = Object.create(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-quickapp-webview",
|
|
3
|
-
"version": "3.0.0-alpha-
|
|
3
|
+
"version": "3.0.0-alpha-3021320211117004",
|
|
4
4
|
"description": "uni-app quickapp-webview",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"@vue/compiler-core": "3.2.22"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@dcloudio/uni-cli-shared": "3.0.0-alpha-
|
|
29
|
-
"@dcloudio/uni-mp-vite": "3.0.0-alpha-
|
|
30
|
-
"@dcloudio/uni-mp-vue": "3.0.0-alpha-
|
|
31
|
-
"@dcloudio/uni-shared": "3.0.0-alpha-
|
|
28
|
+
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3021320211117004",
|
|
29
|
+
"@dcloudio/uni-mp-vite": "3.0.0-alpha-3021320211117004",
|
|
30
|
+
"@dcloudio/uni-mp-vue": "3.0.0-alpha-3021320211117004",
|
|
31
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-3021320211117004",
|
|
32
32
|
"@vue/shared": "3.2.22"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/compiler/options.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import path from 'path'
|
|
2
2
|
import type { CompilerOptions } from '@vue/compiler-core'
|
|
3
|
-
import { isNativeTag, isCustomElement } from '@dcloudio/uni-shared'
|
|
4
3
|
import {
|
|
5
4
|
MiniProgramCompilerOptions,
|
|
6
5
|
transformComponentLink,
|
|
@@ -12,8 +11,6 @@ import source from './jsconfig.json'
|
|
|
12
11
|
import { formatAppJson } from './utils'
|
|
13
12
|
|
|
14
13
|
export const compilerOptions: CompilerOptions = {
|
|
15
|
-
isNativeTag,
|
|
16
|
-
isCustomElement,
|
|
17
14
|
nodeTransforms: [transformRef, transformComponentLink],
|
|
18
15
|
}
|
|
19
16
|
|