Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export function render(_ctx) {
}, () => {
const n13 = t1()
return n13
}, 389 /* BLOCK_SHAPE, INDEX_SHIFT */)
}, 773 /* BLOCK_SHAPE, INDEX_SHIFT */)
return n14
}, 261 /* BLOCK_SHAPE, INDEX_SHIFT */), 133 /* BLOCK_SHAPE, INDEX_SHIFT */)
}, 645 /* BLOCK_SHAPE, SLOT_ROOT, INDEX_SHIFT */), 389 /* BLOCK_SHAPE, SLOT_ROOT, INDEX_SHIFT */)
return [n0, n3, n7]
}, true)
return n16
Expand Down Expand Up @@ -102,7 +102,7 @@ export function render(_ctx) {
const n0 = _createIf(() => (_ctx.show), () => {
const n2 = t0()
return n2
})
}, null, 129 /* BLOCK_SHAPE, SLOT_ROOT */)
return n0
}, true)
return n3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ export function render(_ctx) {
}, () => {
const n5 = t1()
return n5
}, 229 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
}, 357 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
_setInsertionState(n7, null, 2)
const n6 = _createAssetComponent("Comp2")
return n7
Expand All @@ -423,7 +423,7 @@ export function render(_ctx) {
}, () => {
const n5 = t1()
return n5
}, 229 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
}, 357 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
return n6
}"
`;
Expand All @@ -444,7 +444,7 @@ export function render(_ctx) {
}, () => {
const n4 = t1()
return n4
}, 229 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
}, 357 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
return n6
}"
`;
Expand All @@ -469,7 +469,7 @@ export function render(_ctx) {
}, () => {
const n6 = t2()
return n6
}, 357 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */), 165 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
}, 613 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */), 293 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
return n8
}"
`;
Expand All @@ -489,7 +489,7 @@ export function render(_ctx) {
}, () => {
const n4 = t1()
return n4
}, 229 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
}, 357 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
return n5
}"
`;
Expand All @@ -509,7 +509,7 @@ export function render(_ctx) {
}, () => {
const n4 = t1()
return n4
}, 229 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
}, 357 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
_setInsertionState(n6, null, 2)
const n5 = _createAssetComponent("Comp")
return n6
Expand All @@ -531,7 +531,7 @@ export function render(_ctx) {
}, () => {
const n4 = t1()
return n4
}, 229 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
}, 357 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
return n5
}"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function render(_ctx) {
const n1 = _createIf(() => (_ctx.ok), () => {
const n3 = _createComponentWithFallback(_component_Child)
return n3
})
}, null, 129 /* BLOCK_SHAPE, SLOT_ROOT */)
return n1
})
return [n0, n5]
Expand Down Expand Up @@ -814,7 +814,7 @@ exports[`compiler: element transform > dynamic component > dynamic binding 1`] =
"import { createDynamicComponent as _createDynamicComponent } from 'vue';

export function render(_ctx) {
const n0 = _createDynamicComponent(() => (_ctx.foo), null, null, true)
const n0 = _createDynamicComponent(() => (_ctx.foo), null, null, 1)
return n0
}"
`;
Expand All @@ -823,7 +823,7 @@ exports[`compiler: element transform > dynamic component > dynamic binding short
"import { createDynamicComponent as _createDynamicComponent } from 'vue';

export function render(_ctx) {
const n0 = _createDynamicComponent(() => (_ctx.is), null, null, true)
const n0 = _createDynamicComponent(() => (_ctx.is), null, null, 1)
return n0
}"
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`compiler: key > with dynamic key > <component is/> + key 1`] = `

export function render(_ctx) {
const n0 = _createKeyedFragment(() => (_ctx.id), () => {
const n1 = _createDynamicComponent(() => (_ctx.view), null, null, true)
const n1 = _createDynamicComponent(() => (_ctx.view), null, null, 1)
return n1
})
return n0
Expand Down Expand Up @@ -125,7 +125,7 @@ export function render(_ctx) {
return n5
})
return n4
}), 165 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
}), 293 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
return n0
}"
`;
Expand Down Expand Up @@ -163,7 +163,7 @@ exports[`compiler: key > with static key > <component is literal/> + key 1`] = `
"import { createDynamicComponent as _createDynamicComponent, setBlockKey as _setBlockKey } from 'vue';

export function render(_ctx) {
const n0 = _createDynamicComponent(() => ('div'), null, null, true)
const n0 = _createDynamicComponent(() => ('div'), null, null, 1)
_setBlockKey(n0, "1")
return n0
}"
Expand All @@ -173,7 +173,7 @@ exports[`compiler: key > with static key > <component is/> + key 1`] = `
"import { createDynamicComponent as _createDynamicComponent, setBlockKey as _setBlockKey } from 'vue';

export function render(_ctx) {
const n0 = _createDynamicComponent(() => (_ctx.view), null, null, true)
const n0 = _createDynamicComponent(() => (_ctx.view), null, null, 1)
_setBlockKey(n0, "1")
return n0
}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,25 @@ export function render(_ctx) {
}"
`;

exports[`compiler: transform <slot> outlets > does not mark non-root fallback v-if as slot root 1`] = `
"import { setInsertionState as _setInsertionState, createIf as _createIf, createSlot as _createSlot, template as _template } from 'vue';
const t0 = _template("<span>", 2)
const t1 = _template("<div>", 1)

export function render(_ctx) {
const n0 = _createSlot("default", null, () => {
const n5 = t1()
_setInsertionState(n5, null, 0)
const n2 = _createIf(() => (_ctx.ok), () => {
const n4 = t0()
return n4
})
return n5
})
return n0
}"
`;

exports[`compiler: transform <slot> outlets > dynamically named slot outlet 1`] = `
"import { createSlot as _createSlot } from 'vue';

Expand Down Expand Up @@ -111,6 +130,57 @@ export function render(_ctx) {
}"
`;

exports[`compiler: transform <slot> outlets > nested root v-for fallback 1`] = `
"import { txt as _txt, toDisplayString as _toDisplayString, setText as _setText, renderEffect as _renderEffect, createFor as _createFor, createIf as _createIf, createSlot as _createSlot, template as _template } from 'vue';
const t0 = _template("<span> ")

export function render(_ctx) {
const n0 = _createSlot("default", null, () => {
const n2 = _createIf(() => (_ctx.ok), () => {
const n4 = _createFor(() => (_ctx.items), (_for_item0) => {
const n6 = t0()
const x6 = _txt(n6)
_renderEffect(() => _setText(x6, _toDisplayString(_for_item0.value)))
return n6
}, undefined, 40)
const x4 = _txt(n4)
_renderEffect(() => _setText(x4, _toDisplayString(_ctx.item)))
return n4
}, null, 129 /* BLOCK_SHAPE, SLOT_ROOT */)
return n2
})
return n0
}"
`;

exports[`compiler: transform <slot> outlets > root dynamic component fallback 1`] = `
"import { createDynamicComponent as _createDynamicComponent, createSlot as _createSlot } from 'vue';

export function render(_ctx) {
const n0 = _createSlot("default", null, () => {
const n2 = _createDynamicComponent(() => (_ctx.view), null, null, 5)
return n2
})
return n0
}"
`;

exports[`compiler: transform <slot> outlets > root v-if fallback 1`] = `
"import { createIf as _createIf, createSlot as _createSlot, template as _template } from 'vue';
const t0 = _template("<span>", 3)

export function render(_ctx) {
const n0 = _createSlot("default", null, () => {
const n2 = _createIf(() => (_ctx.ok), () => {
const n4 = t0()
return n4
}, null, 129 /* BLOCK_SHAPE, SLOT_ROOT */)
return n2
})
return n0
}"
`;

exports[`compiler: transform <slot> outlets > slot outlet with scopeId and slotted=false should generate noSlotted 1`] = `
"import { createSlot as _createSlot } from 'vue';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ exports[`compiler: template ref transform > dynamic component static ref 1`] = `
"import { createDynamicComponent as _createDynamicComponent, setStaticTemplateRef as _setStaticTemplateRef } from 'vue';

export function render(_ctx) {
const n0 = _createDynamicComponent(() => (_ctx.view), null, null, true)
const n0 = _createDynamicComponent(() => (_ctx.view), null, null, 1)
_setStaticTemplateRef(n0, "foo")
return n0
}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export function render(_ctx) {
}, () => {
const n6 = _createComponentWithFallback(_component_Comp)
return n6
}, 138 /* BLOCK_SHAPE, INDEX_SHIFT */)
}, 266 /* BLOCK_SHAPE, INDEX_SHIFT */)
return n2
}, undefined, 16)
return n0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ exports[`v-html > work with dynamic component 1`] = `
"import { createDynamicComponent as _createDynamicComponent, setBlockHtml as _setBlockHtml, renderEffect as _renderEffect } from 'vue';

export function render(_ctx) {
const n0 = _createDynamicComponent(() => (_ctx.Comp), null, null, true)
const n0 = _createDynamicComponent(() => (_ctx.Comp), null, null, 1)
_renderEffect(() => _setBlockHtml(n0, _ctx.foo))
return n0
}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function render(_ctx) {
const n10 = t3()
const n11 = t4()
return [n10, n11]
}, 362 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */), 165 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
}, 618 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */), 293 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
const n13 = t5()
const x13 = _txt(n13)
_renderEffect(() => _setText(x13, _toDisplayString(_ctx.text)))
Expand Down Expand Up @@ -87,7 +87,7 @@ export function render(_ctx) {
}, () => _createIf(() => (_ctx.bar), () => {
const n4 = t1()
return n4
}, null, 33 /* BLOCK_SHAPE, TRUE_NO_SCOPE */), 165 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
}, null, 33 /* BLOCK_SHAPE, TRUE_NO_SCOPE */), 293 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
const n6 = _createIf(() => (_ctx.baz), () => {
const n8 = t2()
return n8
Expand Down Expand Up @@ -185,7 +185,7 @@ export function render(_ctx) {
}, () => {
const n5 = t2()
return n5
}, 230 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
}, 358 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
return n0
}"
`;
Expand Down Expand Up @@ -221,7 +221,7 @@ export function render(_ctx) {
}, () => {
const n4 = t1()
return n4
}, 229 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
}, 357 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
return n0
}"
`;
Expand All @@ -245,7 +245,7 @@ export function render(_ctx) {
}, () => {
const n10 = t2()
return n10
}, 117 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, ONCE */), 293 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */), 165 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
}, 117 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, ONCE */), 549 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */), 293 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
return n0
}"
`;
Expand All @@ -262,7 +262,7 @@ export function render(_ctx) {
}, () => _createIf(() => (_ctx.orNot), () => {
const n4 = t1()
return n4
}, null, 33 /* BLOCK_SHAPE, TRUE_NO_SCOPE */), 165 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
}, null, 33 /* BLOCK_SHAPE, TRUE_NO_SCOPE */), 293 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
return n0
}"
`;
Expand All @@ -288,7 +288,7 @@ export function render(_ctx) {
}, () => {
const n7 = t2()
return n7
}, 357 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
}, 613 /* BLOCK_SHAPE, TRUE_NO_SCOPE, FALSE_NO_SCOPE, INDEX_SHIFT */)
return n8
}"
`;
Expand All @@ -306,7 +306,7 @@ export function render(_ctx) {
}, () => _createIf(() => (_ctx.bar), () => {
const n4 = t1()
return n4
}, null, 33 /* BLOCK_SHAPE, TRUE_NO_SCOPE */), 165 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
}, null, 33 /* BLOCK_SHAPE, TRUE_NO_SCOPE */), 293 /* BLOCK_SHAPE, TRUE_NO_SCOPE, INDEX_SHIFT */)
const n6 = t2()
return [n0, n6]
}"
Expand Down
Loading
Loading