let offset = 0
let prev: [variable: string, elementIndex: number] | undefined
- let ifBranchCount = 0
let prependCount = 0
for (const [index, child] of children.entries()) {
}
if (child.flags & DynamicFlag.NON_TEMPLATE) {
offset--
- } else if (child.ifBranch) {
- ifBranchCount++
}
const id =
}
const elementIndex = index + offset
- const logicalIndex = elementIndex - ifBranchCount + prependCount
+ const logicalIndex = elementIndex + prependCount
// p for "placeholder" variables that are meant for possible reuse by
// other access paths
const variable =
} else {
// check the adjacent v-if
const siblingIf = getSiblingIf(context, true)
- context.dynamic.ifBranch = true
const siblings = context.parent && context.parent.dynamic.children
let lastIfNode