|
|
@@ -3,7 +3,7 @@
|
|
|
exports[`comile > bindings 1`] = `
|
|
|
"import { watchEffect } from 'vue';
|
|
|
import { template, children, createTextNode, insert, setText } from 'vue/vapor';
|
|
|
-const t0 = template(\`<div>count is <!>.</div>\`);
|
|
|
+const t0 = template('<div>count is <!>.</div>');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
const {
|
|
|
@@ -27,7 +27,7 @@ export function render() {
|
|
|
exports[`comile > directives > v-bind > simple expression 1`] = `
|
|
|
"import { watchEffect } from 'vue';
|
|
|
import { template, children, setAttr } from 'vue/vapor';
|
|
|
-const t0 = template(\`<div></div>\`);
|
|
|
+const t0 = template('<div></div>');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
const {
|
|
|
@@ -44,7 +44,7 @@ export function render() {
|
|
|
exports[`comile > directives > v-html > no expression 1`] = `
|
|
|
"import { watchEffect } from 'vue';
|
|
|
import { template, children, setHtml } from 'vue/vapor';
|
|
|
-const t0 = template(\`<div></div>\`);
|
|
|
+const t0 = template('<div></div>');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
const {
|
|
|
@@ -61,7 +61,7 @@ export function render() {
|
|
|
exports[`comile > directives > v-html > simple expression 1`] = `
|
|
|
"import { watchEffect } from 'vue';
|
|
|
import { template, children, setHtml } from 'vue/vapor';
|
|
|
-const t0 = template(\`<div></div>\`);
|
|
|
+const t0 = template('<div></div>');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
const {
|
|
|
@@ -78,7 +78,7 @@ export function render() {
|
|
|
exports[`comile > directives > v-on > simple expression 1`] = `
|
|
|
"import { watchEffect } from 'vue';
|
|
|
import { template, children, on } from 'vue/vapor';
|
|
|
-const t0 = template(\`<div></div>\`);
|
|
|
+const t0 = template('<div></div>');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
const {
|
|
|
@@ -95,7 +95,7 @@ export function render() {
|
|
|
exports[`comile > directives > v-once > as root node 1`] = `
|
|
|
"import { watchEffect } from 'vue';
|
|
|
import { template, children, setAttr } from 'vue/vapor';
|
|
|
-const t0 = template(\`<div></div>\`);
|
|
|
+const t0 = template('<div></div>');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
const {
|
|
|
@@ -111,7 +111,7 @@ export function render() {
|
|
|
|
|
|
exports[`comile > directives > v-once > basic 1`] = `
|
|
|
"import { template, children, createTextNode, insert, setText, setAttr } from 'vue/vapor';
|
|
|
-const t0 = template(\`<div> <span></span></div>\`);
|
|
|
+const t0 = template('<div> <span></span></div>');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
const {
|
|
|
@@ -134,7 +134,7 @@ export function render() {
|
|
|
exports[`comile > directives > v-text > no expression 1`] = `
|
|
|
"import { watchEffect } from 'vue';
|
|
|
import { template, children, setText } from 'vue/vapor';
|
|
|
-const t0 = template(\`<div></div>\`);
|
|
|
+const t0 = template('<div></div>');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
const {
|
|
|
@@ -151,7 +151,7 @@ export function render() {
|
|
|
exports[`comile > directives > v-text > simple expression 1`] = `
|
|
|
"import { watchEffect } from 'vue';
|
|
|
import { template, children, setText } from 'vue/vapor';
|
|
|
-const t0 = template(\`<div></div>\`);
|
|
|
+const t0 = template('<div></div>');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
const {
|
|
|
@@ -165,9 +165,30 @@ export function render() {
|
|
|
"
|
|
|
`;
|
|
|
|
|
|
+exports[`comile > dynamic root 1`] = `
|
|
|
+"import { watchEffect } from 'vue';
|
|
|
+import { fragment, createTextNode, insert, setText } from 'vue/vapor';
|
|
|
+export function render() {
|
|
|
+ const t0 = fragment();
|
|
|
+ const n0 = t0();
|
|
|
+ const n1 = createTextNode(1);
|
|
|
+ insert(n1, n0, 0 /* InsertPosition.FIRST */);
|
|
|
+ const n2 = createTextNode(2);
|
|
|
+ insert(n2, n0);
|
|
|
+ watchEffect(() => {
|
|
|
+ setText(n1, undefined, 1);
|
|
|
+ });
|
|
|
+ watchEffect(() => {
|
|
|
+ setText(n2, undefined, 2);
|
|
|
+ });
|
|
|
+ return n0;
|
|
|
+}
|
|
|
+"
|
|
|
+`;
|
|
|
+
|
|
|
exports[`comile > fragment 1`] = `
|
|
|
"import { template } from 'vue/vapor';
|
|
|
-const t0 = template(\`<p></p><span></span><div></div>\`);
|
|
|
+const t0 = template('<p></p><span></span><div></div>');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
return n0;
|
|
|
@@ -178,7 +199,7 @@ export function render() {
|
|
|
exports[`comile > static + dynamic root 1`] = `
|
|
|
"import { watchEffect } from 'vue';
|
|
|
import { template, createTextNode, insert, setText } from 'vue/vapor';
|
|
|
-const t0 = template(\`2\`);
|
|
|
+const t0 = template('2');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
const n1 = createTextNode(1);
|
|
|
@@ -198,7 +219,7 @@ export function render() {
|
|
|
|
|
|
exports[`comile > static template 1`] = `
|
|
|
"import { template } from 'vue/vapor';
|
|
|
-const t0 = template(\`<div><p>hello</p><input><span></span></div>\`);
|
|
|
+const t0 = template('<div><p>hello</p><input><span></span></div>');
|
|
|
export function render() {
|
|
|
const n0 = t0();
|
|
|
return n0;
|