|
@@ -1,5 +1,19 @@
|
|
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
|
|
|
|
|
|
|
|
+exports[`compiler: v-for > array de-structured value (with rest) 1`] = `
|
|
|
|
|
+"import { setText as _setText, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue';
|
|
|
|
|
+const t0 = _template("<div></div>", true)
|
|
|
|
|
+
|
|
|
|
|
+export function render(_ctx) {
|
|
|
|
|
+ const n0 = _createFor(() => (_ctx.list), (_ctx0) => {
|
|
|
|
|
+ const n2 = t0()
|
|
|
|
|
+ _renderEffect(() => _setText(n2, _ctx0[0].value[0] + _ctx0[0].value.slice(1) + _ctx0[1].value))
|
|
|
|
|
+ return n2
|
|
|
|
|
+ }, ([id, ...other], index) => (id))
|
|
|
|
|
+ return n0
|
|
|
|
|
+}"
|
|
|
|
|
+`;
|
|
|
|
|
+
|
|
|
exports[`compiler: v-for > array de-structured value 1`] = `
|
|
exports[`compiler: v-for > array de-structured value 1`] = `
|
|
|
"import { setText as _setText, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue';
|
|
"import { setText as _setText, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue';
|
|
|
const t0 = _template("<div></div>", true)
|
|
const t0 = _template("<div></div>", true)
|
|
@@ -30,20 +44,6 @@ export function render(_ctx) {
|
|
|
}"
|
|
}"
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
-exports[`compiler: v-for > function params w/ prefixIdentifiers: false 1`] = `
|
|
|
|
|
-"import { setText as _setText, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue';
|
|
|
|
|
-const t0 = _template("<div></div>", true)
|
|
|
|
|
-
|
|
|
|
|
-export function render(_ctx) {
|
|
|
|
|
- const n0 = _createFor(() => (items), ([item, __, k]) => {
|
|
|
|
|
- const n2 = t0()
|
|
|
|
|
- _renderEffect(() => _setText(n2, item))
|
|
|
|
|
- return n2
|
|
|
|
|
- }, (item, __, k) => (k))
|
|
|
|
|
- return n0
|
|
|
|
|
-}"
|
|
|
|
|
-`;
|
|
|
|
|
-
|
|
|
|
|
exports[`compiler: v-for > multi effect 1`] = `
|
|
exports[`compiler: v-for > multi effect 1`] = `
|
|
|
"import { setProp as _setProp, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue';
|
|
"import { setProp as _setProp, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue';
|
|
|
const t0 = _template("<div></div>", true)
|
|
const t0 = _template("<div></div>", true)
|
|
@@ -82,13 +82,13 @@ export function render(_ctx) {
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compiler: v-for > object de-structured value (with rest) 1`] = `
|
|
exports[`compiler: v-for > object de-structured value (with rest) 1`] = `
|
|
|
-"import { setText as _setText, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue';
|
|
|
|
|
|
|
+"import { getRestElement as _getRestElement, setText as _setText, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue';
|
|
|
const t0 = _template("<div></div>", true)
|
|
const t0 = _template("<div></div>", true)
|
|
|
|
|
|
|
|
export function render(_ctx) {
|
|
export function render(_ctx) {
|
|
|
const n0 = _createFor(() => (_ctx.list), (_ctx0) => {
|
|
const n0 = _createFor(() => (_ctx.list), (_ctx0) => {
|
|
|
const n2 = t0()
|
|
const n2 = t0()
|
|
|
- _renderEffect(() => _setText(n2, _ctx0[0].value.id + _ctx0[0].value + _ctx0[1].value))
|
|
|
|
|
|
|
+ _renderEffect(() => _setText(n2, _ctx0[0].value.id + _getRestElement(_ctx0[0].value, ["id"]) + _ctx0[1].value))
|
|
|
return n2
|
|
return n2
|
|
|
}, ({ id, ...other }, index) => (id))
|
|
}, ({ id, ...other }, index) => (id))
|
|
|
return n0
|
|
return n0
|
|
@@ -109,34 +109,6 @@ export function render(_ctx) {
|
|
|
}"
|
|
}"
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
-exports[`compiler: v-for > object de-structured value 2`] = `
|
|
|
|
|
-"import { setText as _setText, renderEffect as _renderEffect, createFor as _createFor, template as _template } from 'vue';
|
|
|
|
|
-const t0 = _template("<div></div>", true)
|
|
|
|
|
-
|
|
|
|
|
-export function render(_ctx) {
|
|
|
|
|
- const n0 = _createFor(() => (_ctx.list), (_ctx0) => {
|
|
|
|
|
- const n2 = t0()
|
|
|
|
|
- _renderEffect(() => _setText(n2, _ctx0[0].value.id + _ctx0[0].value + _ctx0[1].value))
|
|
|
|
|
- return n2
|
|
|
|
|
- }, ({ id, ...other }, index) => (id))
|
|
|
|
|
- return n0
|
|
|
|
|
-}"
|
|
|
|
|
-`;
|
|
|
|
|
-
|
|
|
|
|
-exports[`compiler: v-for > v-for aliases w/ complex expressions 1`] = `
|
|
|
|
|
-"import { setText as _setText, renderEffect as _renderEffect, withDestructure as _withDestructure, createFor as _createFor, template as _template } from 'vue';
|
|
|
|
|
-const t0 = _template("<div></div>", true)
|
|
|
|
|
-
|
|
|
|
|
-export function render(_ctx) {
|
|
|
|
|
- const n0 = _createFor(() => (_ctx.list), _withDestructure(([{ foo = bar, baz: [qux = quux] }]) => [foo, qux], (_ctx0) => {
|
|
|
|
|
- const n2 = t0()
|
|
|
|
|
- _renderEffect(() => _setText(n2, _ctx0[0] + _ctx.bar + _ctx.baz + _ctx0[1] + _ctx.quux))
|
|
|
|
|
- return n2
|
|
|
|
|
- }))
|
|
|
|
|
- return n0
|
|
|
|
|
-}"
|
|
|
|
|
-`;
|
|
|
|
|
-
|
|
|
|
|
exports[`compiler: v-for > w/o value 1`] = `
|
|
exports[`compiler: v-for > w/o value 1`] = `
|
|
|
"import { createFor as _createFor, template as _template } from 'vue';
|
|
"import { createFor as _createFor, template as _template } from 'vue';
|
|
|
const t0 = _template("<div>item</div>", true)
|
|
const t0 = _template("<div>item</div>", true)
|