cloud-web-corejs 1.0.54-dev.760 → 1.0.54-dev.761
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,14 +1,27 @@
|
|
|
1
1
|
/**version-1.1*/
|
|
2
2
|
let modules = {};
|
|
3
3
|
|
|
4
|
+
function getVNodeValue(vnode, name) {
|
|
5
|
+
let propsData = vnode && vnode.componentOptions && vnode.componentOptions.propsData;
|
|
6
|
+
if (propsData && Object.prototype.hasOwnProperty.call(propsData, name)) {
|
|
7
|
+
return propsData[name];
|
|
8
|
+
}
|
|
9
|
+
let attrs = vnode && vnode.data && vnode.data.attrs;
|
|
10
|
+
if (attrs && Object.prototype.hasOwnProperty.call(attrs, name)) {
|
|
11
|
+
return attrs[name];
|
|
12
|
+
}
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
4
16
|
function resolveConfig(binding, vnode) {
|
|
5
17
|
let scale = binding.value != null && binding.value !== "" ? Number(binding.value) : 2;
|
|
6
18
|
if (isNaN(scale) || scale < 0) {
|
|
7
19
|
scale = 2;
|
|
8
20
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
let
|
|
21
|
+
// componentUpdated 在父组件的 patch 期间执行。此处如果读取 componentInstance
|
|
22
|
+
// 的响应式属性,会让父组件错误订阅子组件,最终形成无限更新循环。
|
|
23
|
+
let min = getVNodeValue(vnode, "min");
|
|
24
|
+
let negative = getVNodeValue(vnode, "negative");
|
|
12
25
|
negative = negative == "true" || negative == true;
|
|
13
26
|
|
|
14
27
|
if (min != null && isFinite(min)) {
|