From d9a44c5de7861e9180567b4afb787e381cefac61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LeoYuan=20=E8=A2=81=E5=8A=9B=E7=9A=93?= Date: Fri, 20 May 2022 14:19:13 +0800 Subject: [PATCH] feat: add slotNode for shell prop --- packages/shell/src/prop.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/shell/src/prop.ts b/packages/shell/src/prop.ts index 9d5f42cb5..aba59ca73 100644 --- a/packages/shell/src/prop.ts +++ b/packages/shell/src/prop.ts @@ -43,6 +43,13 @@ export default class Prop { return Node.create(this[propSymbol].getNode()); } + /** + * return the slot node (only if the current prop represents a slot) + */ + get slotNode(): Node | null { + return Node.create(this[propSymbol].slotNode); + } + /** * judge if it is a prop or not */