|
@@ -110,7 +110,7 @@ export function render() {
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`comile > directives > v-once > basic 1`] = `
|
|
exports[`comile > directives > v-once > basic 1`] = `
|
|
|
-"import { template, children, createTextNode, setText, setAttr, insert } from 'vue/vapor';
|
|
|
|
|
|
|
+"import { template, children, createTextNode, setText, setAttr, prepend } from 'vue/vapor';
|
|
|
const t0 = template('<div> <span></span></div>');
|
|
const t0 = template('<div> <span></span></div>');
|
|
|
export function render() {
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
const n0 = t0();
|
|
@@ -118,14 +118,14 @@ export function render() {
|
|
|
0: [
|
|
0: [
|
|
|
n3,
|
|
n3,
|
|
|
{
|
|
{
|
|
|
- 2: [n2],
|
|
|
|
|
|
|
+ 1: [n2],
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|
|
|
} = children(n0);
|
|
} = children(n0);
|
|
|
const n1 = createTextNode(msg.value);
|
|
const n1 = createTextNode(msg.value);
|
|
|
setText(n1, undefined, msg.value);
|
|
setText(n1, undefined, msg.value);
|
|
|
setAttr(n2, 'class', undefined, clz.value);
|
|
setAttr(n2, 'class', undefined, clz.value);
|
|
|
- insert(n1, n3, 0 /* InsertPosition.FIRST */);
|
|
|
|
|
|
|
+ prepend(n3, n1);
|
|
|
return n0;
|
|
return n0;
|
|
|
}
|
|
}
|
|
|
"
|
|
"
|
|
@@ -197,19 +197,49 @@ export function render() {
|
|
|
|
|
|
|
|
exports[`comile > static + dynamic root 1`] = `
|
|
exports[`comile > static + dynamic root 1`] = `
|
|
|
"import { watchEffect } from 'vue';
|
|
"import { watchEffect } from 'vue';
|
|
|
-import { template, createTextNode, insert, setText } from 'vue/vapor';
|
|
|
|
|
-const t0 = template('2');
|
|
|
|
|
|
|
+import { template, children, createTextNode, prepend, insert, append, setText } from 'vue/vapor';
|
|
|
|
|
+const t0 = template('3<!>6<!>9');
|
|
|
export function render() {
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
const n0 = t0();
|
|
|
|
|
+ const {
|
|
|
|
|
+ 1: [n9],
|
|
|
|
|
+ 3: [n10],
|
|
|
|
|
+ } = children(n0);
|
|
|
const n1 = createTextNode(1);
|
|
const n1 = createTextNode(1);
|
|
|
- const n2 = createTextNode(3);
|
|
|
|
|
- insert(n1, n0, 0 /* InsertPosition.FIRST */);
|
|
|
|
|
- insert(n2, n0);
|
|
|
|
|
|
|
+ const n2 = createTextNode(2);
|
|
|
|
|
+ const n3 = createTextNode(4);
|
|
|
|
|
+ const n4 = createTextNode(5);
|
|
|
|
|
+ const n5 = createTextNode(7);
|
|
|
|
|
+ const n6 = createTextNode(8);
|
|
|
|
|
+ const n7 = createTextNode('A');
|
|
|
|
|
+ const n8 = createTextNode('B');
|
|
|
|
|
+ prepend(n0, n1, n2);
|
|
|
|
|
+ insert([n3, n4], n0, n9);
|
|
|
|
|
+ insert([n5, n6], n0, n10);
|
|
|
|
|
+ append(n0, n7, n8);
|
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
|
setText(n1, undefined, 1);
|
|
setText(n1, undefined, 1);
|
|
|
});
|
|
});
|
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
|
- setText(n2, undefined, 3);
|
|
|
|
|
|
|
+ setText(n2, undefined, 2);
|
|
|
|
|
+ });
|
|
|
|
|
+ watchEffect(() => {
|
|
|
|
|
+ setText(n3, undefined, 4);
|
|
|
|
|
+ });
|
|
|
|
|
+ watchEffect(() => {
|
|
|
|
|
+ setText(n4, undefined, 5);
|
|
|
|
|
+ });
|
|
|
|
|
+ watchEffect(() => {
|
|
|
|
|
+ setText(n5, undefined, 7);
|
|
|
|
|
+ });
|
|
|
|
|
+ watchEffect(() => {
|
|
|
|
|
+ setText(n6, undefined, 8);
|
|
|
|
|
+ });
|
|
|
|
|
+ watchEffect(() => {
|
|
|
|
|
+ setText(n7, undefined, 'A');
|
|
|
|
|
+ });
|
|
|
|
|
+ watchEffect(() => {
|
|
|
|
|
+ setText(n8, undefined, 'B');
|
|
|
});
|
|
});
|
|
|
return n0;
|
|
return n0;
|
|
|
}
|
|
}
|