hy-virtual-tree 2.0.11 → 2.0.12
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/CHANGELOG.md +6 -0
- package/dist/index.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hy-virtual-tree v2.0.
|
|
1
|
+
/* hy-virtual-tree v2.0.12 */
|
|
2
2
|
import './svg_bundle.js';
|
|
3
3
|
const isString = (e) => typeof e === 'string';
|
|
4
4
|
const isNumber = (e) => typeof e === 'number';
|
|
@@ -6709,7 +6709,7 @@ const getElement = (vnode) => {
|
|
|
6709
6709
|
return vnode.el;
|
|
6710
6710
|
};
|
|
6711
6711
|
const createVNode = (arg, render) => {
|
|
6712
|
-
const el =
|
|
6712
|
+
const el = isElement(arg) ? arg : document.createElement(arg);
|
|
6713
6713
|
let target = {
|
|
6714
6714
|
el,
|
|
6715
6715
|
children: [],
|
|
@@ -9041,7 +9041,8 @@ const customRender = (options) => {
|
|
|
9041
9041
|
if (isObject(value) && value.el) {
|
|
9042
9042
|
// 处理从外部传入的没有挂载方法的节点
|
|
9043
9043
|
if (!value.mount) {
|
|
9044
|
-
value = createVNode(
|
|
9044
|
+
value = createVNode('div', (vnode) => {
|
|
9045
|
+
vnode.el.appendChild(value.el);
|
|
9045
9046
|
vnode.$destroy = value.$destroy;
|
|
9046
9047
|
});
|
|
9047
9048
|
}
|