mirror of https://github.com/vuejs/core.git
chore: tweaks
This commit is contained in:
parent
b661cd3402
commit
72b5019416
|
@ -686,20 +686,15 @@ export class VueElement
|
||||||
roots.push(...this._teleportTargets)
|
roots.push(...this._teleportTargets)
|
||||||
}
|
}
|
||||||
|
|
||||||
const seen = new Set<HTMLSlotElement>()
|
const slots = new Set<HTMLSlotElement>()
|
||||||
const slots: HTMLSlotElement[] = []
|
|
||||||
for (const root of roots) {
|
for (const root of roots) {
|
||||||
const found = root.querySelectorAll<HTMLSlotElement>('slot')
|
const found = root.querySelectorAll<HTMLSlotElement>('slot')
|
||||||
for (let i = 0; i < found.length; i++) {
|
for (let i = 0; i < found.length; i++) {
|
||||||
const slot = found[i]
|
slots.add(found[i])
|
||||||
if (!seen.has(slot)) {
|
|
||||||
seen.add(slot)
|
|
||||||
slots.push(slot)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return slots
|
return Array.from(slots)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue