Commit d59b2d89e90f2190d05ba9c710b0b76c8dd3c308
1 parent
fe44789e30
Exists in
master
madd appManage page
Showing
4 changed files
with
161 additions
and
565 deletions
Show diff stats
src/router/modules/application.js
... | ... | @@ -13,13 +13,24 @@ const applicationRouter = { |
13 | 13 | }, |
14 | 14 | children: [{ |
15 | 15 | path: 'appManage', |
16 | - component: () => import('@/views/application/appManage'), | |
16 | + component: () => import('@/views/application/appManage'), // 应用管理/添加 | |
17 | 17 | name: 'appManage', |
18 | 18 | meta: { |
19 | 19 | title: '应用管理', |
20 | 20 | icon: 'component', |
21 | 21 | roles: ['admin', 'assistant'] // or you can only set roles in sub nav |
22 | 22 | } |
23 | - }] | |
23 | + }, | |
24 | + { | |
25 | + path: 'appList', | |
26 | + component: () => import('@/views/application/appList'), // 应用列表 | |
27 | + name: 'appList', | |
28 | + meta: { | |
29 | + title: '应用列表', | |
30 | + icon: 'list', | |
31 | + roles: ['admin', 'assistant'] // or you can only set roles in sub nav | |
32 | + } | |
33 | + } | |
34 | + ] | |
24 | 35 | } |
25 | 36 | export default applicationRouter | ... | ... |
src/views/application/appList.vue
... | ... | @@ -0,0 +1,82 @@ |
1 | +<template> | |
2 | + <el-container class="app-container"> | |
3 | + <el-header> | |
4 | + 应用列表 | |
5 | + </el-header> | |
6 | + <el-main> | |
7 | + asd | |
8 | + </el-main> | |
9 | + <el-aside> | |
10 | + <el-input v-model="filterText" placeholder="Filter keyword" style="margin-bottom:30px;" /> | |
11 | + <el-tree | |
12 | + ref="tree2" | |
13 | + :data="data2" | |
14 | + :props="defaultProps" | |
15 | + :filter-node-method="filterNode" | |
16 | + class="filter-tree" | |
17 | + default-expand-all | |
18 | + /> | |
19 | + </el-aside> | |
20 | + | |
21 | + </el-container> | |
22 | +</template> | |
23 | + | |
24 | +<script> | |
25 | +export default { | |
26 | + | |
27 | + data() { | |
28 | + return { | |
29 | + filterText: '', | |
30 | + data2: [{ | |
31 | + id: 1, | |
32 | + label: 'Level one 1', | |
33 | + children: [{ | |
34 | + id: 4, | |
35 | + label: 'Level two 1-1' }, | |
36 | + { | |
37 | + id: 10, | |
38 | + label: 'Level three 1-1-2' | |
39 | + } | |
40 | + ] | |
41 | + }, { | |
42 | + id: 2, | |
43 | + label: 'Level one 2', | |
44 | + children: [{ | |
45 | + id: 5, | |
46 | + label: 'Level two 2-1' | |
47 | + }, { | |
48 | + id: 6, | |
49 | + label: 'Level two 2-2' | |
50 | + }] | |
51 | + }, { | |
52 | + id: 3, | |
53 | + label: 'Level one 3', | |
54 | + children: [{ | |
55 | + id: 7, | |
56 | + label: 'Level two 3-1' | |
57 | + }, { | |
58 | + id: 8, | |
59 | + label: 'Level two 3-2' | |
60 | + }] | |
61 | + }], | |
62 | + defaultProps: { | |
63 | + children: 'children', | |
64 | + label: 'label' | |
65 | + } | |
66 | + } | |
67 | + }, | |
68 | + watch: { | |
69 | + filterText(val) { | |
70 | + this.$refs.tree2.filter(val) | |
71 | + } | |
72 | + }, | |
73 | + | |
74 | + methods: { | |
75 | + filterNode(value, data) { | |
76 | + if (!value) return true | |
77 | + return data.label.indexOf(value) !== -1 | |
78 | + } | |
79 | + } | |
80 | +} | |
81 | +</script> | |
82 | + | ... | ... |
src/views/application/appManage.vue
1 | 1 | <template> |
2 | - <div class="login-container"> | |
3 | - <el-button | |
4 | - type="primary" | |
5 | - @click="() => addNode()" | |
6 | - >{{ $t('users.add') }}</el-button> | |
7 | - <el-tree | |
8 | - ref="tree" | |
9 | - :data="data" | |
10 | - show-checkbox | |
11 | - node-key="id" | |
12 | - highlight-current | |
13 | - check-strictly | |
14 | - indent="40" | |
15 | - icon-class="el-icon-pc" | |
16 | - :props="defaultProps" | |
17 | - > | |
18 | - <!-- <el-tree | |
19 | - :data="data" | |
20 | - show-checkbox | |
21 | - node-key="id" | |
22 | - default-expand-all | |
23 | - highlight-current | |
24 | - isLeaf | |
25 | - @node-contextmenu="()=>rightKey(node, data)" | |
26 | - check-strictly//在显示复选框的情况下,是否严格的遵循父子不互相关联的做法,默认为 false | |
27 | - :expand-on-click-node="false"//是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点。 | |
28 | - :props="defaultProps" | |
29 | - > --> | |
30 | - <span | |
31 | - slot-scope="{ node, data }" | |
32 | - class="custom-tree-node" | |
33 | - > | |
34 | - <span>{{ node.label }}</span> | |
35 | - <span> | |
36 | - <el-button | |
37 | - type="primary" | |
38 | - icon="el-icon-upload" | |
39 | - size="mini" | |
40 | - @click="() => append(data)" | |
41 | - > | |
42 | - {{ $t('users.add') }} | |
43 | - </el-button> | |
44 | - <el-button | |
45 | - type="primary" | |
46 | - icon="el-icon-edit" | |
47 | - size="mini" | |
48 | - @click="() => update(node, data)" | |
49 | - > | |
50 | - {{ $t('users.update') }} | |
51 | - </el-button> | |
52 | - <el-button | |
53 | - type="primary" | |
54 | - icon="el-icon-delete" | |
55 | - size="mini" | |
56 | - class="danger" | |
57 | - @click="() => remove(node, data)" | |
58 | - > | |
59 | - {{ $t('users.del') }} | |
60 | - </el-button> | |
61 | - </span> | |
62 | - </span> | |
63 | - </el-tree> | |
2 | + <el-container class="app-container"> | |
3 | + <el-header> | |
4 | + 添加一个新应用(管理员不允许直接添加应用) | |
5 | + </el-header> | |
6 | + <el-main> | |
7 | + <el-form ref="form" :model="form" label-width="120px"> | |
8 | + <el-form-item label="app_name"> | |
9 | + <el-input v-model="form.app_name" /> | |
10 | + </el-form-item> | |
64 | 11 | |
65 | - <!-- <div class="buttons"> | |
66 | - <el-button @click="getCheckedNodes">通过 node 获取</el-button> | |
67 | - <el-button @click="getCheckedKeys">通过 key 获取</el-button> | |
68 | - <el-button @click="setCheckedNodes">通过 node 设置</el-button> | |
69 | - <el-button @click="setCheckedKeys">通过 key 设置</el-button> | |
70 | - <el-button @click="resetChecked">清空</el-button> | |
71 | - </div> --> | |
72 | - </div> | |
12 | + <el-form-item label="app_type"> | |
13 | + <el-radio-group v-model="form.app_type"> | |
14 | + <el-radio label="自建站" /> | |
15 | + <el-radio label="自营小程序" /> | |
16 | + <el-radio label="淘宝店" /> | |
17 | + <el-radio label="微店" /> | |
18 | + <el-radio label="亚马逊店" /> | |
19 | + <el-radio label="易贝店" /> | |
20 | + <el-radio label="拼多多店" /> | |
21 | + <el-radio label="抖音店" /> | |
22 | + <el-radio label="朋友圈店" /> | |
23 | + </el-radio-group> | |
24 | + </el-form-item> | |
25 | + | |
26 | + <el-form-item label="app_desc"> | |
27 | + <el-input v-model="form.app_desc" type="textarea" /> | |
28 | + </el-form-item> | |
29 | + <el-form-item label="app_api_key"> | |
30 | + <el-input v-model="form.app_api_key" /> | |
31 | + </el-form-item> | |
32 | + <el-form-item label="app_user_defined"> | |
33 | + <el-input v-model="form.app_user_defined" /> | |
34 | + </el-form-item> | |
35 | + | |
36 | + <el-form-item label="app_area_defined"> | |
37 | + <el-input v-model="form.app_area_defined" /> | |
38 | + </el-form-item> | |
39 | + | |
40 | + <el-form-item label="app_lang_defined"> | |
41 | + <el-input v-model="form.app_lang_defined" /> | |
42 | + </el-form-item> | |
43 | + | |
44 | + <el-form-item> | |
45 | + <el-button type="primary" @click="onSubmit">添加</el-button> | |
46 | + </el-form-item> | |
47 | + </el-form> | |
48 | + </el-main> | |
49 | + </el-container> | |
73 | 50 | </template> |
51 | + | |
74 | 52 | <script> |
75 | -let id = 1000 | |
76 | 53 | export default { |
77 | 54 | data() { |
78 | 55 | return { |
79 | - data: [ | |
80 | - { | |
81 | - label: '成镜', | |
82 | - id: '1', | |
83 | - children: [ | |
84 | - { | |
85 | - label: '款式', | |
86 | - id: '11', | |
87 | - children: [ | |
88 | - { label: '青春学子风' }, | |
89 | - { label: '休闲' }, | |
90 | - { label: '商务' }, | |
91 | - { label: '复古' }, | |
92 | - { label: '时尚' }, | |
93 | - { label: '质感哥特潮' }, | |
94 | - { label: '轻简北欧风' }, | |
95 | - { label: '理性几何派' }, | |
96 | - { label: '多元新风尚' }, | |
97 | - { label: '立体巴洛克' }, | |
98 | - { label: '有机未来时' }, | |
99 | - { label: '无界人文系' }, | |
100 | - { label: '自然舒视角' }, | |
101 | - { label: '流线洛可可' }, | |
102 | - { label: '奶奶风' }, | |
103 | - { label: '简约-极简文艺范' }, | |
104 | - { label: '运动风' }, | |
105 | - { label: '行政风' }, | |
106 | - { label: '折射率' } | |
107 | - ] | |
108 | - }, | |
109 | - { label: '个性化服务', id: '267', children: [] }, | |
110 | - { | |
111 | - label: '赠品', | |
112 | - id: '259', | |
113 | - children: [{ label: '眼镜布' }, { label: '眼镜盒' }] | |
114 | - }, | |
115 | - { | |
116 | - label: '场景', | |
117 | - id: '258', | |
118 | - children: [ | |
119 | - { label: '学校场景' }, | |
120 | - { label: '出行交际' }, | |
121 | - { label: '夜店迷人' }, | |
122 | - { label: '明星同款' } | |
123 | - ] | |
124 | - }, | |
125 | - { | |
126 | - label: '销售保障', | |
127 | - id: '245', | |
128 | - children: [ | |
129 | - { label: '可退' }, | |
130 | - { label: '可换' }, | |
131 | - { label: '可修' } | |
132 | - ] | |
133 | - }, | |
134 | - { | |
135 | - label: '功能', | |
136 | - id: '140', | |
137 | - children: [ | |
138 | - { label: '防踩压' }, | |
139 | - { label: '防扭曲' }, | |
140 | - { label: '抗过敏' }, | |
141 | - { label: '防腐蚀' }, | |
142 | - { label: '耐磨损' }, | |
143 | - { label: '抗蓝光' } | |
144 | - ] | |
145 | - }, | |
146 | - { | |
147 | - label: '品牌', | |
148 | - id: '71', | |
149 | - children: [ | |
150 | - { label: '购易' }, | |
151 | - { label: '海俪恩' }, | |
152 | - { label: '沙漠风暴' }, | |
153 | - { label: '古诗' }, | |
154 | - { label: '暴龙' }, | |
155 | - { label: '犀牛' }, | |
156 | - { label: 'Ray-Ban雷朋' }, | |
157 | - { label: 'PARIM派丽蒙' }, | |
158 | - { label: '石狼' }, | |
159 | - { label: '木九十' } | |
160 | - ] | |
161 | - }, | |
162 | - { | |
163 | - label: '边形', | |
164 | - id: '49', | |
165 | - children: [ | |
166 | - { label: '半框' }, | |
167 | - { label: '全框' }, | |
168 | - { label: '无框' } | |
169 | - ] | |
170 | - }, | |
171 | - { | |
172 | - label: '性别', | |
173 | - id: '23', | |
174 | - children: [{ label: '男性' }, { label: '女性' }] | |
175 | - }, | |
176 | - { | |
177 | - label: '梁型', | |
178 | - id: '20', | |
179 | - children: [{ label: '双梁' }, { label: '单梁' }] | |
180 | - }, | |
181 | - { | |
182 | - label: '重量', | |
183 | - id: '19', | |
184 | - children: [{ label: '30克以下' }, { label: '80克以上' }] | |
185 | - }, | |
186 | - { | |
187 | - label: '适用脸型', | |
188 | - id: '15', | |
189 | - children: [{ label: '方' }, { label: '圆' }, { label: '瓜子' }] | |
190 | - }, | |
191 | - { | |
192 | - label: '形状', | |
193 | - id: '14', | |
194 | - children: [ | |
195 | - { label: '正圆形' }, | |
196 | - { label: '椭圆形' }, | |
197 | - { label: '方圆' }, | |
198 | - { label: '方形' }, | |
199 | - { label: '多边形' }, | |
200 | - { label: '内三角(蛤蟆)' }, | |
201 | - { label: '外三角(蝶形)' } | |
202 | - ] | |
203 | - }, | |
204 | - { label: '年龄', id: '12', children: [{ label: '通用' }] }, | |
205 | - { | |
206 | - label: '材质', | |
207 | - id: '10', | |
208 | - children: [ | |
209 | - { label: '板材' }, | |
210 | - { label: '纯钛' }, | |
211 | - { label: 'TR90' }, | |
212 | - { label: '木质' }, | |
213 | - { label: '竹质' }, | |
214 | - { label: 'β钛' }, | |
215 | - { label: 'PC' }, | |
216 | - { label: 'ULTEM塑钢' }, | |
217 | - { label: '钨钛塑钢' }, | |
218 | - { label: '镁铝合金' }, | |
219 | - { label: '碳纤维' } | |
220 | - ] | |
221 | - }, | |
222 | - { label: '折射率', id: '286', children: [] }, | |
223 | - { | |
224 | - label: '颜色', | |
225 | - id: '13', | |
226 | - children: [ | |
227 | - { label: '金色' }, | |
228 | - { label: '银色' }, | |
229 | - { label: '黑色' }, | |
230 | - { label: '彩色' }, | |
231 | - { label: '枪色' } | |
232 | - ] | |
233 | - } | |
234 | - ] | |
235 | - }, | |
236 | - { | |
237 | - label: '镜片', | |
238 | - id: '2', | |
239 | - children: [ | |
240 | - { | |
241 | - label: '面型', | |
242 | - id: '85', | |
243 | - children: [{ label: '球面单光' }, { label: '非球面单光' }] | |
244 | - }, | |
245 | - { label: '近视度数', id: '92', children: [] }, | |
246 | - { label: '散光', id: '93', children: [] }, | |
247 | - { | |
248 | - label: '功能', | |
249 | - id: '95', | |
250 | - children: [ | |
251 | - { label: '防起雾' }, | |
252 | - { label: '防蓝光' }, | |
253 | - { label: '防紫外线' }, | |
254 | - { label: '偏光' }, | |
255 | - { label: '染色' }, | |
256 | - { label: '抗疲劳' }, | |
257 | - { label: '青少年渐进' }, | |
258 | - { label: '内渐进' }, | |
259 | - { label: '变色' }, | |
260 | - { label: '双光' }, | |
261 | - { label: '耐磨损' }, | |
262 | - { label: '防尘' }, | |
263 | - { label: '防水' }, | |
264 | - { label: '防摔' }, | |
265 | - { label: '防指纹' }, | |
266 | - { label: '防反光' } | |
267 | - ] | |
268 | - }, | |
269 | - { | |
270 | - label: '颜色', | |
271 | - id: '100', | |
272 | - children: [ | |
273 | - { label: '透明' }, | |
274 | - { label: '染色' }, | |
275 | - { label: '变色' }, | |
276 | - { label: '单色' } | |
277 | - ] | |
278 | - }, | |
279 | - { | |
280 | - label: '折射率', | |
281 | - id: '101', | |
282 | - children: [ | |
283 | - { label: '1.56' }, | |
284 | - { label: '1.60' }, | |
285 | - { label: '1.65' }, | |
286 | - { label: '1.67' }, | |
287 | - { label: '1.71' }, | |
288 | - { label: '1.74' } | |
289 | - ] | |
290 | - }, | |
291 | - { label: '阿贝数(色散)', id: '102', children: [] }, | |
292 | - { label: '重量', id: '103', children: [] }, | |
293 | - { | |
294 | - label: '材质', | |
295 | - id: '104', | |
296 | - children: [ | |
297 | - { label: '树脂' }, | |
298 | - { label: '玻璃' }, | |
299 | - { label: '宇宙PC' }, | |
300 | - { label: 'PC' } | |
301 | - ] | |
302 | - }, | |
303 | - { | |
304 | - label: '品牌', | |
305 | - id: '118', | |
306 | - children: [ | |
307 | - { label: '好视力' }, | |
308 | - { label: 'RAISE锐视' }, | |
309 | - { label: '依视路' }, | |
310 | - { label: '凯米' }, | |
311 | - { label: '蔡司' }, | |
312 | - { label: '舒曼' } | |
313 | - ] | |
314 | - }, | |
315 | - { | |
316 | - label: '销售保障', | |
317 | - id: '249', | |
318 | - children: [ | |
319 | - { label: '可退' }, | |
320 | - { label: '可换' }, | |
321 | - { label: '可修' } | |
322 | - ] | |
323 | - } | |
324 | - ] | |
325 | - }, | |
326 | - { | |
327 | - label: '隐形眼镜', | |
328 | - id: '88', | |
329 | - children: [ | |
330 | - { | |
331 | - label: '颜色', | |
332 | - id: '105', | |
333 | - children: [ | |
334 | - { label: '绿' }, | |
335 | - { label: '灰' }, | |
336 | - { label: '黑' }, | |
337 | - { label: '紫' }, | |
338 | - { label: '蓝' }, | |
339 | - { label: '棕色' }, | |
340 | - { label: '紫色' } | |
341 | - ] | |
342 | - }, | |
343 | - { | |
344 | - label: '颜料', | |
345 | - id: '106', | |
346 | - children: [{ label: '水性' }, { label: '油性' }] | |
347 | - }, | |
348 | - { label: '度数', id: '107', children: [] }, | |
349 | - { | |
350 | - label: '周期', | |
351 | - id: '108', | |
352 | - children: [ | |
353 | - { label: '日抛' }, | |
354 | - { label: '周抛' }, | |
355 | - { label: '双周抛' }, | |
356 | - { label: '月抛' }, | |
357 | - { label: '季抛' }, | |
358 | - { label: '半年抛' }, | |
359 | - { label: '年抛' } | |
360 | - ] | |
361 | - }, | |
362 | - { | |
363 | - label: '品牌', | |
364 | - id: '133', | |
365 | - children: [ | |
366 | - { label: 'HolyNara' }, | |
367 | - { label: '爱尔康' }, | |
368 | - { label: 'MaxLook' }, | |
369 | - { label: 'NEO' }, | |
370 | - { label: 'GEO' }, | |
371 | - { label: '实瞳' }, | |
372 | - { label: '茵洛' }, | |
373 | - { label: 'DAZZSHOP' }, | |
374 | - { label: 'O-LENS' }, | |
375 | - { label: 'envie' }, | |
376 | - { label: '曼秀雷敦' }, | |
377 | - { label: '妃蜜莉' }, | |
378 | - { label: '海俪恩' }, | |
379 | - { label: '凯达' }, | |
380 | - { label: '蔡司' }, | |
381 | - { label: '酷视' }, | |
382 | - { label: 'LILMOON' }, | |
383 | - { label: 'RICHBABY' }, | |
384 | - { label: 'T-Garden' }, | |
385 | - { label: 'lenstown' }, | |
386 | - { label: '新加坡P2' }, | |
387 | - { label: '星欧' }, | |
388 | - { label: '美尼康' }, | |
389 | - { label: '美汐' }, | |
390 | - { label: '欧舒天' }, | |
391 | - { label: '海昌' }, | |
392 | - { label: '菲士康' }, | |
393 | - { label: '卫康' }, | |
394 | - { label: '库博' }, | |
395 | - { label: '安视优' }, | |
396 | - { label: '美若康' }, | |
397 | - { label: '视康' }, | |
398 | - { label: '澜柏' }, | |
399 | - { label: '3N' }, | |
400 | - { label: 'BIJOU' }, | |
401 | - { label: '依视明' }, | |
402 | - { label: '博士伦' }, | |
403 | - { label: '瞳昕' }, | |
404 | - { label: '科莱博' }, | |
405 | - { label: '绮芙莉' }, | |
406 | - { label: '雅培' }, | |
407 | - { label: '爱能视' }, | |
408 | - { label: '女神秘语' }, | |
409 | - { label: '博视顿' }, | |
410 | - { label: '妆美堂' }, | |
411 | - { label: '人鱼姬' }, | |
412 | - { label: 'EverColor' }, | |
413 | - { label: 'Sincere' } | |
414 | - ] | |
415 | - }, | |
416 | - { | |
417 | - label: '工艺', | |
418 | - id: '159', | |
419 | - children: [{ label: '涂层工艺' }, { label: '三层夹色工艺' }] | |
420 | - }, | |
421 | - { | |
422 | - label: '材质', | |
423 | - id: '164', | |
424 | - children: [{ label: '硅水凝胶' }, { label: '水凝胶' }] | |
425 | - }, | |
426 | - { | |
427 | - label: '含水量', | |
428 | - id: '174', | |
429 | - children: [ | |
430 | - { label: '0-40%' }, | |
431 | - { label: '40-44%' }, | |
432 | - { label: '45%以上' } | |
433 | - ] | |
434 | - }, | |
435 | - { | |
436 | - label: '基弧', | |
437 | - id: '178', | |
438 | - children: [{ label: '0.0-8.4' }, { label: '8.4以上' }] | |
439 | - }, | |
440 | - { | |
441 | - label: '直径', | |
442 | - id: '181', | |
443 | - children: [{ label: '13.4-14' }, { label: '14以上' }] | |
444 | - }, | |
445 | - { | |
446 | - label: '中心厚度', | |
447 | - id: '184', | |
448 | - children: [ | |
449 | - { label: '0.0 - 0.03' }, | |
450 | - { label: '0.04 - 0.09' }, | |
451 | - { label: '0.1以上' } | |
452 | - ] | |
453 | - }, | |
454 | - { label: '销售保障', id: '253', children: [] }, | |
455 | - { label: '赠品', id: '260', children: [] } | |
456 | - ] | |
457 | - }, | |
458 | - { | |
459 | - label: '特种镜', | |
460 | - id: '146', | |
461 | - children: [ | |
462 | - { | |
463 | - label: '镜面颜色', | |
464 | - id: '237', | |
465 | - children: [{ label: '透明' }, { label: '亮金色' }] | |
466 | - }, | |
467 | - { | |
468 | - label: '品牌', | |
469 | - id: '238', | |
470 | - children: [{ label: '宁哥牌' }, { label: '秀野牌' }] | |
471 | - }, | |
472 | - { | |
473 | - label: '销售保障', | |
474 | - id: '254', | |
475 | - children: [{ label: '包退' }, { label: '包换' }] | |
476 | - }, | |
477 | - { | |
478 | - label: '功能', | |
479 | - id: '268', | |
480 | - children: [ | |
481 | - { label: '防风镜' }, | |
482 | - { label: '防爆溅工作镜' }, | |
483 | - { label: '泳镜' }, | |
484 | - { label: '智能镜' } | |
485 | - ] | |
486 | - } | |
487 | - ] | |
488 | - } | |
489 | - ], | |
490 | - defaultProps: { | |
491 | - children: 'children', | |
492 | - label: 'label' | |
56 | + form: { | |
57 | + app_name: '', | |
58 | + app_type: '', | |
59 | + app_desc: '', | |
60 | + app_api_key: '', | |
61 | + app_user_defined: '', | |
62 | + app_area_defined: '', | |
63 | + app_lang_defined: '' | |
493 | 64 | } |
494 | 65 | } |
495 | 66 | }, |
496 | 67 | methods: { |
497 | - getCheckedNodes() { | |
498 | - console.log(this.$refs.tree.getCheckedNodes()) | |
499 | - }, | |
500 | - getCheckedKeys() { | |
501 | - console.log(this.$refs.tree.getCheckedKeys()) | |
502 | - }, | |
503 | - addNode() { | |
504 | - let h | |
505 | - this.$message({ | |
506 | - message: h('p', null, [ | |
507 | - h('span', null, '添加一个新节点 ') | |
508 | - // h("i", { style: "color: teal" }, "VNode") | |
509 | - ]) | |
510 | - }) | |
511 | - }, | |
512 | - append(data) { | |
513 | - const newChild = { id: id++, label: 'testtest', children: [] } | |
514 | - if (!data.children) { | |
515 | - this.$set(data, 'children', []) | |
516 | - } | |
517 | - data.children.push(newChild) | |
518 | - }, | |
519 | - remove(node, data) { | |
520 | - // 删除 | |
521 | - const parent = node.parent | |
522 | - const children = parent.data.children || parent.data | |
523 | - const index = children.findIndex(d => d.id === data.id) | |
524 | - children.splice(index, 1) | |
525 | - }, | |
526 | - rightKey(node, data) { | |
527 | - // 右键 | |
528 | - const h = this.$createElement | |
529 | - // console.log(data, this.$refs.tree); | |
530 | - this.$message({ | |
531 | - message: h('p', null, [ | |
532 | - h('span', null, '右键了啊! ' + node + data), | |
533 | - h('i', { style: 'color: teal' }, 'VNode') | |
534 | - ]) | |
535 | - }) | |
536 | - }, | |
537 | - update(node, data) { | |
538 | - // 更新 | |
539 | - const h = this.$createElement | |
540 | - this.$message({ | |
541 | - message: h('p', null, [ | |
542 | - h('span', null, '内容可以是 '), | |
543 | - h('i', { style: 'color: teal' }, 'VNode') | |
544 | - ]) | |
545 | - }) | |
546 | - }, | |
547 | - setCheckedNodes() { | |
548 | - this.$refs.tree.setCheckedNodes([ | |
549 | - { | |
550 | - id: 5, | |
551 | - label: '二级 2-1' | |
552 | - }, | |
553 | - { | |
554 | - id: 9, | |
555 | - label: '三级 1-1-1' | |
556 | - } | |
557 | - ]) | |
558 | - }, | |
559 | - setCheckedKeys() { | |
560 | - this.$refs.tree.setCheckedKeys([3]) | |
561 | - }, | |
562 | - resetChecked() { | |
563 | - this.$refs.tree.setCheckedKeys([]) | |
68 | + onSubmit() { | |
69 | + this.$message('submit!') | |
564 | 70 | } |
565 | 71 | } |
566 | 72 | } |
567 | 73 | </script> |
568 | -<style> | |
569 | -.custom-tree-node { | |
570 | - flex: 1; | |
571 | - display: flex; | |
572 | - align-items: center; | |
573 | - justify-content: space-between; | |
574 | - font-size: 14px; | |
575 | - padding-right: 8px; | |
74 | + | |
75 | +<style scoped> | |
76 | +.line{ | |
77 | + text-align: center; | |
576 | 78 | } |
577 | 79 | </style> |
80 | + | ... | ... |
src/views/login/index.vue
... | ... | @@ -83,8 +83,8 @@ |
83 | 83 | <el-link type="primary">{{ $t('login.signup') }}</el-link> |
84 | 84 | </div> --> |
85 | 85 | </div> |
86 | - <div style="position:relative"> | |
87 | - <!-- <div class="tips"> | |
86 | + <!-- <div style="position:relative"> --> | |
87 | + <!-- <div class="tips"> | |
88 | 88 | <span>{{ $t('login.username') }} : admin</span> |
89 | 89 | <span>{{ $t('login.password') }} : {{ $t('login.any') }}</span> |
90 | 90 | </div> |
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | <span style="margin-right:18px;">{{ $t('login.username') }} : shoper</span> |
101 | 101 | <span>{{ $t('login.password') }} : {{ $t('login.any') }}</span> |
102 | 102 | </div> --> |
103 | - </div> | |
103 | + <!-- </div> --> | |
104 | 104 | </el-form> |
105 | 105 | |
106 | 106 | <el-dialog | ... | ... |