-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
35 lines (35 loc) · 885 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pvue</title>
<style>
[v-cloak] {
display: none;
}
</style>
</head>
<body>
<!-- 测试 -->
<div
id="app"
v-cloak
v-scope="{ open: true, elseOpen: true,htm:'<div>html<div>'}"
>
<button @click="open = !open">toggle</button>
<button @click="elseOpen = !elseOpen">toggle else</button>
<div v-if="open">ok</div>
<div v-else-if="elseOpen">else if</div>
<div v-else>else</div>
<div v-show="open">show</div>
<div v-html="htm"></div>
<ul>
<li v-for="item of list" :key="item.id">
<p>{{item.text}}</p>
</li>
</ul>
</div>
<script type="module" src="./main.ts"></script>
</body>
</html>