mirror of https://github.com/vuejs/core.git
refactor: tidy
This commit is contained in:
parent
1d2f66e111
commit
cd768d262f
|
@ -1,8 +1,3 @@
|
||||||
export { template } from './template'
|
|
||||||
export * from './render'
|
|
||||||
export * from './on'
|
export * from './on'
|
||||||
|
export * from './render'
|
||||||
type Children = Record<number, [ChildNode, Children]>
|
export * from './template'
|
||||||
export function children(n: ChildNode): Children {
|
|
||||||
return { ...Array.from(n.childNodes).map(n => [n, children(n)]) }
|
|
||||||
}
|
|
||||||
|
|
|
@ -112,3 +112,8 @@ export function setDynamicProp(el: Element, key: string, val: any) {
|
||||||
setAttr(el, key, void 0, val)
|
setAttr(el, key, void 0, val)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Children = Record<number, [ChildNode, Children]>
|
||||||
|
export function children(n: ChildNode): Children {
|
||||||
|
return { ...Array.from(n.childNodes).map(n => [n, children(n)]) }
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue