]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
wip: inheritAttrs
authorEvan You <evan@vuejs.org>
Mon, 2 Dec 2024 16:30:33 +0000 (00:30 +0800)
committerEvan You <evan@vuejs.org>
Mon, 2 Dec 2024 16:30:33 +0000 (00:30 +0800)
packages/runtime-vapor/src/apiCreateComponentSimple.ts

index edcd778759e6bc2c22533214f21626e553799863..562fdd640b2d2f349240c55627b03f56462a6021 100644 (file)
@@ -48,14 +48,16 @@ export function createComponentSimple(
   ) as Block
 
   // single root, inherit attrs
-  // let i
-  // if (component.inheritAttrs !== false && node instanceof Element) {
-  //   renderEffectSimple(() => {
-  //     // for (const key in instance.attrs) {
-  //     //   i = key
-  //     // }
-  //   })
-  // }
+  if (
+    rawProps &&
+    component.inheritAttrs !== false &&
+    node instanceof Element &&
+    Object.keys(instance.attrs).length
+  ) {
+    renderEffectSimple(() => {
+      // TODO
+    })
+  }
 
   instance.scope.off()
   currentInstance = prevInstance