From cd768d262ffa6671c24f1623f99c979dc63bf0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Thu, 23 Nov 2023 23:43:19 +0800 Subject: [PATCH] refactor: tidy --- packages/runtime-vapor/src/index.ts | 9 ++------- packages/runtime-vapor/src/render.ts | 5 +++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/runtime-vapor/src/index.ts b/packages/runtime-vapor/src/index.ts index a46041a60..8553412a3 100644 --- a/packages/runtime-vapor/src/index.ts +++ b/packages/runtime-vapor/src/index.ts @@ -1,8 +1,3 @@ -export { template } from './template' -export * from './render' export * from './on' - -type Children = Record -export function children(n: ChildNode): Children { - return { ...Array.from(n.childNodes).map(n => [n, children(n)]) } -} +export * from './render' +export * from './template' diff --git a/packages/runtime-vapor/src/render.ts b/packages/runtime-vapor/src/render.ts index 07208d601..aad51f3ab 100644 --- a/packages/runtime-vapor/src/render.ts +++ b/packages/runtime-vapor/src/render.ts @@ -112,3 +112,8 @@ export function setDynamicProp(el: Element, key: string, val: any) { setAttr(el, key, void 0, val) } } + +type Children = Record +export function children(n: ChildNode): Children { + return { ...Array.from(n.childNodes).map(n => [n, children(n)]) } +}