Skip to content

Commit d4c9063

Browse files
committed
test: add v-cloak case
1 parent f41981b commit d4c9063

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

index.html

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ <h2>Tests</h2>
2222
<li><a href="/tests/html.html">v-html</a></li>
2323
<li><a href="/tests/text.html">v-text</a></li>
2424
<li><a href="/tests/pre.html">v-pre</a></li>
25+
<li><a href="/tests/cloak.html">v-cloak</a></li>
2526
<li><a href="/tests/reactive.html">reactive</a></li>
2627
<li><a href="/tests/multi-mount.html">Multi mount</a></li>
2728
<li><a href="/tests/custom-delimiters.html">Custom delimiters</a></li>

tests/cloak.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<script type="module">
2+
import { createApp } from '../src'
3+
createApp({
4+
msg: 'content',
5+
hide: false
6+
}).mount()
7+
</script>
8+
9+
<div v-scope v-cloak>
10+
<div v-cloak v-if="!hide">{{ msg }}</div>
11+
<button @click="hide = !hide">toggle</button>
12+
</div>
13+
14+
<style>
15+
[v-cloak] {
16+
display: none;
17+
}
18+
</style>

0 commit comments

Comments
 (0)