feat(compiler): handle complex destructure expressions in v-for
This commit is contained in:
@@ -31,12 +31,9 @@ export const trackSlotScopes: NodeTransform = (node, context) => {
|
||||
) {
|
||||
const vSlot = node.props.find(isVSlot)
|
||||
if (vSlot && vSlot.exp) {
|
||||
const { identifiers } = vSlot.exp
|
||||
if (identifiers) {
|
||||
identifiers.forEach(context.addIdentifier)
|
||||
return () => {
|
||||
identifiers.forEach(context.removeIdentifier)
|
||||
}
|
||||
context.addIdentifiers(vSlot.exp)
|
||||
return () => {
|
||||
context.removeIdentifiers(vSlot.exp!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user