From c9beaf691653e40f99721aa6a6b91f78b3384992 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Fri, 24 Nov 2023 15:37:49 +0800 Subject: [PATCH] feat: v-pre --- README.md | 2 +- .../compiler-vapor/__tests__/__snapshots__/basic.test.ts.snap | 2 +- packages/compiler-vapor/__tests__/fixtures/counter.vue | 1 + playground/src/App.vue | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index adc959e75d..bb207d5028 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ See the To-do list below or `// TODO` comments in code (`compiler-vapor` and `ru - [x] `v-once` - [x] `v-html` - [x] `v-text` - - [ ] `v-pre` + - [x] `v-pre` - [ ] `v-cloak` - [ ] `v-on` / `v-bind` - [x] simple expression diff --git a/packages/compiler-vapor/__tests__/__snapshots__/basic.test.ts.snap b/packages/compiler-vapor/__tests__/__snapshots__/basic.test.ts.snap index d0365c84f2..1a578cd93e 100644 --- a/packages/compiler-vapor/__tests__/__snapshots__/basic.test.ts.snap +++ b/packages/compiler-vapor/__tests__/__snapshots__/basic.test.ts.snap @@ -4,7 +4,7 @@ exports[`basic 1`] = ` "import { defineComponent as _defineComponent } from 'vue' import { watchEffect } from 'vue' import { template, insert, setText, on, setHtml } from 'vue/vapor' -const t0 = template(\`

Counter

Count:

Double:

once:

\`) +const t0 = template(\`

Counter

Count:

Double:

once:

{{ count }}

\`) import { ref, computed } from 'vue' const html = 'HTML' diff --git a/packages/compiler-vapor/__tests__/fixtures/counter.vue b/packages/compiler-vapor/__tests__/fixtures/counter.vue index 17d24cb353..c780b459de 100644 --- a/packages/compiler-vapor/__tests__/fixtures/counter.vue +++ b/packages/compiler-vapor/__tests__/fixtures/counter.vue @@ -17,4 +17,5 @@ const html = 'HTML'

once: {{ count }}

+

{{ count }}

diff --git a/playground/src/App.vue b/playground/src/App.vue index 1abab002cf..df8ef70cb9 100644 --- a/playground/src/App.vue +++ b/playground/src/App.vue @@ -32,6 +32,7 @@ globalThis.html = html
once: {{ count }}
+
{{ count }}
-- 2.47.3