Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 02ffabd

Browse files
Update basic.md
1 parent a18ae5d commit 02ffabd

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

docs/vue-integration/basic.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,39 @@
11
# Basic
22

3-
To use Vue, add HTML elements with appropriate Vue.js markers.
3+
## Load Vue on your page
44

5-
For example, see demo of `v-for` usage.
5+
Add the Vue script as a script tag. Here is an example using Vue and then Docsify loaded after `scrip the `window.$docsify` pa
66

7-
## Code
7+
```
8+
<script>
9+
window.$docsify = {
10+
// ...
11+
}
12+
</script>
13+
14+
<script src="//cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
15+
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
16+
```
17+
18+
19+
## Add Vue elements
20+
21+
Next, add HTML elements which have appropriate Vue.js syntax.
22+
23+
Note that you do not have to setup `Vue()` in any script tag - you only need the HTML.
24+
25+
For example, see a demo of `v-for` usage.
26+
27+
### Code
828

929
```html
1030
<ul>
11-
<li v-for="i in 10">{{ i }}</li>
31+
<li v-for="i in 10">{{ i }}</li>
1232
</ul>
1333
```
1434

15-
## Result
35+
### Result
1636

1737
<ul>
18-
<li v-for="i in 10">{{ i }}</li>
38+
<li v-for="i in 10">{{ i }}</li>
1939
</ul>

0 commit comments

Comments
 (0)