chore: annotate generated slot flag
This commit is contained in:
@@ -33,7 +33,7 @@ import {
|
||||
} from '../utils'
|
||||
import { CREATE_SLOTS, RENDER_LIST, WITH_CTX } from '../runtimeHelpers'
|
||||
import { parseForExpression, createForLoopParams } from './vFor'
|
||||
import { SlotFlags } from '@vue/shared'
|
||||
import { SlotFlags, slotFlagsText } from '@vue/shared'
|
||||
|
||||
const defaultFallback = createSimpleExpression(`undefined`, false)
|
||||
|
||||
@@ -334,7 +334,10 @@ export function buildSlots(
|
||||
`_`,
|
||||
// 2 = compiled but dynamic = can skip normalization, but must run diff
|
||||
// 1 = compiled and static = can skip normalization AND diff as optimized
|
||||
createSimpleExpression('' + slotFlag, false)
|
||||
createSimpleExpression(
|
||||
slotFlag + (__DEV__ ? ` /* ${slotFlagsText[slotFlag]} */` : ``),
|
||||
false
|
||||
)
|
||||
)
|
||||
),
|
||||
loc
|
||||
|
||||
Reference in New Issue
Block a user