Skip to content

Commit 90d2987

Browse files
committed
chore(runtime-vapor): add more comments
1 parent b8710ca commit 90d2987

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/runtime-vapor/src/componentSlots.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ export function initSlots(
5555
/**
5656
* Maintain a queue for each slot name, so that we can
5757
* render the next slot when the highest level slot was removed
58+
*
59+
* |- key1: [level2, slot2], [level1, slot1]
60+
* |
61+
* |- key2: [level3, slot3]
62+
* |
63+
* |...
64+
*
65+
* For example, if level2 slot re-rendered and it turns out to render key3
66+
* then we need to take out level1 slot and render in key1
5867
*/
5968
const slotsQueue: Record<string, [level: number, slot: Slot][]> = {}
6069
rawSlots.forEach((slots, index) => {

0 commit comments

Comments
 (0)