1
1
# vue-demonstration
2
2
3
- > Vue-based element docs's demo code style component, easily add examples to your Vue project to show your code.
3
+ > Element 1.x 代码示例展示风格。帮助你展示你的 Vuejs 组件示例。
4
4
5
- ## Install
5
+ ## 安装
6
6
7
7
``` bash
8
- npm install vue-demonstration -S
8
+ npm install vue-demonstration --save
9
9
```
10
10
11
- ## Quick Start
12
-
11
+ ## 快速开始
12
+
13
13
``` bash
14
14
import Vue from ' vue'
15
15
import VueDemo from ' vue-demonstration'
16
-
16
+
17
17
Vue.component(' vue-demonstration' , VueDemo)
18
18
```
19
-
20
- For more information, please refer to [ vue-demonstration] ( https://demonstration.savoygu.com/vue-demonstration ) in our documentation.
21
-
22
- ## Usage
23
-
24
- ```
19
+
20
+ 更多使用方式,参考文档:[ vue-demonstration] ( https://demonstration.savoygu.com/vue-demonstration )
21
+
22
+ ## 使用方式
23
+
24
+ ``` html
25
+
25
26
<template >
26
27
<vue-demonstration
27
28
title =" 标题"
@@ -37,6 +38,7 @@ For more information, please refer to [vue-demonstration](https://demonstration.
37
38
</template >
38
39
</vue-demonstration >
39
40
</template >
41
+
40
42
<script >
41
43
const sourcecode = ` <div>your code</div>`
42
44
export default {
@@ -47,13 +49,15 @@ For more information, please refer to [vue-demonstration](https://demonstration.
47
49
}
48
50
}
49
51
</script >
52
+
50
53
```
51
54
52
- If you want to add some javascript code to ` sourcecode ` ,you need to put the ` sourcecode ` into a js file.
55
+ 如果要展示的代码较多的话,可以单独放一个文件中。
53
56
54
- ## Build Setup
57
+ ## 运行方式和构建
55
58
56
59
``` bash
60
+
57
61
# install dependencies
58
62
npm install
59
63
@@ -71,7 +75,9 @@ npm run build
71
75
72
76
# generate gh-pages
73
77
npm run deploy
78
+
74
79
```
80
+
75
81
## LICENSE
76
82
77
83
[ MIT] ( http://opensource.org/licenses/MIT )
0 commit comments