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
@@ -3,8 +3,8 @@ import { Form as S, FormItem as c, Input as x, Select as W, Switch as U } from "
3
3
  import { Tag as X, Pagination as Y } from "@xto/data";
4
4
  import { Popconfirm as Z, Modal as ee, Message as C } from "@xto/feedback";
5
5
  import { Space as D, Button as g } from "@xto/base";
6
- import { S as d, a as te, _ as le } from "./index-IOKG7Gwo.js";
7
- const se = { class: "user-page" }, ae = { class: "search-section" }, oe = { class: "table-section" }, ne = { class: "table-toolbar" }, ie = { class: "toolbar-left" }, de = { class: "toolbar-right" }, re = { class: "table-count" }, ue = { class: "table-wrapper" }, me = { class: "data-table" }, ce = { key: 0 }, pe = { key: 1 }, ve = { class: "col-id" }, fe = { class: "id-badge" }, he = { class: "col-user" }, ge = { class: "user-info" }, ke = { class: "user-avatar" }, _e = { class: "user-detail" }, ye = { class: "user-nickname" }, xe = { class: "user-username" }, Ve = { class: "col-contact" }, be = { class: "contact-info" }, Ee = { class: "contact-email" }, Be = { class: "contact-phone" }, Ce = { class: "col-roles" }, De = { class: "role-tags" }, Le = { class: "col-status" }, Ae = { class: "status-switch" }, we = { class: "col-time" }, ze = { class: "time-text" }, Ne = { class: "col-actions" }, Se = { class: "pagination-wrapper" }, Ue = { class: "status-field" }, Me = { class: "status-label" }, Te = /* @__PURE__ */ R({
6
+ import { S as d, a as te, _ as le } from "./index-DJ1oHe08.js";
7
+ const se = { class: "user-page" }, ae = { class: "search-section" }, oe = { class: "table-section" }, ne = { class: "table-toolbar" }, ie = { class: "toolbar-left" }, de = { class: "toolbar-right" }, re = { class: "table-count" }, ue = { class: "table-wrapper" }, me = { class: "data-table" }, ce = { key: 0 }, pe = { key: 1 }, ve = { class: "col-id" }, fe = { class: "id-badge" }, he = { class: "col-user" }, ge = { class: "user-info" }, ke = { class: "user-avatar" }, _e = { class: "user-detail" }, ye = { class: "user-nickname" }, xe = { class: "user-username" }, be = { class: "col-contact" }, Ve = { class: "contact-info" }, Ee = { class: "contact-email" }, Be = { class: "contact-phone" }, Ce = { class: "col-roles" }, De = { class: "role-tags" }, Le = { class: "col-status" }, Ae = { class: "status-switch" }, we = { class: "col-time" }, ze = { class: "time-text" }, Ne = { class: "col-actions" }, Se = { class: "pagination-wrapper" }, Ue = { class: "status-field" }, Me = { class: "status-label" }, Te = /* @__PURE__ */ R({
8
8
  __name: "index",
9
9
  setup(Fe) {
10
10
  const M = [
@@ -13,7 +13,7 @@ const se = { class: "user-page" }, ae = { class: "search-section" }, oe = { clas
13
13
  { id: 3, username: "lisi", nickname: "李四", email: "lisi@example.com", phone: "13800138003", status: d.DISABLED, roles: ["viewer"], createTime: "2024-01-03 10:00:00" },
14
14
  { id: 4, username: "wangwu", nickname: "王五", email: "wangwu@example.com", phone: "13800138004", status: d.ENABLED, roles: ["editor"], createTime: "2024-01-04 10:00:00" },
15
15
  { id: 5, username: "zhaoliu", nickname: "赵六", email: "zhaoliu@example.com", phone: "13800138005", status: d.ENABLED, roles: ["viewer"], createTime: "2024-01-05 10:00:00" }
16
- ], b = f(!1), E = f([]), B = f(0), k = f(1), V = f(10), r = w({
16
+ ], V = f(!1), E = f([]), B = f(0), k = f(1), b = f(10), r = w({
17
17
  keyword: "",
18
18
  status: void 0
19
19
  }), _ = f(!1), T = j(() => n.id ? "编辑用户" : "新增用户"), n = w({
@@ -36,11 +36,11 @@ const se = { class: "user-page" }, ae = { class: "search-section" }, oe = { clas
36
36
  { type: "email", message: "请输入正确的邮箱格式", trigger: "blur" }
37
37
  ]
38
38
  }, L = f(), p = () => {
39
- b.value = !0, setTimeout(() => {
39
+ V.value = !0, setTimeout(() => {
40
40
  let i = [...M];
41
41
  r.keyword && (i = i.filter(
42
42
  (t) => t.username.includes(r.keyword) || t.nickname.includes(r.keyword)
43
- )), r.status !== void 0 && (i = i.filter((t) => t.status === r.status)), B.value = i.length, E.value = i.slice((k.value - 1) * V.value, k.value * V.value), b.value = !1;
43
+ )), r.status !== void 0 && (i = i.filter((t) => t.status === r.status)), B.value = i.length, E.value = i.slice((k.value - 1) * b.value, k.value * b.value), V.value = !1;
44
44
  }, 300);
45
45
  }, A = () => {
46
46
  k.value = 1, p();
@@ -211,7 +211,7 @@ const se = { class: "user-page" }, ae = { class: "search-section" }, oe = { clas
211
211
  ])
212
212
  ], -1)),
213
213
  e("tbody", null, [
214
- b.value ? (h(), y("tr", ce, [...t[17] || (t[17] = [
214
+ V.value ? (h(), y("tr", ce, [...t[17] || (t[17] = [
215
215
  e("td", {
216
216
  colspan: "7",
217
217
  class: "loading-cell"
@@ -240,13 +240,13 @@ const se = { class: "user-page" }, ae = { class: "search-section" }, oe = { clas
240
240
  ry: "7"
241
241
  }),
242
242
  e("g", {
243
- stroke: "var(--xto-color-text-placeholder, #9CA3AF)",
243
+ stroke: "var(--xto-color-text-placeholder, #A9AEB8)",
244
244
  "stroke-width": "2"
245
245
  }, [
246
246
  e("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" }),
247
247
  e("path", {
248
248
  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",
249
- fill: "var(--xto-fill-color, #F3F4F6)"
249
+ fill: "var(--xto-fill-color, #F2F3F5)"
250
250
  })
251
251
  ])
252
252
  ])
@@ -270,8 +270,8 @@ const se = { class: "user-page" }, ae = { class: "search-section" }, oe = { clas
270
270
  ])
271
271
  ])
272
272
  ]),
273
- e("td", Ve, [
274
- e("div", be, [
273
+ e("td", be, [
274
+ e("div", Ve, [
275
275
  e("span", Ee, u(s.email), 1),
276
276
  e("span", Be, u(s.phone), 1)
277
277
  ])
@@ -384,8 +384,8 @@ const se = { class: "user-page" }, ae = { class: "search-section" }, oe = { clas
384
384
  a(l(Y), {
385
385
  "current-page": k.value,
386
386
  "onUpdate:currentPage": t[2] || (t[2] = (s) => k.value = s),
387
- "page-size": V.value,
388
- "onUpdate:pageSize": t[3] || (t[3] = (s) => V.value = s),
387
+ "page-size": b.value,
388
+ "onUpdate:pageSize": t[3] || (t[3] = (s) => b.value = s),
389
389
  total: B.value,
390
390
  "page-sizes": [10, 20, 50, 100],
391
391
  layout: "total, sizes, prev, pager, next",
@@ -509,7 +509,7 @@ const se = { class: "user-page" }, ae = { class: "search-section" }, oe = { clas
509
509
  }, 8, ["modelValue", "title"])
510
510
  ]));
511
511
  }
512
- }), Re = /* @__PURE__ */ le(Te, [["__scopeId", "data-v-0e17b768"]]);
512
+ }), Re = /* @__PURE__ */ le(Te, [["__scopeId", "data-v-1b05be53"]]);
513
513
  export {
514
514
  Re as default
515
515
  };
@@ -0,0 +1,249 @@
1
+ import { defineComponent as f, ref as l, resolveComponent as g, openBlock as o, createElementBlock as a, createElementVNode as s, Fragment as n, renderList as c, normalizeStyle as M, toDisplayString as i, normalizeClass as v, createBlock as w, withCtx as x, createVNode as r, unref as d } from "vue";
2
+ import { Progress as u } from "@xto/data";
3
+ import { _ as b } from "./index-DJ1oHe08.js";
4
+ const Z = { class: "dashboard" }, C = { class: "stats-section" }, U = { class: "stat-icon" }, q = ["d"], B = { class: "stat-content" }, F = { class: "stat-title" }, V = { class: "stat-value" }, L = {
5
+ key: 0,
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ stroke: "currentColor",
9
+ "stroke-width": "2"
10
+ }, I = {
11
+ key: 1,
12
+ viewBox: "0 0 24 24",
13
+ fill: "none",
14
+ stroke: "currentColor",
15
+ "stroke-width": "2"
16
+ }, E = { class: "main-section" }, S = { class: "quick-section" }, j = { class: "quick-grid" }, z = { class: "quick-icon" }, D = {
17
+ viewBox: "0 0 24 24",
18
+ fill: "none",
19
+ stroke: "currentColor",
20
+ "stroke-width": "1.8",
21
+ "stroke-linecap": "round",
22
+ "stroke-linejoin": "round"
23
+ }, N = ["d"], P = { class: "quick-info" }, A = { class: "quick-title" }, H = { class: "quick-desc" }, O = { class: "activity-section" }, T = { class: "activity-list" }, X = { class: "activity-content" }, G = { class: "activity-main" }, J = { class: "activity-user" }, K = { class: "activity-action" }, Q = { class: "activity-time" }, R = { class: "system-section" }, W = { class: "system-grid" }, Y = { class: "system-info-list" }, $ = { class: "info-label" }, ss = { class: "info-value" }, ts = { class: "system-status" }, es = { class: "status-item" }, os = { class: "status-item" }, as = { class: "status-item" }, is = /* @__PURE__ */ f({
24
+ __name: "index",
25
+ setup(ls) {
26
+ const _ = l([
27
+ {
28
+ title: "用户总数",
29
+ value: 1234,
30
+ icon: "M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 8a7 7 0 0 1 14 0",
31
+ color: "var(--xto-color-primary, #4F46E5)",
32
+ trend: "+12.5%",
33
+ trendUp: !0
34
+ },
35
+ {
36
+ title: "今日访问",
37
+ value: 567,
38
+ icon: "M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6-10-6-10-6Zm10 2.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z",
39
+ color: "var(--xto-color-success, #00A870)",
40
+ trend: "+8.2%",
41
+ trendUp: !0
42
+ },
43
+ {
44
+ title: "订单数量",
45
+ value: 890,
46
+ icon: "M21 8l-9-5-9 5v8l9 5 9-5V8Zm-9-2.7L18.6 8 12 11.7 5.4 8 12 5.3Z",
47
+ color: "var(--xto-color-warning, #FF7D00)",
48
+ trend: "-3.1%",
49
+ trendUp: !1
50
+ },
51
+ {
52
+ title: "销售金额",
53
+ value: 123456,
54
+ icon: "M3 7h18v10H3V7Zm9 5a2.5 2.5 0 1 0 0 .01M6.5 12h.01M17.5 12h.01",
55
+ color: "var(--xto-color-danger, #F53F3F)",
56
+ trend: "+15.8%",
57
+ trendUp: !0
58
+ }
59
+ ]), p = l([
60
+ { user: "张三", action: "登录系统", time: "2分钟前", type: "success", avatar: "张" },
61
+ { user: "李四", action: "修改了用户信息", time: "5分钟前", type: "warning", avatar: "李" },
62
+ { user: "王五", action: "创建了新订单", time: "10分钟前", type: "info", avatar: "王" },
63
+ { user: "赵六", action: "删除了测试数据", time: "30分钟前", type: "danger", avatar: "赵" },
64
+ { user: "钱七", action: "更新了系统配置", time: "1小时前", type: "primary", avatar: "钱" }
65
+ ]), h = l([
66
+ {
67
+ title: "用户管理",
68
+ path: "/system/user",
69
+ icon: "M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-7 8a7 7 0 0 1 14 0",
70
+ desc: "管理系统用户"
71
+ },
72
+ {
73
+ title: "角色管理",
74
+ path: "/system/role",
75
+ icon: "M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm8 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM2 19a6 6 0 0 1 12 0m2-6a6 6 0 0 1 6 6",
76
+ desc: "角色权限配置"
77
+ },
78
+ {
79
+ title: "菜单管理",
80
+ path: "/system/menu",
81
+ icon: "M4 6h16M4 12h16M4 18h10",
82
+ desc: "菜单路由管理"
83
+ },
84
+ {
85
+ title: "系统设置",
86
+ path: "/system",
87
+ icon: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.6 7.6 0 0 0-2-1.2L14.5 3h-5l-.4 2.6a7.6 7.6 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.6 7.6 0 0 0 2 1.2l.4 2.6h5l.4-2.6a7.6 7.6 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6c.1-.4.1-.8.1-1.2Z",
88
+ desc: "系统参数配置"
89
+ }
90
+ ]), m = l([
91
+ { label: "系统版本", value: "v1.0.0" },
92
+ { label: "Vue 版本", value: "3.4.21" },
93
+ { label: "构建工具", value: "Vite 5" },
94
+ { label: "UI 组件库", value: "XTO UI" }
95
+ ]);
96
+ return (ns, e) => {
97
+ const k = g("router-link");
98
+ return o(), a("div", Z, [
99
+ s("div", C, [
100
+ (o(!0), a(n, null, c(_.value, (t) => (o(), a("div", {
101
+ key: t.title,
102
+ class: "stat-card"
103
+ }, [
104
+ s("div", U, [
105
+ (o(), a("svg", {
106
+ viewBox: "0 0 24 24",
107
+ fill: "none",
108
+ stroke: "currentColor",
109
+ "stroke-width": "1.8",
110
+ "stroke-linecap": "round",
111
+ "stroke-linejoin": "round",
112
+ style: M({ color: t.color })
113
+ }, [
114
+ s("path", {
115
+ d: t.icon
116
+ }, null, 8, q)
117
+ ], 4))
118
+ ]),
119
+ s("div", B, [
120
+ s("div", F, i(t.title), 1),
121
+ s("div", V, i(t.value.toLocaleString()), 1),
122
+ s("div", {
123
+ class: v(["stat-trend", { up: t.trendUp, down: !t.trendUp }])
124
+ }, [
125
+ t.trendUp ? (o(), a("svg", L, [...e[0] || (e[0] = [
126
+ s("path", { d: "M7 17l5-5 5 5M7 7l5 5 5-5" }, null, -1)
127
+ ])])) : (o(), a("svg", I, [...e[1] || (e[1] = [
128
+ s("path", { d: "M7 7l5 5 5-5M7 17l5-5 5 5" }, null, -1)
129
+ ])])),
130
+ s("span", null, i(t.trend), 1)
131
+ ], 2)
132
+ ])
133
+ ]))), 128))
134
+ ]),
135
+ s("div", E, [
136
+ s("div", S, [
137
+ e[3] || (e[3] = s("div", { class: "section-header" }, [
138
+ s("h3", null, "快捷入口"),
139
+ s("span", { class: "section-badge" }, "4 个入口")
140
+ ], -1)),
141
+ s("div", j, [
142
+ (o(!0), a(n, null, c(h.value, (t) => (o(), w(k, {
143
+ key: t.path,
144
+ to: t.path,
145
+ class: "quick-card"
146
+ }, {
147
+ default: x(() => [
148
+ s("div", z, [
149
+ (o(), a("svg", D, [
150
+ s("path", {
151
+ d: t.icon
152
+ }, null, 8, N)
153
+ ]))
154
+ ]),
155
+ s("div", P, [
156
+ s("div", A, i(t.title), 1),
157
+ s("div", H, i(t.desc), 1)
158
+ ]),
159
+ e[2] || (e[2] = s("div", { class: "quick-arrow" }, [
160
+ s("svg", {
161
+ viewBox: "0 0 24 24",
162
+ fill: "none",
163
+ stroke: "currentColor",
164
+ "stroke-width": "2"
165
+ }, [
166
+ s("path", { d: "M9 18l6-6-6-6" })
167
+ ])
168
+ ], -1))
169
+ ]),
170
+ _: 2
171
+ }, 1032, ["to"]))), 128))
172
+ ])
173
+ ]),
174
+ s("div", O, [
175
+ e[4] || (e[4] = s("div", { class: "section-header" }, [
176
+ s("h3", null, "最近活动"),
177
+ s("a", {
178
+ href: "#",
179
+ class: "section-link"
180
+ }, "查看全部")
181
+ ], -1)),
182
+ s("div", T, [
183
+ (o(!0), a(n, null, c(p.value, (t, y) => (o(), a("div", {
184
+ key: y,
185
+ class: "activity-item"
186
+ }, [
187
+ s("div", {
188
+ class: v(["activity-avatar", t.type])
189
+ }, i(t.avatar), 3),
190
+ s("div", X, [
191
+ s("div", G, [
192
+ s("span", J, i(t.user), 1),
193
+ s("span", K, i(t.action), 1)
194
+ ]),
195
+ s("div", Q, i(t.time), 1)
196
+ ])
197
+ ]))), 128))
198
+ ])
199
+ ])
200
+ ]),
201
+ s("div", R, [
202
+ e[8] || (e[8] = s("div", { class: "section-header" }, [
203
+ s("h3", null, "系统信息")
204
+ ], -1)),
205
+ s("div", W, [
206
+ s("div", Y, [
207
+ (o(!0), a(n, null, c(m.value, (t) => (o(), a("div", {
208
+ key: t.label,
209
+ class: "info-item"
210
+ }, [
211
+ s("span", $, i(t.label), 1),
212
+ s("span", ss, i(t.value), 1)
213
+ ]))), 128))
214
+ ]),
215
+ s("div", ts, [
216
+ s("div", es, [
217
+ e[5] || (e[5] = s("div", { class: "status-header" }, [
218
+ s("span", { class: "status-label" }, "服务器状态"),
219
+ s("span", { class: "status-value" }, "75%")
220
+ ], -1)),
221
+ r(d(u), {
222
+ percentage: 75,
223
+ status: "success"
224
+ })
225
+ ]),
226
+ s("div", os, [
227
+ e[6] || (e[6] = s("div", { class: "status-header" }, [
228
+ s("span", { class: "status-label" }, "内存使用"),
229
+ s("span", { class: "status-value" }, "45%")
230
+ ], -1)),
231
+ r(d(u), { percentage: 45 })
232
+ ]),
233
+ s("div", as, [
234
+ e[7] || (e[7] = s("div", { class: "status-header" }, [
235
+ s("span", { class: "status-label" }, "CPU 使用率"),
236
+ s("span", { class: "status-value" }, "32%")
237
+ ], -1)),
238
+ r(d(u), { percentage: 32 })
239
+ ])
240
+ ])
241
+ ])
242
+ ])
243
+ ]);
244
+ };
245
+ }
246
+ }), us = /* @__PURE__ */ b(is, [["__scopeId", "data-v-b8a481e6"]]);
247
+ export {
248
+ us as default
249
+ };