@vue-jsx-vapor/runtime 3.1.3 → 3.1.5
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/vnode.cjs +6 -6
- package/dist/vnode.js +6 -6
- package/package.json +1 -1
package/dist/vnode.cjs
CHANGED
|
@@ -11,15 +11,15 @@ function createVNodeCache(index) {
|
|
|
11
11
|
return caches[index] || (caches[index] = []);
|
|
12
12
|
} else return [];
|
|
13
13
|
}
|
|
14
|
-
function normalizeVNode(value = " ", flag =
|
|
14
|
+
function normalizeVNode(value = " ", flag = 1) {
|
|
15
15
|
if (value == null || typeof value === "boolean") return (0, vue.createVNode)(vue.Comment);
|
|
16
16
|
else if (typeof value !== "function") return (0, vue.createVNode)(vue.Text, null, String(value), flag);
|
|
17
17
|
(0, vue.openBlock)();
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
else if (Array.isArray(
|
|
21
|
-
else if ((0, vue.isVNode)(
|
|
22
|
-
else return (0, vue.createBlock)(vue.Text, null, String(
|
|
18
|
+
const node = value();
|
|
19
|
+
if (node == null || typeof node === "boolean") return (0, vue.createBlock)(vue.Comment);
|
|
20
|
+
else if (Array.isArray(node)) return (0, vue.createBlock)(vue.Fragment, null, node.slice());
|
|
21
|
+
else if ((0, vue.isVNode)(node)) return (0, vue.createBlock)(cloneIfMounted(node));
|
|
22
|
+
else return (0, vue.createBlock)(vue.Text, null, String(node), flag);
|
|
23
23
|
}
|
|
24
24
|
function cloneIfMounted(child) {
|
|
25
25
|
return child.el === null && child.patchFlag !== -1 || child.memo ? child : (0, vue.cloneVNode)(child);
|
package/dist/vnode.js
CHANGED
|
@@ -10,15 +10,15 @@ function createVNodeCache(index) {
|
|
|
10
10
|
return caches[index] || (caches[index] = []);
|
|
11
11
|
} else return [];
|
|
12
12
|
}
|
|
13
|
-
function normalizeVNode(value = " ", flag =
|
|
13
|
+
function normalizeVNode(value = " ", flag = 1) {
|
|
14
14
|
if (value == null || typeof value === "boolean") return createVNode(Comment);
|
|
15
15
|
else if (typeof value !== "function") return createVNode(Text, null, String(value), flag);
|
|
16
16
|
openBlock();
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
else if (Array.isArray(
|
|
20
|
-
else if (isVNode(
|
|
21
|
-
else return createBlock(Text, null, String(
|
|
17
|
+
const node = value();
|
|
18
|
+
if (node == null || typeof node === "boolean") return createBlock(Comment);
|
|
19
|
+
else if (Array.isArray(node)) return createBlock(Fragment, null, node.slice());
|
|
20
|
+
else if (isVNode(node)) return createBlock(cloneIfMounted(node));
|
|
21
|
+
else return createBlock(Text, null, String(node), flag);
|
|
22
22
|
}
|
|
23
23
|
function cloneIfMounted(child) {
|
|
24
24
|
return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);
|