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.
- package/dist/{index-DydABgae.js → index-D73_-C9m.js} +13 -13
- package/dist/index-DBjV4kzh.js +249 -0
- package/dist/{index-IOKG7Gwo.js → index-DJ1oHe08.js} +973 -918
- package/dist/{index-BKO6Hzba.js → index-D_TGEwDg.js} +192 -140
- package/dist/{index-BZSZ3bx2.js → index-DauAWAHG.js} +28 -28
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +9 -9
- package/src/App.vue +4 -4
- package/src/assets/styles/_dark.scss +176 -176
- package/src/assets/styles/_reset.scss +8 -8
- package/src/assets/styles/_root.scss +131 -125
- package/src/assets/styles/_variables.scss +17 -17
- package/src/assets/styles/index.scss +39 -39
- package/src/components/Layout/Footer.vue +1 -1
- package/src/components/Layout/Header.vue +59 -60
- package/src/components/Layout/MixTopMenu.vue +42 -43
- package/src/components/Layout/Sidebar.vue +8 -8
- package/src/components/Layout/SidebarMenuItem.vue +2 -2
- package/src/components/Layout/Tabs.vue +6 -6
- package/src/components/Layout/TopMenu.vue +42 -43
- package/src/components/Layout/index.vue +4 -4
- package/src/stores/app.ts +26 -2
- package/src/style.scss +2 -2
- package/src/views/dashboard/index.vue +125 -104
- package/src/views/error/403.vue +13 -13
- package/src/views/error/404.vue +14 -14
- package/src/views/login/index.vue +21 -54
- package/src/views/system/menu/index.vue +30 -30
- package/src/views/system/role/index.vue +20 -20
- package/src/views/system/user/index.vue +23 -23
- package/vite.config.ts +4 -1
- package/dist/index-BXHwCe22.js +0 -189
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as P, ref as m, reactive as A, computed as O, onMounted as j, openBlock as _, createElementBlock as k, createElementVNode as e, createVNode as o, unref as l, withCtx as a, withKeys as q, createTextVNode as u, toDisplayString as c, Fragment as K, renderList as G, normalizeClass as J } from "vue";
|
|
2
2
|
import { Form as N, FormItem as v, Input as x, Select as Q, Switch as S } from "@xto/form";
|
|
3
3
|
import { Tag as W, Pagination as X } from "@xto/data";
|
|
4
|
-
import { Popconfirm as Y, Modal as Z, Message as
|
|
4
|
+
import { Popconfirm as Y, Modal as Z, Message as C } from "@xto/feedback";
|
|
5
5
|
import { Space as L, Button as f } from "@xto/base";
|
|
6
|
-
import { S as d, a as ee, _ as te } from "./index-
|
|
7
|
-
const le = { class: "role-page" }, se = { class: "search-section" }, oe = { class: "table-section" }, ae = { class: "table-toolbar" }, ne = { class: "toolbar-left" }, ie = { class: "toolbar-right" }, de = { class: "table-count" }, re = { class: "table-wrapper" }, ue = { class: "data-table" }, ce = { key: 0 }, pe = { key: 1 }, me = { class: "col-id" }, ve = { class: "id-badge" }, fe = { class: "col-name" }, ge = { class: "role-name" }, ye = { class: "col-code" }, _e = { class: "col-desc" }, ke = { class: "desc-text" }, he = { class: "col-status" }, xe = { class: "status-switch" }, Ve = { class: "col-time" },
|
|
6
|
+
import { S as d, a as ee, _ as te } from "./index-DJ1oHe08.js";
|
|
7
|
+
const le = { class: "role-page" }, se = { class: "search-section" }, oe = { class: "table-section" }, ae = { class: "table-toolbar" }, ne = { class: "toolbar-left" }, ie = { class: "toolbar-right" }, de = { class: "table-count" }, re = { class: "table-wrapper" }, ue = { class: "data-table" }, ce = { key: 0 }, pe = { key: 1 }, me = { class: "col-id" }, ve = { class: "id-badge" }, fe = { class: "col-name" }, ge = { class: "role-name" }, ye = { class: "col-code" }, _e = { class: "col-desc" }, ke = { class: "desc-text" }, he = { class: "col-status" }, xe = { class: "status-switch" }, Ve = { class: "col-time" }, Ee = { class: "time-text" }, be = { class: "col-actions" }, Be = { class: "pagination-wrapper" }, Ce = { class: "status-field" }, Le = { class: "status-label" }, De = /* @__PURE__ */ P({
|
|
8
8
|
__name: "index",
|
|
9
9
|
setup(we) {
|
|
10
10
|
const z = [
|
|
11
11
|
{ id: 1, name: "超级管理员", code: "admin", description: "拥有所有权限", status: d.ENABLED, permissions: ["*"], createTime: "2024-01-01 10:00:00" },
|
|
12
12
|
{ id: 2, name: "编辑", code: "editor", description: "内容编辑权限", status: d.ENABLED, permissions: ["user:read", "user:write"], createTime: "2024-01-02 10:00:00" },
|
|
13
13
|
{ id: 3, name: "访客", code: "viewer", description: "只读权限", status: d.ENABLED, permissions: ["user:read"], createTime: "2024-01-03 10:00:00" }
|
|
14
|
-
], V = m(!1),
|
|
14
|
+
], V = m(!1), E = m([]), b = m(0), g = m(1), h = m(10), r = A({
|
|
15
15
|
keyword: "",
|
|
16
16
|
status: void 0
|
|
17
17
|
}), y = m(!1), M = O(() => i.id ? "编辑角色" : "新增角色"), i = A({
|
|
@@ -33,13 +33,13 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
33
33
|
let n = [...z];
|
|
34
34
|
r.keyword && (n = n.filter(
|
|
35
35
|
(t) => t.name.includes(r.keyword) || t.code.includes(r.keyword)
|
|
36
|
-
)), r.status !== void 0 && (n = n.filter((t) => t.status === r.status)),
|
|
36
|
+
)), r.status !== void 0 && (n = n.filter((t) => t.status === r.status)), b.value = n.length, E.value = n.slice((g.value - 1) * h.value, g.value * h.value), V.value = !1;
|
|
37
37
|
}, 300);
|
|
38
38
|
}, w = () => {
|
|
39
39
|
g.value = 1, p();
|
|
40
|
-
}, F = () => {
|
|
41
|
-
r.keyword = "", r.status = void 0, g.value = 1, p();
|
|
42
40
|
}, T = () => {
|
|
41
|
+
r.keyword = "", r.status = void 0, g.value = 1, p();
|
|
42
|
+
}, F = () => {
|
|
43
43
|
Object.assign(i, {
|
|
44
44
|
id: 0,
|
|
45
45
|
name: "",
|
|
@@ -51,16 +51,16 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
51
51
|
}, I = (n) => {
|
|
52
52
|
Object.assign(i, n), y.value = !0;
|
|
53
53
|
}, H = (n) => {
|
|
54
|
-
|
|
54
|
+
C.success("删除成功"), p();
|
|
55
55
|
}, R = async () => {
|
|
56
56
|
var n;
|
|
57
57
|
try {
|
|
58
|
-
await ((n = D.value) == null ? void 0 : n.validate()),
|
|
58
|
+
await ((n = D.value) == null ? void 0 : n.validate()), C.success(i.id ? "编辑成功" : "新增成功"), y.value = !1, p();
|
|
59
59
|
} catch (t) {
|
|
60
60
|
console.error(t);
|
|
61
61
|
}
|
|
62
62
|
}, $ = (n) => {
|
|
63
|
-
|
|
63
|
+
C.success(`已${n.status === d.ENABLED ? "启用" : "禁用"}角色 ${n.name}`);
|
|
64
64
|
};
|
|
65
65
|
return j(() => {
|
|
66
66
|
p();
|
|
@@ -124,7 +124,7 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
124
124
|
]),
|
|
125
125
|
_: 1
|
|
126
126
|
}),
|
|
127
|
-
o(l(f), { onClick:
|
|
127
|
+
o(l(f), { onClick: T }, {
|
|
128
128
|
icon: a(() => [...t[12] || (t[12] = [
|
|
129
129
|
e("svg", {
|
|
130
130
|
viewBox: "0 0 24 24",
|
|
@@ -156,7 +156,7 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
156
156
|
e("div", ne, [
|
|
157
157
|
o(l(f), {
|
|
158
158
|
type: "primary",
|
|
159
|
-
onClick:
|
|
159
|
+
onClick: F
|
|
160
160
|
}, {
|
|
161
161
|
icon: a(() => [...t[14] || (t[14] = [
|
|
162
162
|
e("svg", {
|
|
@@ -186,7 +186,7 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
186
186
|
})
|
|
187
187
|
]),
|
|
188
188
|
e("div", ie, [
|
|
189
|
-
e("span", de, "共 " + c(
|
|
189
|
+
e("span", de, "共 " + c(b.value) + " 条数据", 1)
|
|
190
190
|
])
|
|
191
191
|
]),
|
|
192
192
|
e("div", re, [
|
|
@@ -213,7 +213,7 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
213
213
|
e("span", null, "加载中...")
|
|
214
214
|
])
|
|
215
215
|
], -1)
|
|
216
|
-
])])) :
|
|
216
|
+
])])) : E.value.length === 0 ? (_(), k("tr", pe, [...t[17] || (t[17] = [
|
|
217
217
|
e("td", {
|
|
218
218
|
colspan: "7",
|
|
219
219
|
class: "empty-cell"
|
|
@@ -232,13 +232,13 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
232
232
|
ry: "7"
|
|
233
233
|
}),
|
|
234
234
|
e("g", {
|
|
235
|
-
stroke: "var(--xto-color-text-placeholder, #
|
|
235
|
+
stroke: "var(--xto-color-text-placeholder, #A9AEB8)",
|
|
236
236
|
"stroke-width": "2"
|
|
237
237
|
}, [
|
|
238
238
|
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" }),
|
|
239
239
|
e("path", {
|
|
240
240
|
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",
|
|
241
|
-
fill: "var(--xto-fill-color, #
|
|
241
|
+
fill: "var(--xto-fill-color, #F2F3F5)"
|
|
242
242
|
})
|
|
243
243
|
])
|
|
244
244
|
])
|
|
@@ -246,7 +246,7 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
246
246
|
e("span", null, "暂无数据")
|
|
247
247
|
])
|
|
248
248
|
], -1)
|
|
249
|
-
])])) : (_(!0), k(K, { key: 2 }, G(
|
|
249
|
+
])])) : (_(!0), k(K, { key: 2 }, G(E.value, (s) => (_(), k("tr", {
|
|
250
250
|
key: s.id,
|
|
251
251
|
class: "data-row"
|
|
252
252
|
}, [
|
|
@@ -274,8 +274,8 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
274
274
|
e("div", xe, [
|
|
275
275
|
o(l(S), {
|
|
276
276
|
"model-value": s.status === l(d).ENABLED,
|
|
277
|
-
"onUpdate:modelValue": (
|
|
278
|
-
s.status =
|
|
277
|
+
"onUpdate:modelValue": (B) => {
|
|
278
|
+
s.status = B ? l(d).ENABLED : l(d).DISABLED, $(s);
|
|
279
279
|
}
|
|
280
280
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
281
281
|
e("span", {
|
|
@@ -284,16 +284,16 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
284
284
|
])
|
|
285
285
|
]),
|
|
286
286
|
e("td", Ve, [
|
|
287
|
-
e("span",
|
|
287
|
+
e("span", Ee, c(s.createTime), 1)
|
|
288
288
|
]),
|
|
289
|
-
e("td",
|
|
289
|
+
e("td", be, [
|
|
290
290
|
o(l(L), { class: "action-buttons" }, {
|
|
291
291
|
default: a(() => [
|
|
292
292
|
o(l(f), {
|
|
293
293
|
type: "primary",
|
|
294
294
|
link: "",
|
|
295
295
|
size: "small",
|
|
296
|
-
onClick: (
|
|
296
|
+
onClick: (B) => I(s)
|
|
297
297
|
}, {
|
|
298
298
|
icon: a(() => [...t[18] || (t[18] = [
|
|
299
299
|
e("svg", {
|
|
@@ -313,7 +313,7 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
313
313
|
}, 8, ["onClick"]),
|
|
314
314
|
o(l(Y), {
|
|
315
315
|
title: "确定删除该角色吗?",
|
|
316
|
-
onConfirm: (
|
|
316
|
+
onConfirm: (B) => H(s.id)
|
|
317
317
|
}, {
|
|
318
318
|
default: a(() => [
|
|
319
319
|
o(l(f), {
|
|
@@ -360,13 +360,13 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
360
360
|
])
|
|
361
361
|
])
|
|
362
362
|
]),
|
|
363
|
-
e("div",
|
|
363
|
+
e("div", Be, [
|
|
364
364
|
o(l(X), {
|
|
365
365
|
"current-page": g.value,
|
|
366
366
|
"onUpdate:currentPage": t[2] || (t[2] = (s) => g.value = s),
|
|
367
367
|
"page-size": h.value,
|
|
368
368
|
"onUpdate:pageSize": t[3] || (t[3] = (s) => h.value = s),
|
|
369
|
-
total:
|
|
369
|
+
total: b.value,
|
|
370
370
|
"page-sizes": [10, 20, 50, 100],
|
|
371
371
|
layout: "total, sizes, prev, pager, next",
|
|
372
372
|
onCurrentChange: p,
|
|
@@ -453,7 +453,7 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
453
453
|
}),
|
|
454
454
|
o(l(v), { label: "状态" }, {
|
|
455
455
|
default: a(() => [
|
|
456
|
-
e("div",
|
|
456
|
+
e("div", Ce, [
|
|
457
457
|
o(l(S), {
|
|
458
458
|
modelValue: i.status,
|
|
459
459
|
"onUpdate:modelValue": t[7] || (t[7] = (s) => i.status = s),
|
|
@@ -473,7 +473,7 @@ const le = { class: "role-page" }, se = { class: "search-section" }, oe = { clas
|
|
|
473
473
|
}, 8, ["modelValue", "title"])
|
|
474
474
|
]));
|
|
475
475
|
}
|
|
476
|
-
}),
|
|
476
|
+
}), Te = /* @__PURE__ */ te(De, [["__scopeId", "data-v-e4ca047d"]]);
|
|
477
477
|
export {
|
|
478
|
-
|
|
478
|
+
Te as default
|
|
479
479
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as a, c as t, G as o, d as r, e as n, H as u, L as i, i as p, M as l, b as T, f as d, g, h as R, S as c, a as h, j as k, T as f, k as S, l as U, m, n as A, o as M, p as y, q as x, r as L, s as C, t as D, u as b, v as I, w as B, x as F, y as G, z as E, A as P, B as O, C as v, D as w, E as H, I as N, J as j, K as q, N as z } from "./index-
|
|
1
|
+
import { F as a, c as t, G as o, d as r, e as n, H as u, L as i, i as p, M as l, b as T, f as d, g, h as R, S as c, a as h, j as k, T as f, k as S, l as U, m, n as A, o as M, p as y, q as x, r as L, s as C, t as D, u as b, v as I, w as B, x as F, y as G, z as E, A as P, B as O, C as v, D as w, E as H, I as N, J as j, K as q, N as z } from "./index-DJ1oHe08.js";
|
|
2
2
|
import { K, b as X, B as Q, c as V, a as W, d as Y, e as Z, f as _, g as $, G as ee, y as se, E as ae, D as te, L as oe, h as re, i as ne, M as ue, N as ie, j as pe, k as le, z as Te, O as de, P as ge, l as Re, m as ce, n as he, A as ke, Q as fe, I as Se, R as Ue, F as me, x as Ae, S as Me, o as ye, p as xe, r as Le, q as Ce, T as De, U as be, H as Ie, J as Be, V as Fe, W as Ge, X as Ee, Y as Pe, Z as Oe, C as ve, _ as we, u as He, s as Ne, t as je, v as qe, w as ze } from "./user-77I_qZ8j.js";
|
|
3
3
|
export {
|
|
4
4
|
a as Footer,
|