xto-fronted 0.4.92 → 0.4.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/404-C9Uh6Uu-.css +1 -0
- package/dist/assets/404-zjGLLssH.js +1 -0
- package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
- package/dist/assets/index-B5xc4gQB.css +1 -0
- package/dist/assets/index-BDgOY6Rp.js +1 -0
- package/dist/assets/index-BIoRANs0.js +1 -0
- package/dist/assets/index-BRR97dc6.js +1 -0
- package/dist/assets/index-Bz0BgZQ1.js +1 -0
- package/dist/assets/index-CAdztNsv.css +1 -0
- package/dist/assets/index-CCXrcISf.css +1 -0
- package/dist/assets/index-CfpZmcpk.css +1 -0
- package/dist/assets/index-CwJSA85U.js +1 -0
- package/dist/assets/index-CwRA10ac.js +1 -0
- package/dist/assets/index-D8NDxq9d.js +1 -0
- package/dist/assets/index-DEB6-Iv_.js +2 -0
- package/dist/assets/index-DM4Ezclc.css +1 -0
- package/dist/assets/index-DYv7nImj.css +1 -0
- package/dist/assets/index-t-2Y0KhA.css +1 -0
- package/dist/assets/vendor-CUVPinTg.js +13 -0
- package/dist/assets/vue-vendor-DeJXJVbN.js +29 -0
- package/dist/assets/xto-base-CL2NKZJJ.css +1 -0
- package/dist/assets/xto-base-PwLGsxxb.js +1 -0
- package/dist/assets/xto-business--V1F5Gwb.css +1 -0
- package/dist/assets/xto-core-CtL4zKiV.js +1 -0
- package/dist/assets/xto-data-MxZsiJgi.css +1 -0
- package/dist/assets/xto-data-bCXQa7fT.js +1 -0
- package/dist/assets/xto-feedback-Bxx38c3P.css +1 -0
- package/dist/assets/xto-feedback-CPydp0kn.js +1 -0
- package/dist/assets/xto-form-Cu6q3VLG.css +1 -0
- package/dist/assets/xto-form-bywohdAf.js +1 -0
- package/dist/assets/xto-layout-BDD6sSlM.css +1 -0
- package/dist/assets/xto-navigation-Bbdpine9.js +1 -0
- package/dist/assets/xto-navigation-XfpyMpEo.css +1 -0
- package/dist/{index-CsjBlLrl.js → index-3ekBp4iW.js} +2 -2
- package/dist/{index-CvYIvRSW.js → index-58aI1w0v.js} +2 -2
- package/dist/{index--qRfsJ32.js → index-A_B_Ap_A.js} +1510 -1537
- package/dist/{index-DAPLMrmP.js → index-B5DLfOYb.js} +23 -23
- package/dist/index-BAmYUT0G.js +189 -0
- package/dist/index-BRvi9qW-.js +515 -0
- package/dist/index-BVGW4DDQ.js +189 -0
- package/dist/index-Bmf0YbVq.js +189 -0
- package/dist/index-C2-a5KSQ.js +4233 -0
- package/dist/{index-DjkSMw-x.js → index-CeZ0CSSs.js} +2 -2
- package/dist/index-Cf8E7FM1.js +4270 -0
- package/dist/index-ChowNrlU.js +641 -0
- package/dist/index-D25KzR0I.js +479 -0
- package/dist/index-DCBIjLHy.js +515 -0
- package/dist/index-DEYOivza.js +641 -0
- package/dist/index-DReodgBw.js +4233 -0
- package/dist/index-DjERNRXX.js +515 -0
- package/dist/index-LSdsO2Ox.js +479 -0
- package/dist/index-gBlRG4kk.js +479 -0
- package/dist/index-xWU3J3OH.js +641 -0
- package/dist/index.es.js +1 -1
- package/dist/index.html +28 -0
- package/dist/index.umd.js +8 -8
- package/dist/style.css +1 -1
- package/package.json +91 -91
- package/src/App.vue +48 -48
- package/src/assets/styles/_dark.scss +639 -639
- package/src/assets/styles/_root.scss +183 -183
- package/src/assets/styles/_variables.scss +69 -69
- package/src/assets/styles/index.scss +460 -460
- package/src/components/Layout/MixTopMenu.vue +4 -1
- package/src/components/Layout/Sidebar.vue +201 -198
- package/src/components/Layout/SidebarMenuItem.vue +158 -158
- package/src/components/Layout/TopMenu.vue +1173 -1170
- package/src/components/Layout/index.vue +192 -192
- package/src/composables/useI18n.ts +43 -43
- package/src/index.ts +100 -100
- package/src/router/layoutRoute.ts +59 -59
- package/src/stores/index.ts +15 -15
- package/src/stores/locale.ts +66 -66
- package/src/types/json-bigint.d.ts +18 -18
- package/src/types/xto.d.ts +172 -172
- package/src/utils/request.ts +184 -184
- package/src/views/dashboard/index.vue +545 -545
- package/src/views/error/403.vue +251 -251
- package/src/views/error/404.vue +253 -253
- package/src/views/login/index.vue +586 -586
- package/src/views/system/menu/index.vue +690 -690
- package/src/views/system/role/index.vue +583 -583
- package/src/views/system/user/index.vue +655 -655
|
@@ -1,1171 +1,1174 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, ref, onMounted, onUnmounted } from 'vue'
|
|
3
|
-
import { useRoute, useRouter } from 'vue-router'
|
|
4
|
-
import { useMenuStore } from '@/stores/menu'
|
|
5
|
-
import { useAppStore } from '@/stores/app'
|
|
6
|
-
import { useUserStore } from '@/stores/user'
|
|
7
|
-
import { useAuthStore } from '@/stores/auth'
|
|
8
|
-
import { Menu, MenuItem, SubMenu } from '@xto/navigation'
|
|
9
|
-
import { Icon } from '@xto/base'
|
|
10
|
-
import { Drawer } from '@xto/feedback'
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
'
|
|
71
|
-
'
|
|
72
|
-
'
|
|
73
|
-
'
|
|
74
|
-
'
|
|
75
|
-
'
|
|
76
|
-
'
|
|
77
|
-
'
|
|
78
|
-
'
|
|
79
|
-
'
|
|
80
|
-
'
|
|
81
|
-
'
|
|
82
|
-
'
|
|
83
|
-
'
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
{ value: '#
|
|
232
|
-
{ value: '#
|
|
233
|
-
{ value: '#
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
if (
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
:
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
</div>
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
<
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
<div class="top-menu__dropdown-
|
|
447
|
-
<
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
<
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
<div class="preview-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
<div class="preview-mix
|
|
507
|
-
<div class="preview-mix-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
:
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
</
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
:
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
text-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
.
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
.
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref, onMounted, onUnmounted } from 'vue'
|
|
3
|
+
import { useRoute, useRouter } from 'vue-router'
|
|
4
|
+
import { useMenuStore } from '@/stores/menu'
|
|
5
|
+
import { useAppStore } from '@/stores/app'
|
|
6
|
+
import { useUserStore } from '@/stores/user'
|
|
7
|
+
import { useAuthStore } from '@/stores/auth'
|
|
8
|
+
import { Menu, MenuItem, SubMenu } from '@xto/navigation'
|
|
9
|
+
import { Icon } from '@xto/base'
|
|
10
|
+
import { Drawer } from '@xto/feedback'
|
|
11
|
+
|
|
12
|
+
// 获取 base URL
|
|
13
|
+
const baseUrl = import.meta.env.BASE_URL
|
|
14
|
+
|
|
15
|
+
const route = useRoute()
|
|
16
|
+
const router = useRouter()
|
|
17
|
+
const menuStore = useMenuStore()
|
|
18
|
+
const appStore = useAppStore()
|
|
19
|
+
const userStore = useUserStore()
|
|
20
|
+
const authStore = useAuthStore()
|
|
21
|
+
|
|
22
|
+
const activeMenu = computed(() => route.path)
|
|
23
|
+
|
|
24
|
+
// 扁平化菜单用于搜索
|
|
25
|
+
const flattenMenus = (menus: any[], parentTitle = ''): any[] => {
|
|
26
|
+
const result: any[] = []
|
|
27
|
+
menus.forEach(menu => {
|
|
28
|
+
if (menu.children && menu.children.length > 0) {
|
|
29
|
+
result.push(...flattenMenus(menu.children, menu.menuName))
|
|
30
|
+
} else {
|
|
31
|
+
result.push({ ...menu, parentTitle, title: menu.menuName, path: menu.menuUrl })
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
return result
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// 搜索结果
|
|
38
|
+
const searchResults = computed(() => {
|
|
39
|
+
if (!searchKeyword.value.trim()) return []
|
|
40
|
+
const flatMenus = flattenMenus(menuStore.menuList)
|
|
41
|
+
return flatMenus.filter(menu =>
|
|
42
|
+
menu.title.toLowerCase().includes(searchKeyword.value.toLowerCase())
|
|
43
|
+
)
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
// 菜单主题相关
|
|
47
|
+
const menuBgColor = computed(() => appStore.isDark ? '#1d1e1f' : '#fff')
|
|
48
|
+
const menuTextColor = computed(() => appStore.isDark ? '#cfd3dc' : '#303133')
|
|
49
|
+
const menuActiveTextColor = computed(() => '#409eff')
|
|
50
|
+
|
|
51
|
+
// 下拉菜单
|
|
52
|
+
const dropdownVisible = ref(false)
|
|
53
|
+
const dropdownRef = ref<HTMLElement | null>(null)
|
|
54
|
+
const isFullscreen = ref(false)
|
|
55
|
+
const drawerVisible = ref(false)
|
|
56
|
+
const greyMode = ref(false)
|
|
57
|
+
const searchVisible = ref(false)
|
|
58
|
+
const searchKeyword = ref('')
|
|
59
|
+
const searchRef = ref<HTMLElement | null>(null)
|
|
60
|
+
|
|
61
|
+
// 菜单选择
|
|
62
|
+
const handleMenuSelect = (index: string) => {
|
|
63
|
+
if (index && index !== route.path) {
|
|
64
|
+
router.push(index)
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// 已知的图标名称列表
|
|
69
|
+
const knownIcons = new Set([
|
|
70
|
+
'arrow-up', 'arrow-down', 'arrow-left', 'arrow-right',
|
|
71
|
+
'caret-down', 'caret-right', 'plus', 'minus', 'close', 'check',
|
|
72
|
+
'edit', 'delete', 'copy', 'download', 'upload', 'refresh', 'search',
|
|
73
|
+
'filter', 'more', 'setting', 'share', 'loading', 'info', 'success',
|
|
74
|
+
'warning', 'error', 'question', 'user', 'user-add', 'user-group',
|
|
75
|
+
'logout', 'login', 'file', 'folder', 'folder-open', 'document',
|
|
76
|
+
'image', 'video', 'music', 'camera', 'mail', 'phone', 'chat',
|
|
77
|
+
'bell', 'message', 'eye', 'eye-off', 'calendar', 'clock', 'history',
|
|
78
|
+
'timer', 'location', 'map', 'globe', 'star', 'heart', 'thumb-up',
|
|
79
|
+
'link', 'external-link', 'lock', 'unlock', 'key', 'home', 'menu',
|
|
80
|
+
'menu-fold', 'menu-unfold', 'sidebar-fold', 'sidebar-expand',
|
|
81
|
+
'sidebar-left', 'dashboard', 'chart', 'chart-pie', 'chart-line',
|
|
82
|
+
'report', 'analytics', 'system', 'permission', 'role', 'user-manage',
|
|
83
|
+
'log', 'notification', 'app', 'list', 'grid', 'fullscreen',
|
|
84
|
+
'fullscreen-exit', 'zoom-in', 'zoom-out', 'print', 'bookmark',
|
|
85
|
+
'tag', 'code', 'terminal', 'database', 'server', 'cloud', 'gift',
|
|
86
|
+
'moon', 'sun', 'theme', 'skin'
|
|
87
|
+
])
|
|
88
|
+
|
|
89
|
+
// 获取菜单图标名称
|
|
90
|
+
const getMenuIcon = (icon?: string): string => {
|
|
91
|
+
if (!icon || icon === '') return ''
|
|
92
|
+
|
|
93
|
+
if (icon.startsWith('tineco-icon-')) {
|
|
94
|
+
const iconName = icon.replace('tineco-icon-', '')
|
|
95
|
+
const tinecoIconMap: Record<string, string> = {
|
|
96
|
+
home: 'home',
|
|
97
|
+
dashboard: 'dashboard',
|
|
98
|
+
system: 'system',
|
|
99
|
+
user: 'user',
|
|
100
|
+
role: 'role',
|
|
101
|
+
menu: 'list',
|
|
102
|
+
setting: 'setting',
|
|
103
|
+
file: 'file',
|
|
104
|
+
folder: 'folder',
|
|
105
|
+
chart: 'chart',
|
|
106
|
+
report: 'report',
|
|
107
|
+
analytics: 'analytics'
|
|
108
|
+
}
|
|
109
|
+
return tinecoIconMap[iconName] || iconName
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const iconMap: Record<string, string> = {
|
|
113
|
+
dashboard: 'dashboard',
|
|
114
|
+
system: 'system',
|
|
115
|
+
user: 'user',
|
|
116
|
+
role: 'role',
|
|
117
|
+
menu: 'list',
|
|
118
|
+
setting: 'setting',
|
|
119
|
+
home: 'home',
|
|
120
|
+
chart: 'chart',
|
|
121
|
+
report: 'report',
|
|
122
|
+
analytics: 'analytics',
|
|
123
|
+
permission: 'permission',
|
|
124
|
+
log: 'log',
|
|
125
|
+
notification: 'notification',
|
|
126
|
+
app: 'app',
|
|
127
|
+
list: 'list',
|
|
128
|
+
grid: 'grid'
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return iconMap[icon] || icon
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const getFirstChar = (name?: string): string => {
|
|
135
|
+
if (!name) return ''
|
|
136
|
+
return name.charAt(0)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const iconExists = (iconName: string): boolean => {
|
|
140
|
+
return knownIcons.has(iconName)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// 切换主题
|
|
144
|
+
const toggleTheme = () => {
|
|
145
|
+
appStore.toggleTheme()
|
|
146
|
+
drawerVisible.value = false
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// 切换全屏
|
|
150
|
+
const toggleFullscreen = () => {
|
|
151
|
+
if (!document.fullscreenElement) {
|
|
152
|
+
document.documentElement.requestFullscreen()
|
|
153
|
+
} else {
|
|
154
|
+
document.exitFullscreen()
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// 监听全屏变化
|
|
159
|
+
const handleFullscreenChange = () => {
|
|
160
|
+
isFullscreen.value = !!document.fullscreenElement
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// 切换下拉菜单
|
|
164
|
+
const toggleDropdown = () => {
|
|
165
|
+
dropdownVisible.value = !dropdownVisible.value
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// 关闭下拉菜单
|
|
169
|
+
const closeDropdowns = () => {
|
|
170
|
+
dropdownVisible.value = false
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// 隐藏搜索
|
|
174
|
+
const hideSearch = () => {
|
|
175
|
+
searchVisible.value = false
|
|
176
|
+
searchKeyword.value = ''
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// 搜索结果点击
|
|
180
|
+
const handleSearchItemClick = (path: string) => {
|
|
181
|
+
router.push(path)
|
|
182
|
+
hideSearch()
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// 打开设置抽屉
|
|
186
|
+
const openSettingsDrawer = () => {
|
|
187
|
+
drawerVisible.value = true
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// 切换灰色模式
|
|
191
|
+
const handleGreyModeChange = (value: boolean) => {
|
|
192
|
+
greyMode.value = value
|
|
193
|
+
const html = document.documentElement
|
|
194
|
+
if (value) {
|
|
195
|
+
html.classList.add('grey-mode')
|
|
196
|
+
} else {
|
|
197
|
+
html.classList.remove('grey-mode')
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// 抽屉内灰色模式开关
|
|
202
|
+
const handleGreyModeToggle = () => {
|
|
203
|
+
handleGreyModeChange(!greyMode.value)
|
|
204
|
+
drawerVisible.value = false
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// 抽屉内暗黑模式开关
|
|
208
|
+
const handleDarkModeToggle = () => {
|
|
209
|
+
appStore.toggleTheme()
|
|
210
|
+
drawerVisible.value = false
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// 布局模式选项
|
|
214
|
+
type LayoutMode = 'sidebar' | 'top' | 'mix'
|
|
215
|
+
const layoutOptions: { value: LayoutMode; label: string; icon: string }[] = [
|
|
216
|
+
{ value: 'sidebar', label: '左侧菜单', icon: 'sidebar-left' },
|
|
217
|
+
{ value: 'top', label: '顶部菜单', icon: 'menu' },
|
|
218
|
+
{ value: 'mix', label: '混合菜单', icon: 'grid' }
|
|
219
|
+
]
|
|
220
|
+
|
|
221
|
+
const currentLayout = computed(() => appStore.layout)
|
|
222
|
+
|
|
223
|
+
// 切换布局模式
|
|
224
|
+
const handleLayoutChange = (mode: LayoutMode) => {
|
|
225
|
+
appStore.setLayout(mode)
|
|
226
|
+
drawerVisible.value = false
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// 主题色选项
|
|
230
|
+
const colorOptions = [
|
|
231
|
+
{ value: '#409eff', label: '默认蓝' },
|
|
232
|
+
{ value: '#1890ff', label: '科技蓝' },
|
|
233
|
+
{ value: '#52c41a', label: '极光绿' },
|
|
234
|
+
{ value: '#faad14', label: '日落橙' },
|
|
235
|
+
{ value: '#f5222d', label: '薄暮红' },
|
|
236
|
+
{ value: '#722ed1', label: '酱紫' }
|
|
237
|
+
]
|
|
238
|
+
|
|
239
|
+
// 设置主题色
|
|
240
|
+
const handleColorChange = (color: string) => {
|
|
241
|
+
appStore.setPrimaryColor(color)
|
|
242
|
+
drawerVisible.value = false
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// 个人信息
|
|
246
|
+
const handleProfile = () => {
|
|
247
|
+
closeDropdowns()
|
|
248
|
+
router.push('/profile')
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// 修改密码
|
|
252
|
+
const handleChangePassword = () => {
|
|
253
|
+
closeDropdowns()
|
|
254
|
+
router.push('/change-password')
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// 退出登录
|
|
258
|
+
const handleLogout = () => {
|
|
259
|
+
closeDropdowns()
|
|
260
|
+
authStore.logout()
|
|
261
|
+
userStore.clearUserInfo()
|
|
262
|
+
menuStore.clearMenu()
|
|
263
|
+
router.push('/login')
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// 点击外部关闭下拉菜单
|
|
267
|
+
const handleClickOutside = (event: MouseEvent) => {
|
|
268
|
+
if (dropdownRef.value && !dropdownRef.value.contains(event.target as Node)) {
|
|
269
|
+
closeDropdowns()
|
|
270
|
+
}
|
|
271
|
+
if (searchRef.value && !searchRef.value.contains(event.target as Node)) {
|
|
272
|
+
hideSearch()
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// 键盘快捷键
|
|
277
|
+
const handleKeydown = (event: KeyboardEvent) => {
|
|
278
|
+
if (event.key === 'Escape') {
|
|
279
|
+
hideSearch()
|
|
280
|
+
closeDropdowns()
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
onMounted(() => {
|
|
285
|
+
document.addEventListener('click', handleClickOutside)
|
|
286
|
+
document.addEventListener('fullscreenchange', handleFullscreenChange)
|
|
287
|
+
document.addEventListener('keydown', handleKeydown)
|
|
288
|
+
greyMode.value = document.documentElement.classList.contains('grey-mode')
|
|
289
|
+
})
|
|
290
|
+
|
|
291
|
+
onUnmounted(() => {
|
|
292
|
+
document.removeEventListener('click', handleClickOutside)
|
|
293
|
+
document.removeEventListener('fullscreenchange', handleFullscreenChange)
|
|
294
|
+
document.removeEventListener('keydown', handleKeydown)
|
|
295
|
+
})
|
|
296
|
+
</script>
|
|
297
|
+
|
|
298
|
+
<template>
|
|
299
|
+
<div class="top-menu">
|
|
300
|
+
<!-- 左侧 Logo -->
|
|
301
|
+
<div class="top-menu__logo">
|
|
302
|
+
<img :src="`${baseUrl}vite.svg`" alt="Logo" class="top-menu__logo-img" />
|
|
303
|
+
<span class="top-menu__logo-text">{{ appStore.appName }}</span>
|
|
304
|
+
</div>
|
|
305
|
+
|
|
306
|
+
<!-- 左侧菜单 -->
|
|
307
|
+
<Menu
|
|
308
|
+
:model-value="activeMenu"
|
|
309
|
+
mode="horizontal"
|
|
310
|
+
:background-color="menuBgColor"
|
|
311
|
+
:text-color="menuTextColor"
|
|
312
|
+
:active-text-color="menuActiveTextColor"
|
|
313
|
+
class="top-menu__menu"
|
|
314
|
+
@select="handleMenuSelect"
|
|
315
|
+
>
|
|
316
|
+
<template v-for="menu in menuStore.menuList" :key="menu.menuUrl">
|
|
317
|
+
<!-- 有子菜单 -->
|
|
318
|
+
<SubMenu v-if="menu.children && menu.children.length > 0" :index="menu.menuUrl">
|
|
319
|
+
<template #title>
|
|
320
|
+
<span class="top-menu__menu-content">
|
|
321
|
+
<span v-if="menu.menuName !== '首页'" class="top-menu__menu-icon">
|
|
322
|
+
<Icon v-if="iconExists(getMenuIcon(menu.icon))" :name="getMenuIcon(menu.icon)" :size="16" />
|
|
323
|
+
<span v-else class="top-menu__menu-char">{{ getFirstChar(menu.menuName) }}</span>
|
|
324
|
+
</span>
|
|
325
|
+
<span class="top-menu__menu-text">{{ menu.menuName }}</span>
|
|
326
|
+
</span>
|
|
327
|
+
</template>
|
|
328
|
+
<!-- 递归渲染子菜单 -->
|
|
329
|
+
<template v-for="child in menu.children" :key="child.menuUrl">
|
|
330
|
+
<SubMenu v-if="child.children && child.children.length > 0" :index="child.menuUrl">
|
|
331
|
+
<template #title>
|
|
332
|
+
<span class="top-menu__menu-content">
|
|
333
|
+
<span class="top-menu__menu-icon">
|
|
334
|
+
<Icon v-if="iconExists(getMenuIcon(child.icon))" :name="getMenuIcon(child.icon)" :size="16" />
|
|
335
|
+
<span v-else class="top-menu__menu-char">{{ getFirstChar(child.menuName) }}</span>
|
|
336
|
+
</span>
|
|
337
|
+
<span class="top-menu__menu-text">{{ child.menuName }}</span>
|
|
338
|
+
</span>
|
|
339
|
+
</template>
|
|
340
|
+
<!-- 三级菜单项 -->
|
|
341
|
+
<MenuItem
|
|
342
|
+
v-for="grandChild in child.children"
|
|
343
|
+
:key="grandChild.menuUrl"
|
|
344
|
+
:index="grandChild.menuUrl"
|
|
345
|
+
>
|
|
346
|
+
<span class="top-menu__menu-content">
|
|
347
|
+
<span class="top-menu__menu-icon">
|
|
348
|
+
<Icon v-if="iconExists(getMenuIcon(grandChild.icon))" :name="getMenuIcon(grandChild.icon)" :size="16" />
|
|
349
|
+
<span v-else class="top-menu__menu-char">{{ getFirstChar(grandChild.menuName) }}</span>
|
|
350
|
+
</span>
|
|
351
|
+
<span class="top-menu__menu-text">{{ grandChild.menuName }}</span>
|
|
352
|
+
</span>
|
|
353
|
+
</MenuItem>
|
|
354
|
+
</SubMenu>
|
|
355
|
+
<!-- 二级菜单项 -->
|
|
356
|
+
<MenuItem v-else :index="child.menuUrl">
|
|
357
|
+
<span class="top-menu__menu-content">
|
|
358
|
+
<span class="top-menu__menu-icon">
|
|
359
|
+
<Icon v-if="iconExists(getMenuIcon(child.icon))" :name="getMenuIcon(child.icon)" :size="16" />
|
|
360
|
+
<span v-else class="top-menu__menu-char">{{ getFirstChar(child.menuName) }}</span>
|
|
361
|
+
</span>
|
|
362
|
+
<span class="top-menu__menu-text">{{ child.menuName }}</span>
|
|
363
|
+
</span>
|
|
364
|
+
</MenuItem>
|
|
365
|
+
</template>
|
|
366
|
+
</SubMenu>
|
|
367
|
+
<!-- 无子菜单 -->
|
|
368
|
+
<MenuItem v-else :index="menu.menuUrl">
|
|
369
|
+
<span class="top-menu__menu-content">
|
|
370
|
+
<span v-if="menu.menuName !== '首页'" class="top-menu__menu-icon">
|
|
371
|
+
<Icon v-if="iconExists(getMenuIcon(menu.icon))" :name="getMenuIcon(menu.icon)" :size="16" />
|
|
372
|
+
<span v-else class="top-menu__menu-char">{{ getFirstChar(menu.menuName) }}</span>
|
|
373
|
+
</span>
|
|
374
|
+
<span class="top-menu__menu-text">{{ menu.menuName }}</span>
|
|
375
|
+
</span>
|
|
376
|
+
</MenuItem>
|
|
377
|
+
</template>
|
|
378
|
+
</Menu>
|
|
379
|
+
|
|
380
|
+
<!-- 右侧操作区域 -->
|
|
381
|
+
<div class="top-menu__actions">
|
|
382
|
+
<!-- 搜索输入框 -->
|
|
383
|
+
<div class="top-menu__search" ref="searchRef">
|
|
384
|
+
<Icon name="search" :size="14" class="top-menu__search-icon" />
|
|
385
|
+
<input
|
|
386
|
+
v-model="searchKeyword"
|
|
387
|
+
type="text"
|
|
388
|
+
class="top-menu__search-input"
|
|
389
|
+
placeholder="搜索菜单..."
|
|
390
|
+
@focus="searchVisible = true"
|
|
391
|
+
/>
|
|
392
|
+
<!-- 搜索结果下拉 -->
|
|
393
|
+
<Transition name="search-dropdown">
|
|
394
|
+
<div v-if="searchVisible && (searchResults.length > 0 || searchKeyword)" class="top-menu__search-dropdown">
|
|
395
|
+
<div v-if="searchResults.length > 0" class="top-menu__search-results">
|
|
396
|
+
<div
|
|
397
|
+
v-for="item in searchResults"
|
|
398
|
+
:key="item.path"
|
|
399
|
+
class="top-menu__search-item"
|
|
400
|
+
@click="handleSearchItemClick(item.path)"
|
|
401
|
+
>
|
|
402
|
+
<span v-if="item.title !== '首页'" class="top-menu__search-icon-item">
|
|
403
|
+
<Icon v-if="iconExists(getMenuIcon(item.icon))" :name="getMenuIcon(item.icon)" :size="16" />
|
|
404
|
+
<span v-else class="top-menu__search-char">{{ getFirstChar(item.title) }}</span>
|
|
405
|
+
</span>
|
|
406
|
+
<span class="top-menu__search-item-title">{{ item.title }}</span>
|
|
407
|
+
<span v-if="item.parentTitle" class="top-menu__search-item-parent">{{ item.parentTitle }}</span>
|
|
408
|
+
</div>
|
|
409
|
+
</div>
|
|
410
|
+
<div v-else class="top-menu__search-empty">
|
|
411
|
+
未找到匹配的菜单
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
</Transition>
|
|
415
|
+
</div>
|
|
416
|
+
|
|
417
|
+
<!-- 全屏切换 -->
|
|
418
|
+
<div class="top-menu__action" @click="toggleFullscreen" :title="isFullscreen ? '退出全屏' : '全屏'">
|
|
419
|
+
<Icon :name="isFullscreen ? 'fullscreen-exit' : 'fullscreen'" :size="16" />
|
|
420
|
+
</div>
|
|
421
|
+
|
|
422
|
+
<!-- 换肤设置 -->
|
|
423
|
+
<div class="top-menu__action" @click="openSettingsDrawer" title="换肤设置">
|
|
424
|
+
<Icon name="skin" :size="16" />
|
|
425
|
+
</div>
|
|
426
|
+
|
|
427
|
+
<!-- 主题切换 -->
|
|
428
|
+
<div class="top-menu__action" @click="toggleTheme" title="切换主题">
|
|
429
|
+
<Icon :name="appStore.isDark ? 'sun' : 'moon'" :size="16" />
|
|
430
|
+
</div>
|
|
431
|
+
|
|
432
|
+
<!-- 用户头像 -->
|
|
433
|
+
<div class="top-menu__user" ref="dropdownRef">
|
|
434
|
+
<div class="top-menu__user-trigger" @click.stop="toggleDropdown">
|
|
435
|
+
<div class="top-menu__avatar">
|
|
436
|
+
<span>{{ userStore.userName?.charAt(0) || 'U' }}</span>
|
|
437
|
+
</div>
|
|
438
|
+
<span class="top-menu__user-name">{{ userStore.userName }}</span>
|
|
439
|
+
<span class="top-menu__user-arrow" :class="{ 'is-active': dropdownVisible }">▼</span>
|
|
440
|
+
</div>
|
|
441
|
+
|
|
442
|
+
<!-- 下拉菜单 -->
|
|
443
|
+
<Transition name="dropdown">
|
|
444
|
+
<div v-if="dropdownVisible" class="top-menu__dropdown">
|
|
445
|
+
<div class="top-menu__dropdown-header">
|
|
446
|
+
<div class="top-menu__dropdown-avatar">
|
|
447
|
+
<span>{{ userStore.userName?.charAt(0) || 'U' }}</span>
|
|
448
|
+
</div>
|
|
449
|
+
<div class="top-menu__dropdown-info">
|
|
450
|
+
<div class="top-menu__dropdown-name">{{ userStore.userName }}</div>
|
|
451
|
+
<div class="top-menu__dropdown-role">{{ userStore.departmentName }}</div>
|
|
452
|
+
</div>
|
|
453
|
+
</div>
|
|
454
|
+
<div class="top-menu__dropdown-divider"></div>
|
|
455
|
+
<div class="top-menu__dropdown-menu">
|
|
456
|
+
<div class="top-menu__dropdown-item" @click="handleProfile">
|
|
457
|
+
<Icon name="user" :size="16" />
|
|
458
|
+
<span>个人信息</span>
|
|
459
|
+
</div>
|
|
460
|
+
<div class="top-menu__dropdown-item" @click="handleChangePassword">
|
|
461
|
+
<Icon name="lock" :size="16" />
|
|
462
|
+
<span>修改密码</span>
|
|
463
|
+
</div>
|
|
464
|
+
<div class="top-menu__dropdown-divider"></div>
|
|
465
|
+
<div class="top-menu__dropdown-item top-menu__dropdown-item--danger" @click="handleLogout">
|
|
466
|
+
<Icon name="logout" :size="16" />
|
|
467
|
+
<span>退出登录</span>
|
|
468
|
+
</div>
|
|
469
|
+
</div>
|
|
470
|
+
</div>
|
|
471
|
+
</Transition>
|
|
472
|
+
</div>
|
|
473
|
+
</div>
|
|
474
|
+
|
|
475
|
+
<!-- 换肤设置抽屉 -->
|
|
476
|
+
<Drawer
|
|
477
|
+
v-model="drawerVisible"
|
|
478
|
+
title="换肤设置"
|
|
479
|
+
direction="rtl"
|
|
480
|
+
size="320px"
|
|
481
|
+
>
|
|
482
|
+
<div class="settings-drawer">
|
|
483
|
+
<!-- 布局模式 -->
|
|
484
|
+
<div class="settings-section">
|
|
485
|
+
<div class="settings-title">布局模式</div>
|
|
486
|
+
<div class="settings-layout-options">
|
|
487
|
+
<div
|
|
488
|
+
v-for="option in layoutOptions"
|
|
489
|
+
:key="option.value"
|
|
490
|
+
:class="['layout-option', { 'is-active': currentLayout === option.value }]"
|
|
491
|
+
@click="handleLayoutChange(option.value)"
|
|
492
|
+
>
|
|
493
|
+
<div class="layout-option__preview">
|
|
494
|
+
<div v-if="option.value === 'sidebar'" class="layout-preview-sidebar">
|
|
495
|
+
<div class="preview-aside"></div>
|
|
496
|
+
<div class="preview-main">
|
|
497
|
+
<div class="preview-header"></div>
|
|
498
|
+
<div class="preview-content"></div>
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
<div v-else-if="option.value === 'top'" class="layout-preview-top">
|
|
502
|
+
<div class="preview-header-full"></div>
|
|
503
|
+
<div class="preview-content-full"></div>
|
|
504
|
+
</div>
|
|
505
|
+
<div v-else class="layout-preview-mix">
|
|
506
|
+
<div class="preview-header-mix">
|
|
507
|
+
<div class="preview-mix-left"></div>
|
|
508
|
+
</div>
|
|
509
|
+
<div class="preview-mix-body">
|
|
510
|
+
<div class="preview-mix-aside"></div>
|
|
511
|
+
<div class="preview-mix-content"></div>
|
|
512
|
+
</div>
|
|
513
|
+
</div>
|
|
514
|
+
</div>
|
|
515
|
+
<span class="layout-option__label">{{ option.label }}</span>
|
|
516
|
+
</div>
|
|
517
|
+
</div>
|
|
518
|
+
</div>
|
|
519
|
+
|
|
520
|
+
<!-- 主题色 -->
|
|
521
|
+
<div class="settings-section">
|
|
522
|
+
<div class="settings-title">主题色</div>
|
|
523
|
+
<div class="settings-color-options">
|
|
524
|
+
<div
|
|
525
|
+
v-for="color in colorOptions"
|
|
526
|
+
:key="color.value"
|
|
527
|
+
:class="['color-option', { 'is-active': appStore.primaryColor === color.value }]"
|
|
528
|
+
:style="{ backgroundColor: color.value }"
|
|
529
|
+
:title="color.label"
|
|
530
|
+
@click="handleColorChange(color.value)"
|
|
531
|
+
>
|
|
532
|
+
<Icon v-if="appStore.primaryColor === color.value" name="check" :size="12" color="#fff" />
|
|
533
|
+
</div>
|
|
534
|
+
</div>
|
|
535
|
+
</div>
|
|
536
|
+
|
|
537
|
+
<!-- 功能开关 -->
|
|
538
|
+
<div class="settings-section">
|
|
539
|
+
<div class="settings-title">功能设置</div>
|
|
540
|
+
<div class="settings-switch-list">
|
|
541
|
+
<div class="settings-switch-item">
|
|
542
|
+
<span>灰色模式</span>
|
|
543
|
+
<div class="switch-wrapper" :class="{ 'is-checked': greyMode }" @click="handleGreyModeToggle">
|
|
544
|
+
<span class="switch-core"></span>
|
|
545
|
+
</div>
|
|
546
|
+
</div>
|
|
547
|
+
<div class="settings-switch-item">
|
|
548
|
+
<span>暗黑模式</span>
|
|
549
|
+
<div class="switch-wrapper" :class="{ 'is-checked': appStore.isDark }" @click="handleDarkModeToggle">
|
|
550
|
+
<span class="switch-core"></span>
|
|
551
|
+
</div>
|
|
552
|
+
</div>
|
|
553
|
+
</div>
|
|
554
|
+
</div>
|
|
555
|
+
</div>
|
|
556
|
+
</Drawer>
|
|
557
|
+
</div>
|
|
558
|
+
</template>
|
|
559
|
+
|
|
560
|
+
<style lang="scss" scoped>
|
|
561
|
+
.top-menu {
|
|
562
|
+
width: 100%;
|
|
563
|
+
height: 100%;
|
|
564
|
+
display: flex;
|
|
565
|
+
align-items: center;
|
|
566
|
+
padding: 0 20px;
|
|
567
|
+
|
|
568
|
+
&__logo {
|
|
569
|
+
display: flex;
|
|
570
|
+
align-items: center;
|
|
571
|
+
gap: 10px;
|
|
572
|
+
margin-right: 20px;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
&__logo-img {
|
|
576
|
+
width: 32px;
|
|
577
|
+
height: 32px;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
&__logo-text {
|
|
581
|
+
font-size: 16px;
|
|
582
|
+
font-weight: 600;
|
|
583
|
+
color: var(--color-primary);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
&__menu {
|
|
587
|
+
flex: 1;
|
|
588
|
+
border-bottom: none;
|
|
589
|
+
height: 49px;
|
|
590
|
+
display: flex;
|
|
591
|
+
align-items: center;
|
|
592
|
+
line-height: 49px;
|
|
593
|
+
|
|
594
|
+
// 深度选择器:使用正确的类名 x-menu(不是 xto-menu)
|
|
595
|
+
:deep(.x-menu) {
|
|
596
|
+
height: 49px;
|
|
597
|
+
line-height: 49px;
|
|
598
|
+
border-bottom: none;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
:deep(.x-menu--horizontal) {
|
|
602
|
+
height: 49px;
|
|
603
|
+
display: flex;
|
|
604
|
+
align-items: center;
|
|
605
|
+
border-bottom: none;
|
|
606
|
+
line-height: 49px;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
:deep(.x-menu-item) {
|
|
610
|
+
height: 49px;
|
|
611
|
+
line-height: 49px;
|
|
612
|
+
box-sizing: border-box;
|
|
613
|
+
border-bottom: none;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
:deep(.x-menu-item.is-horizontal) {
|
|
617
|
+
height: 49px;
|
|
618
|
+
line-height: 49px;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
:deep(.x-menu-item__content) {
|
|
622
|
+
height: 49px;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
:deep(.x-sub-menu) {
|
|
626
|
+
height: 49px;
|
|
627
|
+
line-height: 49px;
|
|
628
|
+
box-sizing: border-box;
|
|
629
|
+
border-bottom: none;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
:deep(.x-sub-menu--horizontal) {
|
|
633
|
+
height: 49px;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
:deep(.x-sub-menu__title) {
|
|
637
|
+
height: 49px;
|
|
638
|
+
line-height: 49px;
|
|
639
|
+
box-sizing: border-box;
|
|
640
|
+
border-bottom: none;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
:deep(.x-sub-menu__content) {
|
|
644
|
+
height: 49px;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
&__menu-content {
|
|
649
|
+
align-items: center;
|
|
650
|
+
line-height: 1;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
&__menu-text {
|
|
654
|
+
line-height: 1;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
&__menu-icon {
|
|
658
|
+
display: inline-flex;
|
|
659
|
+
align-items: center;
|
|
660
|
+
justify-content: center;
|
|
661
|
+
width: 16px;
|
|
662
|
+
height: 16px;
|
|
663
|
+
margin-right: 8px;
|
|
664
|
+
flex-shrink: 0;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
&__menu-char {
|
|
668
|
+
display: inline-flex;
|
|
669
|
+
align-items: center;
|
|
670
|
+
justify-content: center;
|
|
671
|
+
width: 16px;
|
|
672
|
+
height: 16px;
|
|
673
|
+
font-size: 12px;
|
|
674
|
+
font-weight: 600;
|
|
675
|
+
color: var(--color-primary);
|
|
676
|
+
background-color: var(--color-primary-light-8);
|
|
677
|
+
border-radius: 4px;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// 右侧操作区域
|
|
681
|
+
&__actions {
|
|
682
|
+
display: flex;
|
|
683
|
+
align-items: center;
|
|
684
|
+
gap: 8px;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
&__search {
|
|
688
|
+
position: relative;
|
|
689
|
+
display: flex;
|
|
690
|
+
align-items: center;
|
|
691
|
+
background-color: var(--color-fill-light);
|
|
692
|
+
border-radius: var(--border-radius-base);
|
|
693
|
+
padding: 0 12px;
|
|
694
|
+
height: 32px;
|
|
695
|
+
width: 200px;
|
|
696
|
+
|
|
697
|
+
&-icon {
|
|
698
|
+
color: var(--color-text-secondary);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
&-input {
|
|
702
|
+
flex: 1;
|
|
703
|
+
height: 100%;
|
|
704
|
+
font-size: 14px;
|
|
705
|
+
color: var(--color-text-primary);
|
|
706
|
+
background: transparent;
|
|
707
|
+
border: none;
|
|
708
|
+
outline: none;
|
|
709
|
+
padding-left: 8px;
|
|
710
|
+
|
|
711
|
+
&::placeholder {
|
|
712
|
+
color: var(--color-text-placeholder);
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
&-dropdown {
|
|
717
|
+
position: absolute;
|
|
718
|
+
top: calc(100% + 4px);
|
|
719
|
+
left: 0;
|
|
720
|
+
right: 0;
|
|
721
|
+
min-width: 200px;
|
|
722
|
+
max-height: 300px;
|
|
723
|
+
overflow-y: auto;
|
|
724
|
+
background-color: var(--bg-color);
|
|
725
|
+
border-radius: var(--border-radius-base);
|
|
726
|
+
box-shadow: var(--box-shadow);
|
|
727
|
+
z-index: 100;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
&-results {
|
|
731
|
+
padding: 8px 0;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
&-item {
|
|
735
|
+
display: flex;
|
|
736
|
+
align-items: center;
|
|
737
|
+
gap: 8px;
|
|
738
|
+
padding: 8px 12px;
|
|
739
|
+
cursor: pointer;
|
|
740
|
+
transition: background-color 0.2s;
|
|
741
|
+
|
|
742
|
+
&:hover {
|
|
743
|
+
background-color: var(--color-fill);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
&-title {
|
|
747
|
+
font-size: 14px;
|
|
748
|
+
color: var(--color-text-primary);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
&-parent {
|
|
752
|
+
font-size: 12px;
|
|
753
|
+
color: var(--color-text-secondary);
|
|
754
|
+
margin-left: auto;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
&-icon-item {
|
|
759
|
+
display: inline-flex;
|
|
760
|
+
align-items: center;
|
|
761
|
+
justify-content: center;
|
|
762
|
+
width: 16px;
|
|
763
|
+
height: 16px;
|
|
764
|
+
flex-shrink: 0;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
&-char {
|
|
768
|
+
display: inline-flex;
|
|
769
|
+
align-items: center;
|
|
770
|
+
justify-content: center;
|
|
771
|
+
width: 16px;
|
|
772
|
+
height: 16px;
|
|
773
|
+
font-size: 12px;
|
|
774
|
+
font-weight: 600;
|
|
775
|
+
color: var(--color-primary);
|
|
776
|
+
background-color: var(--color-primary-light-8);
|
|
777
|
+
border-radius: 4px;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
&-empty {
|
|
781
|
+
padding: 16px 12px;
|
|
782
|
+
text-align: center;
|
|
783
|
+
color: var(--color-text-secondary);
|
|
784
|
+
font-size: 14px;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
&__action {
|
|
789
|
+
width: 32px;
|
|
790
|
+
height: 32px;
|
|
791
|
+
display: flex;
|
|
792
|
+
align-items: center;
|
|
793
|
+
justify-content: center;
|
|
794
|
+
cursor: pointer;
|
|
795
|
+
border-radius: var(--border-radius-base);
|
|
796
|
+
color: var(--color-text-regular);
|
|
797
|
+
transition: all 0.2s;
|
|
798
|
+
|
|
799
|
+
&:hover {
|
|
800
|
+
background-color: var(--color-fill);
|
|
801
|
+
color: var(--color-primary);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
// 用户头像
|
|
806
|
+
&__user {
|
|
807
|
+
position: relative;
|
|
808
|
+
margin-left: 8px;
|
|
809
|
+
|
|
810
|
+
&-trigger {
|
|
811
|
+
display: flex;
|
|
812
|
+
align-items: center;
|
|
813
|
+
gap: 8px;
|
|
814
|
+
cursor: pointer;
|
|
815
|
+
padding: 4px 8px;
|
|
816
|
+
border-radius: var(--border-radius-base);
|
|
817
|
+
transition: background-color 0.2s;
|
|
818
|
+
|
|
819
|
+
&:hover {
|
|
820
|
+
background-color: var(--color-fill);
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
&-name {
|
|
825
|
+
font-size: 14px;
|
|
826
|
+
color: var(--color-text-primary);
|
|
827
|
+
max-width: 100px;
|
|
828
|
+
overflow: hidden;
|
|
829
|
+
text-overflow: ellipsis;
|
|
830
|
+
white-space: nowrap;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
&-arrow {
|
|
834
|
+
font-size: 10px;
|
|
835
|
+
color: var(--color-text-secondary);
|
|
836
|
+
transition: transform 0.2s;
|
|
837
|
+
|
|
838
|
+
&.is-active {
|
|
839
|
+
transform: rotate(180deg);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
&__avatar {
|
|
845
|
+
width: 32px;
|
|
846
|
+
height: 32px;
|
|
847
|
+
border-radius: 50%;
|
|
848
|
+
background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light-3));
|
|
849
|
+
display: flex;
|
|
850
|
+
align-items: center;
|
|
851
|
+
justify-content: center;
|
|
852
|
+
color: #fff;
|
|
853
|
+
font-size: 14px;
|
|
854
|
+
font-weight: 500;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
// 下拉菜单
|
|
858
|
+
&__dropdown {
|
|
859
|
+
position: absolute;
|
|
860
|
+
top: calc(100% + 8px);
|
|
861
|
+
right: 0;
|
|
862
|
+
min-width: 200px;
|
|
863
|
+
background-color: var(--bg-color);
|
|
864
|
+
border-radius: var(--border-radius-base);
|
|
865
|
+
box-shadow: var(--box-shadow);
|
|
866
|
+
overflow: hidden;
|
|
867
|
+
z-index: 100;
|
|
868
|
+
|
|
869
|
+
&-header {
|
|
870
|
+
display: flex;
|
|
871
|
+
align-items: center;
|
|
872
|
+
gap: 12px;
|
|
873
|
+
padding: 16px;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
&-avatar {
|
|
877
|
+
width: 40px;
|
|
878
|
+
height: 40px;
|
|
879
|
+
border-radius: 50%;
|
|
880
|
+
background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light-3));
|
|
881
|
+
display: flex;
|
|
882
|
+
align-items: center;
|
|
883
|
+
justify-content: center;
|
|
884
|
+
color: #fff;
|
|
885
|
+
font-size: 16px;
|
|
886
|
+
font-weight: 500;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
&-info {
|
|
890
|
+
flex: 1;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
&-name {
|
|
894
|
+
font-size: 14px;
|
|
895
|
+
font-weight: 500;
|
|
896
|
+
color: var(--color-text-primary);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
&-role {
|
|
900
|
+
font-size: 12px;
|
|
901
|
+
color: var(--color-text-secondary);
|
|
902
|
+
margin-top: 2px;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
&-divider {
|
|
906
|
+
height: 1px;
|
|
907
|
+
background-color: var(--color-border-lighter);
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
&-menu {
|
|
911
|
+
padding: 8px 0;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
&-item {
|
|
915
|
+
display: flex;
|
|
916
|
+
align-items: center;
|
|
917
|
+
gap: 10px;
|
|
918
|
+
padding: 10px 16px;
|
|
919
|
+
cursor: pointer;
|
|
920
|
+
font-size: 14px;
|
|
921
|
+
color: var(--color-text-regular);
|
|
922
|
+
transition: all 0.2s;
|
|
923
|
+
|
|
924
|
+
&:hover {
|
|
925
|
+
background-color: var(--color-fill);
|
|
926
|
+
color: var(--color-text-primary);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
&--danger {
|
|
930
|
+
color: var(--color-danger);
|
|
931
|
+
|
|
932
|
+
&:hover {
|
|
933
|
+
background-color: var(--color-danger-light);
|
|
934
|
+
color: var(--color-danger);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
// 设置抽屉内容
|
|
942
|
+
.settings-drawer {
|
|
943
|
+
.settings-section {
|
|
944
|
+
margin-bottom: 24px;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
.settings-title {
|
|
948
|
+
font-size: 14px;
|
|
949
|
+
font-weight: 500;
|
|
950
|
+
color: var(--color-text-primary);
|
|
951
|
+
margin-bottom: 12px;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
.settings-layout-options {
|
|
955
|
+
display: flex;
|
|
956
|
+
gap: 12px;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
.layout-option {
|
|
960
|
+
flex: 1;
|
|
961
|
+
display: flex;
|
|
962
|
+
flex-direction: column;
|
|
963
|
+
align-items: center;
|
|
964
|
+
gap: 8px;
|
|
965
|
+
padding: 12px;
|
|
966
|
+
border: 1px solid var(--color-border);
|
|
967
|
+
border-radius: var(--border-radius-base);
|
|
968
|
+
cursor: pointer;
|
|
969
|
+
transition: all 0.2s;
|
|
970
|
+
|
|
971
|
+
&:hover {
|
|
972
|
+
border-color: var(--color-primary-light-5);
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
&.is-active {
|
|
976
|
+
border-color: var(--color-primary);
|
|
977
|
+
background-color: var(--color-primary-light-9);
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
&__preview {
|
|
981
|
+
width: 48px;
|
|
982
|
+
height: 36px;
|
|
983
|
+
border: 1px solid var(--color-border-light);
|
|
984
|
+
border-radius: 2px;
|
|
985
|
+
overflow: hidden;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
&__label {
|
|
989
|
+
font-size: 12px;
|
|
990
|
+
color: var(--color-text-regular);
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
// 布局预览样式
|
|
995
|
+
.layout-preview-sidebar {
|
|
996
|
+
display: flex;
|
|
997
|
+
height: 100%;
|
|
998
|
+
|
|
999
|
+
.preview-aside {
|
|
1000
|
+
width: 25%;
|
|
1001
|
+
height: 100%;
|
|
1002
|
+
background-color: var(--color-primary-light-7);
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.preview-main {
|
|
1006
|
+
flex: 1;
|
|
1007
|
+
display: flex;
|
|
1008
|
+
flex-direction: column;
|
|
1009
|
+
|
|
1010
|
+
.preview-header {
|
|
1011
|
+
height: 20%;
|
|
1012
|
+
background-color: var(--color-border-light);
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.preview-content {
|
|
1016
|
+
flex: 1;
|
|
1017
|
+
background-color: var(--bg-color-page);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
.layout-preview-top {
|
|
1023
|
+
display: flex;
|
|
1024
|
+
flex-direction: column;
|
|
1025
|
+
height: 100%;
|
|
1026
|
+
|
|
1027
|
+
.preview-header-full {
|
|
1028
|
+
height: 25%;
|
|
1029
|
+
background-color: var(--color-primary-light-7);
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
.preview-content-full {
|
|
1033
|
+
flex: 1;
|
|
1034
|
+
background-color: var(--bg-color-page);
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
.layout-preview-mix {
|
|
1039
|
+
display: flex;
|
|
1040
|
+
flex-direction: column;
|
|
1041
|
+
height: 100%;
|
|
1042
|
+
|
|
1043
|
+
.preview-header-mix {
|
|
1044
|
+
height: 25%;
|
|
1045
|
+
background-color: var(--color-primary-light-7);
|
|
1046
|
+
display: flex;
|
|
1047
|
+
|
|
1048
|
+
.preview-mix-left {
|
|
1049
|
+
width: 30%;
|
|
1050
|
+
background-color: var(--color-primary);
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.preview-mix-body {
|
|
1055
|
+
flex: 1;
|
|
1056
|
+
display: flex;
|
|
1057
|
+
|
|
1058
|
+
.preview-mix-aside {
|
|
1059
|
+
width: 25%;
|
|
1060
|
+
background-color: var(--color-primary-light-8);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.preview-mix-content {
|
|
1064
|
+
flex: 1;
|
|
1065
|
+
background-color: var(--bg-color-page);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
.settings-color-options {
|
|
1071
|
+
display: flex;
|
|
1072
|
+
gap: 12px;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
.color-option {
|
|
1076
|
+
width: 24px;
|
|
1077
|
+
height: 24px;
|
|
1078
|
+
border-radius: 4px;
|
|
1079
|
+
cursor: pointer;
|
|
1080
|
+
display: flex;
|
|
1081
|
+
align-items: center;
|
|
1082
|
+
justify-content: center;
|
|
1083
|
+
transition: transform 0.2s;
|
|
1084
|
+
|
|
1085
|
+
&:hover {
|
|
1086
|
+
transform: scale(1.1);
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
&.is-active {
|
|
1090
|
+
box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--color-primary);
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
.settings-switch-list {
|
|
1095
|
+
display: flex;
|
|
1096
|
+
flex-direction: column;
|
|
1097
|
+
gap: 12px;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
.settings-switch-item {
|
|
1101
|
+
display: flex;
|
|
1102
|
+
align-items: center;
|
|
1103
|
+
justify-content: space-between;
|
|
1104
|
+
|
|
1105
|
+
span {
|
|
1106
|
+
font-size: 14px;
|
|
1107
|
+
color: var(--color-text-regular);
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
.switch-wrapper {
|
|
1112
|
+
width: 44px;
|
|
1113
|
+
height: 22px;
|
|
1114
|
+
display: flex;
|
|
1115
|
+
align-items: center;
|
|
1116
|
+
cursor: pointer;
|
|
1117
|
+
|
|
1118
|
+
.switch-core {
|
|
1119
|
+
width: 100%;
|
|
1120
|
+
height: 100%;
|
|
1121
|
+
border-radius: 11px;
|
|
1122
|
+
background-color: var(--color-border);
|
|
1123
|
+
position: relative;
|
|
1124
|
+
transition: background-color 0.2s;
|
|
1125
|
+
|
|
1126
|
+
&::after {
|
|
1127
|
+
content: '';
|
|
1128
|
+
position: absolute;
|
|
1129
|
+
top: 2px;
|
|
1130
|
+
left: 2px;
|
|
1131
|
+
width: 18px;
|
|
1132
|
+
height: 18px;
|
|
1133
|
+
background-color: #fff;
|
|
1134
|
+
border-radius: 50%;
|
|
1135
|
+
transition: left 0.2s;
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
&.is-checked {
|
|
1140
|
+
.switch-core {
|
|
1141
|
+
background-color: var(--color-primary);
|
|
1142
|
+
|
|
1143
|
+
&::after {
|
|
1144
|
+
left: 24px;
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// 下拉动画
|
|
1152
|
+
.dropdown-enter-active,
|
|
1153
|
+
.dropdown-leave-active {
|
|
1154
|
+
transition: all 0.2s ease;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
.dropdown-enter-from,
|
|
1158
|
+
.dropdown-leave-to {
|
|
1159
|
+
opacity: 0;
|
|
1160
|
+
transform: translateY(-10px);
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
// 搜索下拉动画
|
|
1164
|
+
.search-dropdown-enter-active,
|
|
1165
|
+
.search-dropdown-leave-active {
|
|
1166
|
+
transition: all 0.2s ease;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
.search-dropdown-enter-from,
|
|
1170
|
+
.search-dropdown-leave-to {
|
|
1171
|
+
opacity: 0;
|
|
1172
|
+
transform: translateY(-4px);
|
|
1173
|
+
}
|
|
1171
1174
|
</style>
|