]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
feat: v-cloak
author三咲智子 Kevin Deng <sxzz@sxzz.moe>
Fri, 24 Nov 2023 07:40:38 +0000 (15:40 +0800)
committer三咲智子 Kevin Deng <sxzz@sxzz.moe>
Fri, 24 Nov 2023 07:40:38 +0000 (15:40 +0800)
README.md
packages/compiler-vapor/src/transform.ts
playground/src/App.vue

index bb207d5028cb7ca3eb3a21c55896ec297596fb84..0b0edbd829a306c05f9db8c18d2edec1196993a9 100644 (file)
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ See the To-do list below or `// TODO` comments in code (`compiler-vapor` and `ru
   - [x] `v-html`
   - [x] `v-text`
   - [x] `v-pre`
-  - [ ] `v-cloak`
+  - [x] `v-cloak`
   - [ ] `v-on` / `v-bind`
     - [x] simple expression
     - [ ] compound expression
index d529b83045b11281b98501069e1e556d31824132..3ce7ff37525aec4b8fa4a8627302e7721d60f452 100644 (file)
@@ -385,6 +385,10 @@ function transformProp(
       ctx.once = true
       break
     }
+    case 'cloak': {
+      // do nothing
+      break
+    }
   }
 }
 
index df8ef70cb9160a9adb79f45076a0cea7211547fc..d153fd5040e0d5e4c67db56a12d5524df1f33768 100644 (file)
@@ -33,6 +33,7 @@ globalThis.html = html
     <div v-text="html" />
     <div v-once>once: {{ count }}</div>
     <div v-pre>{{ count }}</div>
+    <div v-cloak>{{ count }}</div>
   </div>
 </template>