|
|
@@ -0,0 +1,480 @@
|
|
|
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > child/nthChild/next with logicalIndex > child with logicalIndex when prepend exists and insert anchor needed 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, child as _child, next as _next, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><div></div><!><span>", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp1 = _resolveComponent("Comp1")
|
|
|
+ const _component_Comp2 = _resolveComponent("Comp2")
|
|
|
+ const n2 = t0()
|
|
|
+ const n3 = _next(_child(n2), 2)
|
|
|
+ _setInsertionState(n2, 0, 0)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp1)
|
|
|
+ _setInsertionState(n2, n3, 2, true)
|
|
|
+ const n1 = _createComponentWithFallback(_component_Comp2)
|
|
|
+ return n2
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > child/nthChild/next with logicalIndex > multiple prepends affect logicalIndex 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, child as _child, next as _next, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><div></div><!><span>", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp1 = _resolveComponent("Comp1")
|
|
|
+ const _component_Comp2 = _resolveComponent("Comp2")
|
|
|
+ const _component_Comp3 = _resolveComponent("Comp3")
|
|
|
+ const n3 = t0()
|
|
|
+ const n4 = _next(_child(n3), 3)
|
|
|
+ _setInsertionState(n3, 0, 0)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp1)
|
|
|
+ _setInsertionState(n3, 0, 1)
|
|
|
+ const n1 = _createComponentWithFallback(_component_Comp2)
|
|
|
+ _setInsertionState(n3, n4, 3, true)
|
|
|
+ const n2 = _createComponentWithFallback(_component_Comp3)
|
|
|
+ return n3
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > child/nthChild/next with logicalIndex > next with logicalIndex for insert anchor 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, child as _child, next as _next, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, createIf as _createIf, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+const t1 = _template("<div><div></div><!><div></div>", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp = _resolveComponent("Comp")
|
|
|
+ const n5 = t1()
|
|
|
+ const n4 = _next(_child(n5), 1)
|
|
|
+ _setInsertionState(n5, n4, 1)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp)
|
|
|
+ _setInsertionState(n5, null, 3, true)
|
|
|
+ const n1 = _createIf(() => (true), () => {
|
|
|
+ const n3 = t0()
|
|
|
+ return n3
|
|
|
+ }, null, true)
|
|
|
+ return n5
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > child/nthChild/next with logicalIndex > nthChild with logicalIndex 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, child as _child, next as _next, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, nthChild as _nthChild, createIf as _createIf, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+const t1 = _template("<div><div></div><!><div></div><!><div><button>", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp = _resolveComponent("Comp")
|
|
|
+ const n5 = t1()
|
|
|
+ const n4 = _next(_child(n5), 1)
|
|
|
+ const n6 = _nthChild(n5, 3, 3)
|
|
|
+ _setInsertionState(n5, n4, 1)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp)
|
|
|
+ _setInsertionState(n5, n6, 3, true)
|
|
|
+ const n1 = _createIf(() => (true), () => {
|
|
|
+ const n3 = t0()
|
|
|
+ return n3
|
|
|
+ }, null, true)
|
|
|
+ return n5
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > append scenarios > multiple consecutive append 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><span>A", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp1 = _resolveComponent("Comp1")
|
|
|
+ const _component_Comp2 = _resolveComponent("Comp2")
|
|
|
+ const n2 = t0()
|
|
|
+ _setInsertionState(n2, null, 1)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp1)
|
|
|
+ _setInsertionState(n2, null, 2, true)
|
|
|
+ const n1 = _createComponentWithFallback(_component_Comp2)
|
|
|
+ return n2
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > append scenarios > only component (append with logicalIndex 0) 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp = _resolveComponent("Comp")
|
|
|
+ const n1 = t0()
|
|
|
+ _setInsertionState(n1, null, 0, true)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp)
|
|
|
+ return n1
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > append scenarios > single component append 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><span>A", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp = _resolveComponent("Comp")
|
|
|
+ const n1 = t0()
|
|
|
+ _setInsertionState(n1, null, 1, true)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp)
|
|
|
+ return n1
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > insert scenarios > multiple consecutive insert in middle 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, child as _child, next as _next, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><span>A</span><!><p>B", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp1 = _resolveComponent("Comp1")
|
|
|
+ const _component_Comp2 = _resolveComponent("Comp2")
|
|
|
+ const n3 = t0()
|
|
|
+ const n2 = _next(_child(n3), 1)
|
|
|
+ _setInsertionState(n3, n2, 1)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp1)
|
|
|
+ _setInsertionState(n3, n2, 2, true)
|
|
|
+ const n1 = _createComponentWithFallback(_component_Comp2)
|
|
|
+ return n3
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > insert scenarios > single component insert in middle 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, child as _child, next as _next, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><span>A</span><!><p>B", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp = _resolveComponent("Comp")
|
|
|
+ const n2 = t0()
|
|
|
+ const n1 = _next(_child(n2), 1)
|
|
|
+ _setInsertionState(n2, n1, 1, true)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp)
|
|
|
+ return n2
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > mixed scenarios > prepend + append 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><span>A", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp1 = _resolveComponent("Comp1")
|
|
|
+ const _component_Comp2 = _resolveComponent("Comp2")
|
|
|
+ const n2 = t0()
|
|
|
+ _setInsertionState(n2, 0, 0)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp1)
|
|
|
+ _setInsertionState(n2, null, 2, true)
|
|
|
+ const n1 = _createComponentWithFallback(_component_Comp2)
|
|
|
+ return n2
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > mixed scenarios > prepend + insert + append 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, child as _child, next as _next, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><span>A</span><!><p>B", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp1 = _resolveComponent("Comp1")
|
|
|
+ const _component_Comp2 = _resolveComponent("Comp2")
|
|
|
+ const _component_Comp3 = _resolveComponent("Comp3")
|
|
|
+ const n3 = t0()
|
|
|
+ const n4 = _next(_child(n3), 2)
|
|
|
+ _setInsertionState(n3, 0, 0)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp1)
|
|
|
+ _setInsertionState(n3, n4, 2)
|
|
|
+ const n1 = _createComponentWithFallback(_component_Comp2)
|
|
|
+ _setInsertionState(n3, null, 4, true)
|
|
|
+ const n2 = _createComponentWithFallback(_component_Comp3)
|
|
|
+ return n3
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > prepend scenarios > multiple consecutive prepend 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><span>A", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp1 = _resolveComponent("Comp1")
|
|
|
+ const _component_Comp2 = _resolveComponent("Comp2")
|
|
|
+ const n2 = t0()
|
|
|
+ _setInsertionState(n2, 0, 0)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp1)
|
|
|
+ _setInsertionState(n2, 0, 1, true)
|
|
|
+ const n1 = _createComponentWithFallback(_component_Comp2)
|
|
|
+ return n2
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > prepend scenarios > single component prepend 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><span>A", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp = _resolveComponent("Comp")
|
|
|
+ const n1 = t0()
|
|
|
+ _setInsertionState(n1, 0, 0, true)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp)
|
|
|
+ return n1
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > slot scenarios > slot append 1`] = `
|
|
|
+"import { setInsertionState as _setInsertionState, createSlot as _createSlot, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><span>A</span>", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n1 = t0()
|
|
|
+ _setInsertionState(n1, null, 1, true)
|
|
|
+ const n0 = _createSlot("default", null)
|
|
|
+ return n1
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > slot scenarios > slot prepend 1`] = `
|
|
|
+"import { setInsertionState as _setInsertionState, createSlot as _createSlot, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div><span>A", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n1 = t0()
|
|
|
+ _setInsertionState(n1, 0, 0, true)
|
|
|
+ const n0 = _createSlot("default", null)
|
|
|
+ return n1
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-for scenarios > v-for append 1`] = `
|
|
|
+"import { setInsertionState as _setInsertionState, createFor as _createFor, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+const t1 = _template("<div><span>A</span>", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n3 = t1()
|
|
|
+ _setInsertionState(n3, null, 1, true)
|
|
|
+ const n0 = _createFor(() => (_ctx.list), (_for_item0) => {
|
|
|
+ const n2 = t0()
|
|
|
+ return n2
|
|
|
+ }, (i) => (i))
|
|
|
+ return n3
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-for scenarios > v-for prepend 1`] = `
|
|
|
+"import { setInsertionState as _setInsertionState, createFor as _createFor, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+const t1 = _template("<div><span>A", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n3 = t1()
|
|
|
+ _setInsertionState(n3, 0, 0, true)
|
|
|
+ const n0 = _createFor(() => (_ctx.list), (_for_item0) => {
|
|
|
+ const n2 = t0()
|
|
|
+ return n2
|
|
|
+ }, (i) => (i))
|
|
|
+ return n3
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-if scenarios > v-if append 1`] = `
|
|
|
+"import { setInsertionState as _setInsertionState, createIf as _createIf, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+const t1 = _template("<div><span>A</span>", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n3 = t1()
|
|
|
+ _setInsertionState(n3, null, 1, true)
|
|
|
+ const n0 = _createIf(() => (_ctx.show), () => {
|
|
|
+ const n2 = t0()
|
|
|
+ return n2
|
|
|
+ })
|
|
|
+ return n3
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-if scenarios > v-if insert 1`] = `
|
|
|
+"import { child as _child, next as _next, setInsertionState as _setInsertionState, createIf as _createIf, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+const t1 = _template("<div><span>A</span><!><p>B", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n4 = t1()
|
|
|
+ const n3 = _next(_child(n4), 1)
|
|
|
+ _setInsertionState(n4, n3, 1, true)
|
|
|
+ const n0 = _createIf(() => (_ctx.show), () => {
|
|
|
+ const n2 = t0()
|
|
|
+ return n2
|
|
|
+ })
|
|
|
+ return n4
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-if scenarios > v-if prepend 1`] = `
|
|
|
+"import { setInsertionState as _setInsertionState, createIf as _createIf, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>")
|
|
|
+const t1 = _template("<div><span>A", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n3 = t1()
|
|
|
+ _setInsertionState(n3, 0, 0, true)
|
|
|
+ const n0 = _createIf(() => (_ctx.show), () => {
|
|
|
+ const n2 = t0()
|
|
|
+ return n2
|
|
|
+ })
|
|
|
+ return n3
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-if/v-else-if/v-else scenarios > component + v-if/v-else + component 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, createIf as _createIf, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>if")
|
|
|
+const t1 = _template("<div>else")
|
|
|
+const t2 = _template("<div>", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp1 = _resolveComponent("Comp1")
|
|
|
+ const _component_Comp2 = _resolveComponent("Comp2")
|
|
|
+ const n7 = t2()
|
|
|
+ _setInsertionState(n7, null, 0)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp1)
|
|
|
+ _setInsertionState(n7, null, 1)
|
|
|
+ const n1 = _createIf(() => (_ctx.show), () => {
|
|
|
+ const n3 = t0()
|
|
|
+ return n3
|
|
|
+ }, () => {
|
|
|
+ const n5 = t1()
|
|
|
+ return n5
|
|
|
+ })
|
|
|
+ _setInsertionState(n7, null, 2, true)
|
|
|
+ const n6 = _createComponentWithFallback(_component_Comp2)
|
|
|
+ return n7
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-if/v-else-if/v-else scenarios > component followed by v-if/v-else 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createComponentWithFallback as _createComponentWithFallback, createIf as _createIf, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>if")
|
|
|
+const t1 = _template("<div>else")
|
|
|
+const t2 = _template("<div><span>A", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp = _resolveComponent("Comp")
|
|
|
+ const n6 = t2()
|
|
|
+ _setInsertionState(n6, 0, 0)
|
|
|
+ const n0 = _createComponentWithFallback(_component_Comp)
|
|
|
+ _setInsertionState(n6, 0, 1, true)
|
|
|
+ const n1 = _createIf(() => (_ctx.show), () => {
|
|
|
+ const n3 = t0()
|
|
|
+ return n3
|
|
|
+ }, () => {
|
|
|
+ const n5 = t1()
|
|
|
+ return n5
|
|
|
+ })
|
|
|
+ return n6
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-if/v-else-if/v-else scenarios > v-if with v-else should share same logicalIndex 1`] = `
|
|
|
+"import { child as _child, next as _next, setInsertionState as _setInsertionState, createIf as _createIf, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>if")
|
|
|
+const t1 = _template("<div>else")
|
|
|
+const t2 = _template("<div><span>A</span><!><p>B", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n6 = t2()
|
|
|
+ const n5 = _next(_child(n6), 1)
|
|
|
+ _setInsertionState(n6, n5, 1, true)
|
|
|
+ const n0 = _createIf(() => (_ctx.show), () => {
|
|
|
+ const n2 = t0()
|
|
|
+ return n2
|
|
|
+ }, () => {
|
|
|
+ const n4 = t1()
|
|
|
+ return n4
|
|
|
+ })
|
|
|
+ return n6
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-if/v-else-if/v-else scenarios > v-if with v-else-if and v-else should share same logicalIndex 1`] = `
|
|
|
+"import { child as _child, next as _next, setInsertionState as _setInsertionState, createIf as _createIf, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>if")
|
|
|
+const t1 = _template("<div>else-if")
|
|
|
+const t2 = _template("<div>else")
|
|
|
+const t3 = _template("<div><span>A</span><!><p>B", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n8 = t3()
|
|
|
+ const n7 = _next(_child(n8), 1)
|
|
|
+ _setInsertionState(n8, n7, 1, true)
|
|
|
+ const n0 = _createIf(() => (_ctx.a), () => {
|
|
|
+ const n2 = t0()
|
|
|
+ return n2
|
|
|
+ }, () => _createIf(() => (_ctx.b), () => {
|
|
|
+ const n4 = t1()
|
|
|
+ return n4
|
|
|
+ }, () => {
|
|
|
+ const n6 = t2()
|
|
|
+ return n6
|
|
|
+ }))
|
|
|
+ return n8
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-if/v-else-if/v-else scenarios > v-if/v-else append 1`] = `
|
|
|
+"import { setInsertionState as _setInsertionState, createIf as _createIf, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>if")
|
|
|
+const t1 = _template("<div>else")
|
|
|
+const t2 = _template("<div><span>A</span>", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n5 = t2()
|
|
|
+ _setInsertionState(n5, null, 1, true)
|
|
|
+ const n0 = _createIf(() => (_ctx.show), () => {
|
|
|
+ const n2 = t0()
|
|
|
+ return n2
|
|
|
+ }, () => {
|
|
|
+ const n4 = t1()
|
|
|
+ return n4
|
|
|
+ })
|
|
|
+ return n5
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-if/v-else-if/v-else scenarios > v-if/v-else followed by component 1`] = `
|
|
|
+"import { resolveComponent as _resolveComponent, setInsertionState as _setInsertionState, createIf as _createIf, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>if")
|
|
|
+const t1 = _template("<div>else")
|
|
|
+const t2 = _template("<div><span>A</span>", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const _component_Comp = _resolveComponent("Comp")
|
|
|
+ const n6 = t2()
|
|
|
+ _setInsertionState(n6, null, 1)
|
|
|
+ const n0 = _createIf(() => (_ctx.show), () => {
|
|
|
+ const n2 = t0()
|
|
|
+ return n2
|
|
|
+ }, () => {
|
|
|
+ const n4 = t1()
|
|
|
+ return n4
|
|
|
+ })
|
|
|
+ _setInsertionState(n6, null, 2, true)
|
|
|
+ const n5 = _createComponentWithFallback(_component_Comp)
|
|
|
+ return n6
|
|
|
+}"
|
|
|
+`;
|
|
|
+
|
|
|
+exports[`compiler: logicalIndex > setInsertionState scenarios > v-if/v-else-if/v-else scenarios > v-if/v-else prepend 1`] = `
|
|
|
+"import { setInsertionState as _setInsertionState, createIf as _createIf, template as _template } from 'vue';
|
|
|
+const t0 = _template("<div>if")
|
|
|
+const t1 = _template("<div>else")
|
|
|
+const t2 = _template("<div><span>A", true)
|
|
|
+
|
|
|
+export function render(_ctx) {
|
|
|
+ const n5 = t2()
|
|
|
+ _setInsertionState(n5, 0, 0, true)
|
|
|
+ const n0 = _createIf(() => (_ctx.show), () => {
|
|
|
+ const n2 = t0()
|
|
|
+ return n2
|
|
|
+ }, () => {
|
|
|
+ const n4 = t1()
|
|
|
+ return n4
|
|
|
+ })
|
|
|
+ return n5
|
|
|
+}"
|
|
|
+`;
|