xto-fronted 0.4.71 → 0.4.73

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.
Files changed (97) hide show
  1. package/dist/assets/404-CrBiLyvr.js +1 -0
  2. package/dist/assets/404-Cw_4ZCL6.css +1 -0
  3. package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
  4. package/dist/assets/index-9XqWtCGs.js +1 -0
  5. package/dist/assets/index-BBGKF0l-.js +1 -0
  6. package/dist/assets/index-BRR97dc6.js +1 -0
  7. package/dist/assets/index-BlRslYYI.css +1 -0
  8. package/dist/assets/index-BudArKxR.css +1 -0
  9. package/dist/assets/index-CFhWBbxk.css +1 -0
  10. package/dist/assets/index-CRJFI4iz.js +2 -0
  11. package/dist/assets/index-CmknWHK0.js +1 -0
  12. package/dist/assets/index-D7epoF1g.js +1 -0
  13. package/dist/assets/index-D9XBi20Y.css +1 -0
  14. package/dist/assets/index-DkkuYBgT.css +1 -0
  15. package/dist/assets/index-O9wpAB3Q.js +1 -0
  16. package/dist/assets/index-_aYxnqzF.css +1 -0
  17. package/dist/assets/index-rfC7s9zA.js +1 -0
  18. package/dist/assets/index-vfvEFrCH.css +1 -0
  19. package/dist/assets/vendor-42ANG6Sg.js +6 -0
  20. package/dist/assets/vue-vendor-D8SAgT8u.js +29 -0
  21. package/dist/assets/xto-base-BD3OH0V6.js +1 -0
  22. package/dist/assets/xto-base-CojW9IFO.css +1 -0
  23. package/dist/assets/xto-business--V1F5Gwb.css +1 -0
  24. package/dist/assets/xto-core-Boim7B0B.js +1 -0
  25. package/dist/assets/xto-data-CnAQAQH2.css +1 -0
  26. package/dist/assets/xto-data-DuG2QJrr.js +1 -0
  27. package/dist/assets/xto-feedback-C-ESp-Y1.css +1 -0
  28. package/dist/assets/xto-feedback-XZPSQcJN.js +1 -0
  29. package/dist/assets/xto-form-BmTGLIm_.js +1 -0
  30. package/dist/assets/xto-form-CrsyAjyr.css +1 -0
  31. package/dist/assets/xto-layout-D1stVnJI.css +1 -0
  32. package/dist/assets/xto-navigation-BRzSCpAw.css +1 -0
  33. package/dist/assets/xto-navigation-nPmjRi-J.js +1 -0
  34. package/dist/index.html +28 -0
  35. package/package.json +90 -87
  36. package/src/App.vue +30 -1
  37. package/src/assets/styles/_root.scss +141 -97
  38. package/src/assets/styles/_variables.scss +44 -19
  39. package/src/assets/styles/index.scss +267 -42
  40. package/src/components/Layout/Sidebar.vue +29 -10
  41. package/src/views/dashboard/index.vue +417 -155
  42. package/src/views/error/403.vue +251 -56
  43. package/src/views/error/404.vue +253 -56
  44. package/src/views/login/index.vue +586 -194
  45. package/src/views/system/menu/index.vue +403 -94
  46. package/src/views/system/role/index.vue +348 -69
  47. package/src/views/system/user/index.vue +402 -73
  48. package/dist/App.vue.d.ts +0 -2
  49. package/dist/api/auth.d.ts +0 -8
  50. package/dist/api/system.d.ts +0 -16
  51. package/dist/api/user.d.ts +0 -13
  52. package/dist/components/Layout/Footer.vue.d.ts +0 -2
  53. package/dist/components/Layout/Header.vue.d.ts +0 -5
  54. package/dist/components/Layout/MixTopMenu.vue.d.ts +0 -5
  55. package/dist/components/Layout/Sidebar.vue.d.ts +0 -11
  56. package/dist/components/Layout/SidebarMenuItem.vue.d.ts +0 -5
  57. package/dist/components/Layout/Tabs.vue.d.ts +0 -2
  58. package/dist/components/Layout/TopMenu.vue.d.ts +0 -5
  59. package/dist/components/Layout/index.vue.d.ts +0 -2
  60. package/dist/composables/useApp.d.ts +0 -29
  61. package/dist/composables/useAuth.d.ts +0 -6
  62. package/dist/composables/useForm.d.ts +0 -20
  63. package/dist/composables/useTable.d.ts +0 -29
  64. package/dist/directives/permission.d.ts +0 -4
  65. package/dist/enums/index.d.ts +0 -32
  66. package/dist/index-BgbSp2mz.js +0 -372
  67. package/dist/index-By874kXD.js +0 -142
  68. package/dist/index-COz0Cbj7.js +0 -345
  69. package/dist/index-CgbSCzIp.js +0 -3159
  70. package/dist/index-CzOd0mGb.js +0 -475
  71. package/dist/index.d.ts +0 -54
  72. package/dist/index.es.js +0 -91
  73. package/dist/index.umd.js +0 -1
  74. package/dist/main.d.ts +0 -0
  75. package/dist/router/dynamicRoutes.d.ts +0 -30
  76. package/dist/router/guards.d.ts +0 -17
  77. package/dist/router/index.d.ts +0 -6
  78. package/dist/router/layoutRoute.d.ts +0 -18
  79. package/dist/router/staticRoutes.d.ts +0 -2
  80. package/dist/stores/app.d.ts +0 -93
  81. package/dist/stores/auth.d.ts +0 -41
  82. package/dist/stores/index.d.ts +0 -9
  83. package/dist/stores/menu.d.ts +0 -77
  84. package/dist/stores/user.d.ts +0 -92
  85. package/dist/style.css +0 -1
  86. package/dist/utils/auth.d.ts +0 -27
  87. package/dist/utils/config.d.ts +0 -30
  88. package/dist/utils/permission.d.ts +0 -18
  89. package/dist/utils/request.d.ts +0 -24
  90. package/dist/utils/storage.d.ts +0 -24
  91. package/dist/views/dashboard/index.vue.d.ts +0 -2
  92. package/dist/views/error/403.vue.d.ts +0 -2
  93. package/dist/views/error/404.vue.d.ts +0 -2
  94. package/dist/views/login/index.vue.d.ts +0 -4
  95. package/dist/views/system/menu/index.vue.d.ts +0 -4
  96. package/dist/views/system/role/index.vue.d.ts +0 -4
  97. package/dist/views/system/user/index.vue.d.ts +0 -4
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, reactive, computed, onMounted } from 'vue'
3
3
  import { Form, FormItem, Input, Select, Switch, InputNumber } from '@xto/form'
4
- import { Card, Tag } from '@xto/data'
4
+ import { Tag } from '@xto/data'
5
5
  import { Modal, Message } from '@xto/feedback'
6
6
  import { Space, Button } from '@xto/base'
7
7
  import { MenuType, MenuTypeOptions, Status } from '@/enums'
@@ -201,6 +201,24 @@ const getMenuIcon = (icon?: string) => {
201
201
  return iconMap[icon || ''] || '📄'
202
202
  }
203
203
 
204
+ // 获取类型标签类型
205
+ const getTypeTagType = (type: MenuType) => {
206
+ switch (type) {
207
+ case MenuType.DIRECTORY: return 'primary'
208
+ case MenuType.MENU: return 'success'
209
+ default: return 'warning'
210
+ }
211
+ }
212
+
213
+ // 获取类型标签文本
214
+ const getTypeTagText = (type: MenuType) => {
215
+ switch (type) {
216
+ case MenuType.DIRECTORY: return '目录'
217
+ case MenuType.MENU: return '菜单'
218
+ default: return '按钮'
219
+ }
220
+ }
221
+
204
222
  onMounted(() => {
205
223
  getMenuList()
206
224
  })
@@ -208,74 +226,155 @@ onMounted(() => {
208
226
 
209
227
  <template>
210
228
  <div class="menu-page">
211
- <Card class="menu-card">
229
+ <!-- 表格 -->
230
+ <div class="table-section">
212
231
  <!-- 工具栏 -->
213
- <div class="toolbar">
214
- <Button type="primary" @click="handleAdd()">新增菜单</Button>
232
+ <div class="table-toolbar">
233
+ <div class="toolbar-left">
234
+ <Button type="primary" @click="handleAdd()">
235
+ <template #icon>
236
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
237
+ <line x1="12" y1="5" x2="12" y2="19"/>
238
+ <line x1="5" y1="12" x2="19" y2="12"/>
239
+ </svg>
240
+ </template>
241
+ 新增菜单
242
+ </Button>
243
+ </div>
244
+ <div class="toolbar-right">
245
+ <span class="table-count">共 {{ menuList.length }} 个菜单</span>
246
+ </div>
215
247
  </div>
216
248
 
217
- <!-- 菜单树 -->
218
- <div class="menu-tree">
219
- <table class="tree-table">
249
+ <!-- 菜单树表格 -->
250
+ <div class="table-wrapper">
251
+ <table class="data-table">
220
252
  <thead>
221
253
  <tr>
222
- <th>菜单名称</th>
223
- <th>图标</th>
224
- <th>路由路径</th>
225
- <th>类型</th>
226
- <th>排序</th>
227
- <th>状态</th>
228
- <th>操作</th>
254
+ <th class="col-name">菜单名称</th>
255
+ <th class="col-icon">图标</th>
256
+ <th class="col-path">路由路径</th>
257
+ <th class="col-type">类型</th>
258
+ <th class="col-sort">排序</th>
259
+ <th class="col-status">状态</th>
260
+ <th class="col-actions">操作</th>
229
261
  </tr>
230
262
  </thead>
231
263
  <tbody>
232
- <template v-for="menu in menuList" :key="menu.id">
233
- <tr class="tree-row tree-row--level-0">
234
- <td>
235
- <span class="menu-name" @click="handleEdit(menu)">{{ menu.title }}</span>
264
+ <tr v-if="loading">
265
+ <td colspan="7" class="loading-cell">
266
+ <div class="loading-content">
267
+ <div class="loading-spinner"></div>
268
+ <span>加载中...</span>
269
+ </div>
270
+ </td>
271
+ </tr>
272
+ <tr v-else-if="menuList.length === 0">
273
+ <td colspan="7" class="empty-cell">
274
+ <div class="empty-content">
275
+ <svg viewBox="0 0 64 41" fill="none">
276
+ <g transform="translate(0 1)">
277
+ <ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"/>
278
+ <g stroke="var(--color-text-placeholder)" stroke-width="2">
279
+ <path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"/>
280
+ <path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35H11.95C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="var(--color-fill)"/>
281
+ </g>
282
+ </g>
283
+ </svg>
284
+ <span>暂无数据</span>
285
+ </div>
286
+ </td>
287
+ </tr>
288
+ <template v-else v-for="menu in menuList" :key="menu.id">
289
+ <tr class="data-row tree-row--level-0">
290
+ <td class="col-name">
291
+ <div class="menu-info">
292
+ <span class="menu-icon-wrapper">{{ getMenuIcon(menu.icon) }}</span>
293
+ <span class="menu-title" @click="handleEdit(menu)">{{ menu.title }}</span>
294
+ </div>
295
+ </td>
296
+ <td class="col-icon">
297
+ <span class="icon-text">{{ getMenuIcon(menu.icon) }}</span>
298
+ </td>
299
+ <td class="col-path">
300
+ <code class="path-code">{{ menu.path }}</code>
236
301
  </td>
237
- <td>{{ getMenuIcon(menu.icon) }}</td>
238
- <td>{{ menu.path }}</td>
239
- <td>
240
- <Tag :type="menu.type === MenuType.DIRECTORY ? 'primary' : menu.type === MenuType.MENU ? 'success' : 'warning'" size="small">
241
- {{ menu.type === MenuType.DIRECTORY ? '目录' : menu.type === MenuType.MENU ? '菜单' : '按钮' }}
302
+ <td class="col-type">
303
+ <Tag :type="getTypeTagType(menu.type)" size="small">
304
+ {{ getTypeTagText(menu.type) }}
242
305
  </Tag>
243
306
  </td>
244
- <td>{{ menu.sort }}</td>
245
- <td>
307
+ <td class="col-sort">
308
+ <span class="sort-badge">{{ menu.sort }}</span>
309
+ </td>
310
+ <td class="col-status">
246
311
  <Tag :type="menu.status === Status.ENABLED ? 'success' : 'danger'" size="small">
247
312
  {{ menu.status === Status.ENABLED ? '启用' : '禁用' }}
248
313
  </Tag>
249
314
  </td>
250
- <td>
251
- <Space>
252
- <Button type="primary" link size="small" @click="handleAdd(menu.id)">新增</Button>
253
- <Button type="primary" link size="small" @click="handleEdit(menu)">编辑</Button>
315
+ <td class="col-actions">
316
+ <Space class="action-buttons">
317
+ <Button type="primary" link size="small" @click="handleAdd(menu.id)">
318
+ <template #icon>
319
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
320
+ <line x1="12" y1="5" x2="12" y2="19"/>
321
+ <line x1="5" y1="12" x2="19" y2="12"/>
322
+ </svg>
323
+ </template>
324
+ 新增
325
+ </Button>
326
+ <Button type="primary" link size="small" @click="handleEdit(menu)">
327
+ <template #icon>
328
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
329
+ <path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"/>
330
+ <path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"/>
331
+ </svg>
332
+ </template>
333
+ 编辑
334
+ </Button>
254
335
  </Space>
255
336
  </td>
256
337
  </tr>
257
338
  <template v-if="menu.children" v-for="child in menu.children" :key="child.id">
258
- <tr class="tree-row tree-row--level-1">
259
- <td>
260
- <span class="tree-indent"></span>
261
- <span class="menu-name" @click="handleEdit(child)">{{ child.title }}</span>
339
+ <tr class="data-row tree-row--level-1">
340
+ <td class="col-name">
341
+ <div class="menu-info">
342
+ <span class="tree-indent"></span>
343
+ <span class="tree-line"></span>
344
+ <span class="menu-icon-wrapper">{{ getMenuIcon(child.icon) }}</span>
345
+ <span class="menu-title" @click="handleEdit(child)">{{ child.title }}</span>
346
+ </div>
347
+ </td>
348
+ <td class="col-icon">
349
+ <span class="icon-text">{{ getMenuIcon(child.icon) }}</span>
350
+ </td>
351
+ <td class="col-path">
352
+ <code class="path-code">{{ child.path }}</code>
262
353
  </td>
263
- <td>{{ getMenuIcon(child.icon) }}</td>
264
- <td>{{ child.path }}</td>
265
- <td>
266
- <Tag :type="child.type === MenuType.DIRECTORY ? 'primary' : child.type === MenuType.MENU ? 'success' : 'warning'" size="small">
267
- {{ child.type === MenuType.DIRECTORY ? '目录' : child.type === MenuType.MENU ? '菜单' : '按钮' }}
354
+ <td class="col-type">
355
+ <Tag :type="getTypeTagType(child.type)" size="small">
356
+ {{ getTypeTagText(child.type) }}
268
357
  </Tag>
269
358
  </td>
270
- <td>{{ child.sort }}</td>
271
- <td>
359
+ <td class="col-sort">
360
+ <span class="sort-badge">{{ child.sort }}</span>
361
+ </td>
362
+ <td class="col-status">
272
363
  <Tag :type="child.status === Status.ENABLED ? 'success' : 'danger'" size="small">
273
364
  {{ child.status === Status.ENABLED ? '启用' : '禁用' }}
274
365
  </Tag>
275
366
  </td>
276
- <td>
277
- <Space>
278
- <Button type="primary" link size="small" @click="handleEdit(child)">编辑</Button>
367
+ <td class="col-actions">
368
+ <Space class="action-buttons">
369
+ <Button type="primary" link size="small" @click="handleEdit(child)">
370
+ <template #icon>
371
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
372
+ <path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"/>
373
+ <path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"/>
374
+ </svg>
375
+ </template>
376
+ 编辑
377
+ </Button>
279
378
  </Space>
280
379
  </td>
281
380
  </tr>
@@ -284,44 +383,55 @@ onMounted(() => {
284
383
  </tbody>
285
384
  </table>
286
385
  </div>
287
- </Card>
386
+ </div>
288
387
 
289
388
  <!-- 编辑弹窗 -->
290
- <Modal v-model="modalVisible" :title="modalTitle" width="600px">
291
- <Form ref="formRef" :model="formData" :rules="rules" label-width="80px">
292
- <FormItem label="上级菜单">
293
- <Input v-model="formData.parentId" placeholder="上级菜单ID" disabled />
294
- </FormItem>
295
- <FormItem label="菜单类型">
296
- <Select v-model="formData.type" :options="MenuTypeOptions" />
297
- </FormItem>
298
- <FormItem label="菜单名称" prop="name">
299
- <Input v-model="formData.name" placeholder="请输入菜单名称(路由name)" />
300
- </FormItem>
301
- <FormItem label="菜单标题" prop="title">
302
- <Input v-model="formData.title" placeholder="请输入菜单标题" />
303
- </FormItem>
304
- <FormItem label="路由路径" prop="path">
305
- <Input v-model="formData.path" placeholder="请输入路由路径" />
306
- </FormItem>
307
- <FormItem label="组件路径">
308
- <Input v-model="formData.component" placeholder="请输入组件路径" />
309
- </FormItem>
310
- <FormItem label="图标">
311
- <Input v-model="formData.icon" placeholder="请输入图标名称" />
312
- </FormItem>
313
- <FormItem label="排序">
314
- <InputNumber v-model="formData.sort" :min="0" />
315
- </FormItem>
316
- <FormItem label="状态">
317
- <Switch v-model="formData.status" :active-value="Status.ENABLED" :inactive-value="Status.DISABLED" />
318
- </FormItem>
319
- <FormItem label="隐藏">
320
- <Switch v-model="formData.hidden" />
321
- </FormItem>
322
- <FormItem label="缓存">
323
- <Switch v-model="formData.keepAlive" />
324
- </FormItem>
389
+ <Modal v-model="modalVisible" :title="modalTitle" width="600px" class="menu-modal">
390
+ <Form ref="formRef" :model="formData" :rules="rules" label-width="80px" class="menu-form">
391
+ <div class="form-grid">
392
+ <FormItem label="上级菜单" class="form-item-full">
393
+ <Input v-model="formData.parentId" placeholder="上级菜单ID" disabled />
394
+ </FormItem>
395
+ <FormItem label="菜单类型">
396
+ <Select v-model="formData.type" :options="MenuTypeOptions" />
397
+ </FormItem>
398
+ <FormItem label="排序">
399
+ <InputNumber v-model="formData.sort" :min="0" />
400
+ </FormItem>
401
+ <FormItem label="菜单名称" prop="name">
402
+ <Input v-model="formData.name" placeholder="请输入菜单名称(路由name)" />
403
+ </FormItem>
404
+ <FormItem label="菜单标题" prop="title">
405
+ <Input v-model="formData.title" placeholder="请输入菜单标题" />
406
+ </FormItem>
407
+ <FormItem label="路由路径" prop="path" class="form-item-full">
408
+ <Input v-model="formData.path" placeholder="请输入路由路径" />
409
+ </FormItem>
410
+ <FormItem label="组件路径" class="form-item-full">
411
+ <Input v-model="formData.component" placeholder="请输入组件路径" />
412
+ </FormItem>
413
+ <FormItem label="图标">
414
+ <Input v-model="formData.icon" placeholder="请输入图标名称" />
415
+ </FormItem>
416
+ <FormItem label="状态">
417
+ <div class="status-field">
418
+ <Switch v-model="formData.status" :active-value="Status.ENABLED" :inactive-value="Status.DISABLED" />
419
+ <span class="status-label">{{ formData.status === Status.ENABLED ? '启用' : '禁用' }}</span>
420
+ </div>
421
+ </FormItem>
422
+ <FormItem label="隐藏">
423
+ <div class="status-field">
424
+ <Switch v-model="formData.hidden" />
425
+ <span class="status-label">{{ formData.hidden ? '隐藏' : '显示' }}</span>
426
+ </div>
427
+ </FormItem>
428
+ <FormItem label="缓存">
429
+ <div class="status-field">
430
+ <Switch v-model="formData.keepAlive" />
431
+ <span class="status-label">{{ formData.keepAlive ? '开启' : '关闭' }}</span>
432
+ </div>
433
+ </FormItem>
434
+ </div>
325
435
  </Form>
326
436
  <template #footer>
327
437
  <Space>
@@ -335,47 +445,246 @@ onMounted(() => {
335
445
 
336
446
  <style lang="scss" scoped>
337
447
  .menu-page {
338
- padding: 20px;
448
+ padding: 24px;
449
+ background: var(--bg-color-page);
450
+ min-height: 100%;
451
+ }
452
+
453
+ // 表格区域
454
+ .table-section {
455
+ background: var(--bg-color);
456
+ border-radius: var(--border-radius-large);
457
+ box-shadow: var(--box-shadow-card);
458
+ overflow: hidden;
459
+ }
460
+
461
+ .table-toolbar {
462
+ display: flex;
463
+ justify-content: space-between;
464
+ align-items: center;
465
+ padding: 16px 24px;
466
+ border-bottom: 1px solid var(--color-border-lighter);
467
+
468
+ .toolbar-left {
469
+ display: flex;
470
+ gap: 12px;
471
+ }
339
472
 
340
- .toolbar {
341
- margin-bottom: 15px;
473
+ .table-count {
474
+ font-size: 14px;
475
+ color: var(--color-text-secondary);
342
476
  }
343
477
  }
344
478
 
345
- .tree-table {
479
+ .table-wrapper {
480
+ overflow-x: auto;
481
+ }
482
+
483
+ // 表格样式
484
+ .data-table {
346
485
  width: 100%;
347
486
  border-collapse: collapse;
348
487
 
349
488
  th, td {
350
- padding: 12px;
489
+ padding: 14px 16px;
351
490
  text-align: left;
352
491
  border-bottom: 1px solid var(--color-border-lighter);
353
492
  }
354
493
 
355
494
  th {
495
+ font-size: 14px;
356
496
  font-weight: 500;
357
- color: var(--color-text-regular);
358
- background-color: var(--color-fill-light);
497
+ color: var(--color-text-secondary);
498
+ background: var(--color-fill-light);
499
+ white-space: nowrap;
500
+ }
501
+
502
+ .data-row {
503
+ transition: background-color 0.2s;
504
+
505
+ &:hover {
506
+ background: var(--color-primary-light-6);
507
+ }
508
+ }
509
+
510
+ td {
511
+ vertical-align: middle;
512
+ }
513
+
514
+ .loading-cell,
515
+ .empty-cell {
516
+ padding: 60px 20px;
359
517
  }
360
518
 
361
- .tree-row--level-1 {
362
- td:first-child {
363
- padding-left: 30px;
519
+ .loading-content,
520
+ .empty-content {
521
+ display: flex;
522
+ flex-direction: column;
523
+ align-items: center;
524
+ gap: 16px;
525
+ color: var(--color-text-placeholder);
526
+
527
+ svg {
528
+ width: 64px;
529
+ height: 41px;
364
530
  }
365
531
  }
532
+
533
+ .loading-spinner {
534
+ width: 32px;
535
+ height: 32px;
536
+ border: 3px solid var(--color-border-lighter);
537
+ border-top-color: var(--color-primary);
538
+ border-radius: 50%;
539
+ animation: spin 0.8s linear infinite;
540
+ }
541
+ }
542
+
543
+ @keyframes spin {
544
+ to { transform: rotate(360deg); }
545
+ }
546
+
547
+ // 树形结构
548
+ .tree-row--level-1 {
549
+ .col-name {
550
+ padding-left: 40px;
551
+ }
366
552
  }
367
553
 
368
554
  .tree-indent {
369
555
  display: inline-block;
370
- width: 20px;
556
+ width: 24px;
371
557
  }
372
558
 
373
- .menu-name {
559
+ .tree-line {
560
+ position: relative;
561
+ display: inline-block;
562
+ width: 16px;
563
+ height: 1px;
564
+ background: var(--color-border-light);
565
+ margin-right: 8px;
566
+ vertical-align: middle;
567
+ }
568
+
569
+ // 列样式
570
+ .col-name {
571
+ min-width: 200px;
572
+ }
573
+
574
+ .menu-info {
575
+ display: flex;
576
+ align-items: center;
577
+ gap: 8px;
578
+ }
579
+
580
+ .menu-icon-wrapper {
581
+ width: 28px;
582
+ height: 28px;
583
+ display: flex;
584
+ align-items: center;
585
+ justify-content: center;
586
+ background: var(--color-fill-light);
587
+ border-radius: 6px;
588
+ font-size: 14px;
589
+ }
590
+
591
+ .menu-title {
592
+ font-size: 14px;
593
+ font-weight: 500;
594
+ color: var(--color-text-primary);
374
595
  cursor: pointer;
375
- color: var(--color-primary);
596
+ transition: color 0.2s;
376
597
 
377
598
  &:hover {
378
- text-decoration: underline;
599
+ color: var(--color-primary);
600
+ }
601
+ }
602
+
603
+ .col-icon {
604
+ width: 80px;
605
+ }
606
+
607
+ .icon-text {
608
+ font-size: 16px;
609
+ }
610
+
611
+ .col-path {
612
+ min-width: 140px;
613
+ }
614
+
615
+ .path-code {
616
+ font-family: 'SF Mono', Monaco, Consolas, monospace;
617
+ font-size: 12px;
618
+ padding: 4px 8px;
619
+ background: var(--color-fill-light);
620
+ border-radius: 4px;
621
+ color: var(--color-text-secondary);
622
+ }
623
+
624
+ .col-type {
625
+ width: 80px;
626
+ }
627
+
628
+ .col-sort {
629
+ width: 60px;
630
+ }
631
+
632
+ .sort-badge {
633
+ display: inline-flex;
634
+ align-items: center;
635
+ justify-content: center;
636
+ min-width: 24px;
637
+ height: 24px;
638
+ padding: 0 8px;
639
+ background: var(--color-fill);
640
+ border-radius: 12px;
641
+ font-size: 12px;
642
+ color: var(--color-text-secondary);
643
+ }
644
+
645
+ .col-status {
646
+ width: 80px;
647
+ }
648
+
649
+ .col-actions {
650
+ min-width: 140px;
651
+ }
652
+
653
+ .action-buttons {
654
+ :deep(.x-button) {
655
+ padding: 4px 8px;
656
+
657
+ svg {
658
+ width: 14px;
659
+ height: 14px;
660
+ margin-right: 4px;
661
+ }
662
+ }
663
+ }
664
+
665
+ // 弹窗表单
666
+ .menu-form {
667
+ padding: 16px 0;
668
+
669
+ .form-grid {
670
+ display: grid;
671
+ grid-template-columns: repeat(2, 1fr);
672
+ gap: 0 24px;
673
+ }
674
+
675
+ .form-item-full {
676
+ grid-column: span 2;
677
+ }
678
+
679
+ .status-field {
680
+ display: flex;
681
+ align-items: center;
682
+ gap: 12px;
683
+ }
684
+
685
+ .status-label {
686
+ font-size: 14px;
687
+ color: var(--color-text-secondary);
379
688
  }
380
689
  }
381
- </style>
690
+ </style>