File tree Expand file tree Collapse file tree 1 file changed +54
-1
lines changed Expand file tree Collapse file tree 1 file changed +54
-1
lines changed Original file line number Diff line number Diff line change 1
1
# vue-demonstration
2
2
3
- > Vue-based element docs's demo code style component, asily add examples to your vue project to show your code.
3
+ > Vue-based element docs's demo code style component, easily add examples to your Vue project to show your code.
4
+
5
+ ## Install
6
+
7
+ ``` bash
8
+ npm install vue-demonstration -S
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ``` bash
14
+ import Vue from ' vue'
15
+ import VueDemo from ' vue-demonstration'
16
+
17
+ Vue.component(' vue-demonstration' , VueDemo)
18
+ ```
19
+
20
+ For more information, please refer to [ vue-demonstration] ( http://savoygu.github.io/vue-demonstration ) in our documentation.
21
+
22
+ ## Usage
23
+
24
+ ```
25
+ <template>
26
+ <vue-demonstration
27
+ title="标题"
28
+ description="标题描述"
29
+ anchor="锚点"
30
+ tag="标题标签" <!-- h2 / h3-->
31
+ :highlight="sourcecode">
32
+ <template slot="source">
33
+ <div>your code</div> <!-- 源代码-->
34
+ </template>
35
+ <template slot="explanation">
36
+ 代码描述
37
+ </template>
38
+ </vue-demonstration>
39
+ </template>
40
+ <script>
41
+ const sourcecode = `<div>your code</div>`
42
+ export default {
43
+ data () {
44
+ sourcecode
45
+ }
46
+ }
47
+ </script>
48
+ ```
49
+
50
+ If you want to add some javascript code to ` sourcecode ` ,you need to put the ` sourcecode ` into a js file.
4
51
5
52
## Build Setup
6
53
@@ -19,4 +66,10 @@ npm run demo:prepublish
19
66
20
67
# build for production with minification
21
68
npm run build
69
+
70
+ # generate gh-pages
71
+ npm run deploy
22
72
```
73
+ ## LICENSE
74
+
75
+ [ MIT] ( http://opensource.org/licenses/MIT )
You can’t perform that action at this time.
0 commit comments