|
@@ -40,7 +40,8 @@ export function ssrRenderSlotInner(
|
|
|
fallbackRenderFn: (() => void) | null,
|
|
fallbackRenderFn: (() => void) | null,
|
|
|
push: PushFn,
|
|
push: PushFn,
|
|
|
parentComponent: ComponentInternalInstance,
|
|
parentComponent: ComponentInternalInstance,
|
|
|
- slotScopeId?: string
|
|
|
|
|
|
|
+ slotScopeId?: string,
|
|
|
|
|
+ transition?: boolean
|
|
|
) {
|
|
) {
|
|
|
const slotFn = slots[slotName]
|
|
const slotFn = slots[slotName]
|
|
|
if (slotFn) {
|
|
if (slotFn) {
|
|
@@ -61,10 +62,14 @@ export function ssrRenderSlotInner(
|
|
|
// ssr slot.
|
|
// ssr slot.
|
|
|
// check if the slot renders all comments, in which case use the fallback
|
|
// check if the slot renders all comments, in which case use the fallback
|
|
|
let isEmptySlot = true
|
|
let isEmptySlot = true
|
|
|
- for (let i = 0; i < slotBuffer.length; i++) {
|
|
|
|
|
- if (!isComment(slotBuffer[i])) {
|
|
|
|
|
- isEmptySlot = false
|
|
|
|
|
- break
|
|
|
|
|
|
|
+ if (transition) {
|
|
|
|
|
+ isEmptySlot = false
|
|
|
|
|
+ } else {
|
|
|
|
|
+ for (let i = 0; i < slotBuffer.length; i++) {
|
|
|
|
|
+ if (!isComment(slotBuffer[i])) {
|
|
|
|
|
+ isEmptySlot = false
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (isEmptySlot) {
|
|
if (isEmptySlot) {
|