xto-fronted 0.6.3 → 0.8.0

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 (33) hide show
  1. package/dist/{index-DydABgae.js → index-D73_-C9m.js} +13 -13
  2. package/dist/index-DBjV4kzh.js +249 -0
  3. package/dist/{index-IOKG7Gwo.js → index-DJ1oHe08.js} +973 -918
  4. package/dist/{index-BKO6Hzba.js → index-D_TGEwDg.js} +192 -140
  5. package/dist/{index-BZSZ3bx2.js → index-DauAWAHG.js} +28 -28
  6. package/dist/index.js +1 -1
  7. package/dist/style.css +1 -1
  8. package/package.json +9 -9
  9. package/src/App.vue +4 -4
  10. package/src/assets/styles/_dark.scss +176 -176
  11. package/src/assets/styles/_reset.scss +8 -8
  12. package/src/assets/styles/_root.scss +131 -125
  13. package/src/assets/styles/_variables.scss +17 -17
  14. package/src/assets/styles/index.scss +39 -39
  15. package/src/components/Layout/Footer.vue +1 -1
  16. package/src/components/Layout/Header.vue +59 -60
  17. package/src/components/Layout/MixTopMenu.vue +42 -43
  18. package/src/components/Layout/Sidebar.vue +8 -8
  19. package/src/components/Layout/SidebarMenuItem.vue +2 -2
  20. package/src/components/Layout/Tabs.vue +6 -6
  21. package/src/components/Layout/TopMenu.vue +42 -43
  22. package/src/components/Layout/index.vue +4 -4
  23. package/src/stores/app.ts +26 -2
  24. package/src/style.scss +2 -2
  25. package/src/views/dashboard/index.vue +125 -104
  26. package/src/views/error/403.vue +13 -13
  27. package/src/views/error/404.vue +14 -14
  28. package/src/views/login/index.vue +21 -54
  29. package/src/views/system/menu/index.vue +30 -30
  30. package/src/views/system/role/index.vue +20 -20
  31. package/src/views/system/user/index.vue +23 -23
  32. package/vite.config.ts +4 -1
  33. package/dist/index-BXHwCe22.js +0 -189
@@ -247,9 +247,9 @@ onMounted(() => {
247
247
  <svg viewBox="0 0 64 41" fill="none">
248
248
  <g transform="translate(0 1)">
249
249
  <ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"/>
250
- <g stroke="var(--xto-color-text-placeholder, #9CA3AF)" stroke-width="2">
250
+ <g stroke="var(--xto-color-text-placeholder, #A9AEB8)" stroke-width="2">
251
251
  <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"/>
252
- <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(--xto-fill-color, #F3F4F6)"/>
252
+ <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(--xto-fill-color, #F2F3F5)"/>
253
253
  </g>
254
254
  </g>
255
255
  </svg>
@@ -377,7 +377,7 @@ onMounted(() => {
377
377
  <style lang="scss" scoped>
378
378
  .user-page {
379
379
  padding: 24px;
380
- background: var(--xto-bg-color-page, #F9FAFB);
380
+ background: var(--xto-bg-color-page, #F7F8FA);
381
381
  min-height: 100%;
382
382
  }
383
383
 
@@ -418,7 +418,7 @@ onMounted(() => {
418
418
  justify-content: space-between;
419
419
  align-items: center;
420
420
  padding: 16px 24px;
421
- border-bottom: 1px solid var(--xto-border-color-lighter, #F3F4F6);
421
+ border-bottom: 1px solid var(--xto-border-color-lighter, #F2F3F5);
422
422
 
423
423
  .toolbar-left {
424
424
  display: flex;
@@ -427,7 +427,7 @@ onMounted(() => {
427
427
 
428
428
  .table-count {
429
429
  font-size: 14px;
430
- color: var(--xto-color-text-secondary, #6B7280);
430
+ color: var(--xto-color-text-secondary, #86909C);
431
431
  }
432
432
  }
433
433
 
@@ -443,14 +443,14 @@ onMounted(() => {
443
443
  th, td {
444
444
  padding: 14px 16px;
445
445
  text-align: left;
446
- border-bottom: 1px solid var(--xto-border-color-lighter, #F3F4F6);
446
+ border-bottom: 1px solid var(--xto-border-color-lighter, #F2F3F5);
447
447
  }
448
448
 
449
449
  th {
450
450
  font-size: 14px;
451
451
  font-weight: 500;
452
- color: var(--xto-color-text-secondary, #6B7280);
453
- background: var(--xto-fill-color-light, #F9FAFB);
452
+ color: var(--xto-color-text-secondary, #86909C);
453
+ background: var(--xto-fill-color-light, #F7F8FA);
454
454
  white-space: nowrap;
455
455
  }
456
456
 
@@ -458,7 +458,7 @@ onMounted(() => {
458
458
  transition: background-color 0.2s;
459
459
 
460
460
  &:hover {
461
- background: var(--xto-color-primary-light-6, #A5B4FC);
461
+ background: var(--xto-color-primary-light-6, #B9B5F5);
462
462
  }
463
463
  }
464
464
 
@@ -477,7 +477,7 @@ onMounted(() => {
477
477
  flex-direction: column;
478
478
  align-items: center;
479
479
  gap: 16px;
480
- color: var(--xto-color-text-placeholder, #9CA3AF);
480
+ color: var(--xto-color-text-placeholder, #A9AEB8);
481
481
 
482
482
  svg {
483
483
  width: 64px;
@@ -488,7 +488,7 @@ onMounted(() => {
488
488
  .loading-spinner {
489
489
  width: 32px;
490
490
  height: 32px;
491
- border: 3px solid var(--xto-border-color-lighter, #F3F4F6);
491
+ border: 3px solid var(--xto-border-color-lighter, #F2F3F5);
492
492
  border-top-color: var(--xto-color-primary, #4F46E5);
493
493
  border-radius: 50%;
494
494
  animation: spin 0.8s linear infinite;
@@ -508,11 +508,11 @@ onMounted(() => {
508
508
  display: inline-block;
509
509
  min-width: 32px;
510
510
  padding: 4px 10px;
511
- background: var(--xto-fill-color, #F3F4F6);
511
+ background: var(--xto-fill-color, #F2F3F5);
512
512
  border-radius: 12px;
513
513
  font-size: 12px;
514
514
  font-weight: 500;
515
- color: var(--xto-color-text-secondary, #6B7280);
515
+ color: var(--xto-color-text-secondary, #86909C);
516
516
  text-align: center;
517
517
  }
518
518
 
@@ -532,7 +532,7 @@ onMounted(() => {
532
532
  display: flex;
533
533
  align-items: center;
534
534
  justify-content: center;
535
- background: linear-gradient(135deg, var(--xto-color-primary, #4F46E5) 0%, var(--xto-color-primary-light-1, #5B54E8) 100%);
535
+ background: linear-gradient(135deg, var(--xto-color-primary, #4F46E5) 0%, var(--xto-color-primary-light-1, #6158E7) 100%);
536
536
  border-radius: 50%;
537
537
  font-size: 16px;
538
538
  font-weight: 500;
@@ -549,12 +549,12 @@ onMounted(() => {
549
549
  .user-nickname {
550
550
  font-size: 14px;
551
551
  font-weight: 500;
552
- color: var(--xto-color-text-primary, #1F2937);
552
+ color: var(--xto-color-text-primary, #1F2329);
553
553
  }
554
554
 
555
555
  .user-username {
556
556
  font-size: 12px;
557
- color: var(--xto-color-text-placeholder, #9CA3AF);
557
+ color: var(--xto-color-text-placeholder, #A9AEB8);
558
558
  }
559
559
 
560
560
  .col-contact {
@@ -570,11 +570,11 @@ onMounted(() => {
570
570
  .contact-email,
571
571
  .contact-phone {
572
572
  font-size: 13px;
573
- color: var(--xto-color-text-regular, #4B5563);
573
+ color: var(--xto-color-text-regular, #4E5566);
574
574
  }
575
575
 
576
576
  .contact-phone {
577
- color: var(--xto-color-text-secondary, #6B7280);
577
+ color: var(--xto-color-text-secondary, #86909C);
578
578
  }
579
579
 
580
580
  .col-roles {
@@ -598,10 +598,10 @@ onMounted(() => {
598
598
 
599
599
  .status-text {
600
600
  font-size: 13px;
601
- color: var(--xto-color-text-secondary, #6B7280);
601
+ color: var(--xto-color-text-secondary, #86909C);
602
602
 
603
603
  &.enabled {
604
- color: var(--xto-color-success, #10B981);
604
+ color: var(--xto-color-success, #2BC48A);
605
605
  }
606
606
  }
607
607
 
@@ -611,7 +611,7 @@ onMounted(() => {
611
611
 
612
612
  .time-text {
613
613
  font-size: 13px;
614
- color: var(--xto-color-text-secondary, #6B7280);
614
+ color: var(--xto-color-text-secondary, #86909C);
615
615
  }
616
616
 
617
617
  .col-actions {
@@ -635,7 +635,7 @@ onMounted(() => {
635
635
  display: flex;
636
636
  justify-content: flex-end;
637
637
  padding: 16px 24px;
638
- border-top: 1px solid var(--xto-border-color-lighter, #F3F4F6);
638
+ border-top: 1px solid var(--xto-border-color-lighter, #F2F3F5);
639
639
  }
640
640
 
641
641
  // 弹窗表单
@@ -650,7 +650,7 @@ onMounted(() => {
650
650
 
651
651
  .status-label {
652
652
  font-size: 14px;
653
- color: var(--xto-color-text-secondary, #6B7280);
653
+ color: var(--xto-color-text-secondary, #86909C);
654
654
  }
655
655
  }
656
656
  </style>
package/vite.config.ts CHANGED
@@ -49,7 +49,10 @@ export default defineConfig(({ mode }) => {
49
49
  open: true,
50
50
  proxy: {
51
51
  '/api': {
52
- target: env.VITE_API_BASE_URL || 'http://localhost:8080',
52
+ // 代理目标必须是绝对 URL;env 里的 /api 是请求前缀,不能当 target
53
+ target: /^https?:\/\//.test(env.VITE_API_BASE_URL || '')
54
+ ? env.VITE_API_BASE_URL
55
+ : 'http://localhost:8080',
53
56
  changeOrigin: true,
54
57
  rewrite: (path) => path.replace(/^\/api/, '')
55
58
  }
@@ -1,189 +0,0 @@
1
- import { defineComponent as g, ref as l, resolveComponent as b, openBlock as i, createElementBlock as o, createElementVNode as s, Fragment as n, renderList as c, normalizeStyle as r, toDisplayString as a, normalizeClass as d, createBlock as w, withCtx as U, createVNode as u, unref as v } from "vue";
2
- import { Progress as _ } from "@xto/data";
3
- import { _ as q } from "./index-IOKG7Gwo.js";
4
- const x = { class: "dashboard" }, C = { class: "stats-section" }, B = { class: "stat-content" }, M = { class: "stat-title" }, I = {
5
- key: 0,
6
- viewBox: "0 0 24 24",
7
- fill: "none",
8
- stroke: "currentColor",
9
- "stroke-width": "2"
10
- }, V = {
11
- key: 1,
12
- viewBox: "0 0 24 24",
13
- fill: "none",
14
- stroke: "currentColor",
15
- "stroke-width": "2"
16
- }, L = { class: "main-section" }, S = { class: "quick-section" }, $ = { class: "quick-grid" }, z = { class: "quick-icon" }, E = { class: "quick-info" }, N = { class: "quick-title" }, P = { class: "quick-desc" }, D = { class: "activity-section" }, F = { class: "activity-list" }, O = { class: "activity-content" }, T = { class: "activity-main" }, X = { class: "activity-user" }, j = { class: "activity-action" }, A = { class: "activity-time" }, G = { class: "system-section" }, H = { class: "system-grid" }, J = { class: "system-info-list" }, K = { class: "info-label" }, Q = { class: "info-value" }, R = { class: "system-status" }, W = { class: "status-item" }, Y = { class: "status-item" }, Z = { class: "status-item" }, ss = /* @__PURE__ */ g({
17
- __name: "index",
18
- setup(ts) {
19
- const p = l([
20
- { title: "用户总数", value: 1234, icon: "👥", color: "#1677ff", trend: "+12.5%", trendUp: !0 },
21
- { title: "今日访问", value: 567, icon: "👀", color: "#52c41a", trend: "+8.2%", trendUp: !0 },
22
- { title: "订单数量", value: 890, icon: "📦", color: "#faad14", trend: "-3.1%", trendUp: !1 },
23
- { title: "销售金额", value: 123456, icon: "💰", color: "#ff4d4f", trend: "+15.8%", trendUp: !0 }
24
- ]), m = l([
25
- { user: "张三", action: "登录系统", time: "2分钟前", type: "success", avatar: "张" },
26
- { user: "李四", action: "修改了用户信息", time: "5分钟前", type: "warning", avatar: "李" },
27
- { user: "王五", action: "创建了新订单", time: "10分钟前", type: "info", avatar: "王" },
28
- { user: "赵六", action: "删除了测试数据", time: "30分钟前", type: "danger", avatar: "赵" },
29
- { user: "钱七", action: "更新了系统配置", time: "1小时前", type: "primary", avatar: "钱" }
30
- ]), h = l([
31
- { title: "用户管理", path: "/system/user", icon: "👤", desc: "管理系统用户" },
32
- { title: "角色管理", path: "/system/role", icon: "👥", desc: "角色权限配置" },
33
- { title: "菜单管理", path: "/system/menu", icon: "📋", desc: "菜单路由管理" },
34
- { title: "系统设置", path: "/system", icon: "⚙️", desc: "系统参数配置" }
35
- ]), y = l([
36
- { label: "系统版本", value: "v1.0.0" },
37
- { label: "Vue 版本", value: "3.4.21" },
38
- { label: "构建工具", value: "Vite 5" },
39
- { label: "UI 组件库", value: "XTO UI" }
40
- ]);
41
- return (es, e) => {
42
- const f = b("router-link");
43
- return i(), o("div", x, [
44
- s("div", C, [
45
- (i(!0), o(n, null, c(p.value, (t) => (i(), o("div", {
46
- key: t.title,
47
- class: "stat-card"
48
- }, [
49
- s("div", {
50
- class: "stat-icon",
51
- style: r({ background: `linear-gradient(135deg, ${t.color}20 0%, ${t.color}10 100%)` })
52
- }, [
53
- s("span", null, a(t.icon), 1)
54
- ], 4),
55
- s("div", B, [
56
- s("div", M, a(t.title), 1),
57
- s("div", {
58
- class: "stat-value",
59
- style: r({ color: t.color })
60
- }, a(t.value.toLocaleString()), 5),
61
- s("div", {
62
- class: d(["stat-trend", { up: t.trendUp, down: !t.trendUp }])
63
- }, [
64
- t.trendUp ? (i(), o("svg", I, [...e[0] || (e[0] = [
65
- s("path", { d: "M7 17l5-5 5 5M7 7l5 5 5-5" }, null, -1)
66
- ])])) : (i(), o("svg", V, [...e[1] || (e[1] = [
67
- s("path", { d: "M7 7l5 5 5-5M7 17l5-5 5 5" }, null, -1)
68
- ])])),
69
- s("span", null, a(t.trend), 1)
70
- ], 2)
71
- ]),
72
- s("div", {
73
- class: "stat-decoration",
74
- style: r({ background: `linear-gradient(135deg, ${t.color}08 0%, transparent 100%)` })
75
- }, null, 4)
76
- ]))), 128))
77
- ]),
78
- s("div", L, [
79
- s("div", S, [
80
- e[3] || (e[3] = s("div", { class: "section-header" }, [
81
- s("h3", null, "快捷入口"),
82
- s("span", { class: "section-badge" }, "4 个入口")
83
- ], -1)),
84
- s("div", $, [
85
- (i(!0), o(n, null, c(h.value, (t) => (i(), w(f, {
86
- key: t.path,
87
- to: t.path,
88
- class: "quick-card"
89
- }, {
90
- default: U(() => [
91
- s("div", z, a(t.icon), 1),
92
- s("div", E, [
93
- s("div", N, a(t.title), 1),
94
- s("div", P, a(t.desc), 1)
95
- ]),
96
- e[2] || (e[2] = s("div", { class: "quick-arrow" }, [
97
- s("svg", {
98
- viewBox: "0 0 24 24",
99
- fill: "none",
100
- stroke: "currentColor",
101
- "stroke-width": "2"
102
- }, [
103
- s("path", { d: "M9 18l6-6-6-6" })
104
- ])
105
- ], -1))
106
- ]),
107
- _: 2
108
- }, 1032, ["to"]))), 128))
109
- ])
110
- ]),
111
- s("div", D, [
112
- e[4] || (e[4] = s("div", { class: "section-header" }, [
113
- s("h3", null, "最近活动"),
114
- s("a", {
115
- href: "#",
116
- class: "section-link"
117
- }, "查看全部")
118
- ], -1)),
119
- s("div", F, [
120
- (i(!0), o(n, null, c(m.value, (t, k) => (i(), o("div", {
121
- key: k,
122
- class: "activity-item"
123
- }, [
124
- s("div", {
125
- class: d(["activity-avatar", t.type])
126
- }, a(t.avatar), 3),
127
- s("div", O, [
128
- s("div", T, [
129
- s("span", X, a(t.user), 1),
130
- s("span", j, a(t.action), 1)
131
- ]),
132
- s("div", A, a(t.time), 1)
133
- ]),
134
- s("div", {
135
- class: d(["activity-dot", t.type])
136
- }, null, 2)
137
- ]))), 128))
138
- ])
139
- ])
140
- ]),
141
- s("div", G, [
142
- e[8] || (e[8] = s("div", { class: "section-header" }, [
143
- s("h3", null, "系统信息")
144
- ], -1)),
145
- s("div", H, [
146
- s("div", J, [
147
- (i(!0), o(n, null, c(y.value, (t) => (i(), o("div", {
148
- key: t.label,
149
- class: "info-item"
150
- }, [
151
- s("span", K, a(t.label), 1),
152
- s("span", Q, a(t.value), 1)
153
- ]))), 128))
154
- ]),
155
- s("div", R, [
156
- s("div", W, [
157
- e[5] || (e[5] = s("div", { class: "status-header" }, [
158
- s("span", { class: "status-label" }, "服务器状态"),
159
- s("span", { class: "status-value" }, "75%")
160
- ], -1)),
161
- u(v(_), {
162
- percentage: 75,
163
- status: "success"
164
- })
165
- ]),
166
- s("div", Y, [
167
- e[6] || (e[6] = s("div", { class: "status-header" }, [
168
- s("span", { class: "status-label" }, "内存使用"),
169
- s("span", { class: "status-value" }, "45%")
170
- ], -1)),
171
- u(v(_), { percentage: 45 })
172
- ]),
173
- s("div", Z, [
174
- e[7] || (e[7] = s("div", { class: "status-header" }, [
175
- s("span", { class: "status-label" }, "CPU 使用率"),
176
- s("span", { class: "status-value" }, "32%")
177
- ], -1)),
178
- u(v(_), { percentage: 32 })
179
- ])
180
- ])
181
- ])
182
- ])
183
- ]);
184
- };
185
- }
186
- }), ls = /* @__PURE__ */ q(ss, [["__scopeId", "data-v-406a93af"]]);
187
- export {
188
- ls as default
189
- };