三咲智子 Kevin Deng 2 лет назад
Родитель
Сommit
b70aa0a9a0
3 измененных файлов с 6 добавлено и 1 удалено
  1. 1 1
      README.md
  2. 4 0
      packages/compiler-vapor/src/transform.ts
  3. 1 0
      playground/src/App.vue

+ 1 - 1
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

+ 4 - 0
packages/compiler-vapor/src/transform.ts

@@ -385,6 +385,10 @@ function transformProp(
       ctx.once = true
       break
     }
+    case 'cloak': {
+      // do nothing
+      break
+    }
   }
 }
 

+ 1 - 0
playground/src/App.vue

@@ -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>