25
25
<li ><a href =" https://zarm.design" >首页</a ></li >
26
26
<li ><a href =" https://zarm.design/#/components/quick-start" >React 组件</a ></li >
27
27
<li ><a href =" #/documents/quick-start" class =" active" >Vue 组件</a ></li >
28
+ <li ><a href =" https://zarm.design/#/design/download" >设计</a ></li >
28
29
<li ><a href =" https://github.com/ZhonganTechENG/zarm-vue" target =" _blank" rel =" noopener noreferrer" >Github</a ></li >
29
30
</ul >
30
31
</nav >
34
35
35
36
<script >
36
37
import Format from ' ../../utils/format' ;
37
- import Demo from ' ../../demos' ;
38
+ import Demo from ' ../../demos' ;
39
+
38
40
export default {
39
41
data () {
40
42
return {
41
43
Demo,
42
44
componentList: [],
43
45
componentName: ' ' ,
44
46
options: [],
45
- value: ' '
47
+ value: ' ' ,
46
48
};
47
49
},
48
50
created () {
@@ -53,39 +55,39 @@ export default {
53
55
},
54
56
mounted () {
55
57
docsearch ({
56
- apiKey: ' 59f746e0b69134f4afaece614544e197' ,
57
- indexName: ' zarm-vue' ,
58
+ apiKey: ' 59f746e0b69134f4afaece614544e197' ,
59
+ indexName: ' zarm-vue' ,
58
60
inputSelector: ' .search input' ,
59
61
debug: false ,
60
62
});
61
63
},
62
64
watch: {
63
- " $route" (val) {
65
+ $route (val) {
64
66
const { path } = this .$route ;
65
- this .activeName = path .replace (' /documents/' , ' ' )
66
- }
67
+ this .activeName = path .replace (' /documents/' , ' ' );
68
+ },
67
69
},
68
70
methods: {
69
71
initComponentList () {
70
72
const { components } = this .Demo ;
71
73
const List = [... components .form , ... components .feedback , ... components .view , ... components .navigation , ... components .other ];
72
74
this .componentList = List .map (i => (
73
- { label: i .name + ' ' + i .description , value: Format .camel2Dash (i .name ) }
75
+ { label: ` ${ i .name } ${ i .description } ` , value: Format .camel2Dash (i .name ) }
74
76
));
75
77
},
76
78
handleChange (val ) {
77
79
console .log (val);
78
80
const v = this .$store .state .version ;
79
81
this .$router .push ({
80
82
path: ` ${ Format .camel2Dash (val)} ` ,
81
- query: { v }
83
+ query: { v },
82
84
});
83
85
this .componentName = ' ' ;
84
86
},
85
87
handleVerChange (val ) {
86
88
window .location = this .options .find (i => i .value === val).path ;
87
- }
88
- }
89
+ },
90
+ },
89
91
};
90
92
</script >
91
93
@@ -128,6 +130,7 @@ export default {
128
130
float : left ;
129
131
margin-top : 16px ;
130
132
margin-left : 50px ;
133
+ font-size : 14px ;
131
134
132
135
input {
133
136
display : inline-block ;
@@ -165,8 +168,8 @@ export default {
165
168
166
169
.version {
167
170
float : right ;
168
- margin-top : 15px ;
169
- margin-right : 30 px ;
171
+ margin : 15px 30 px 0 80 px ;
172
+ width : 130 px ;
170
173
171
174
.tag-input-box {
172
175
width : 130px ;
0 commit comments