xto-fronted 0.4.6 → 0.4.8
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/.env.development +7 -7
- package/.env.production +7 -7
- package/dist/assets/403-AFBQifUI.js +1 -0
- package/dist/assets/403-BHEXXbt2.css +1 -0
- package/dist/assets/404-Ct_A1n7S.css +1 -0
- package/dist/assets/404-WFvpcD2_.js +1 -0
- package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
- package/dist/assets/index-1juADvYN.js +2 -0
- package/dist/assets/index-B-sX4Ru0.js +1 -0
- package/dist/assets/index-BMcziU5a.css +1 -0
- package/dist/assets/index-BRR97dc6.js +1 -0
- package/dist/assets/index-BZA0ksjx.css +1 -0
- package/dist/assets/index-BpV_8nl0.js +1 -0
- package/dist/assets/index-BvzhR4zp.js +1 -0
- package/dist/assets/index-CUh_s55Z.css +1 -0
- package/dist/assets/index-CVjdnIgR.css +1 -0
- package/dist/assets/index-CYq57-zj.js +1 -0
- package/dist/assets/index-CkL3sVAQ.js +2 -0
- package/dist/assets/index-CtrKVYJb.css +1 -0
- package/dist/assets/index-Cz2P_bsS.js +1 -0
- package/dist/assets/index-D9wlAuR_.js +1 -0
- package/dist/assets/index-DawJb02s.css +1 -0
- package/dist/assets/index-DfFR6NLf.js +1 -0
- package/dist/assets/index-DwVgMO8e.js +1 -0
- package/dist/assets/index-GDP-IkXE.css +1 -0
- package/dist/assets/index-Iaz1ZzPC.js +2 -0
- package/dist/assets/index-PfV8pzQz.css +1 -0
- package/dist/assets/index-Swfu6yvD.css +1 -0
- package/dist/assets/index-Te8_PRgJ.js +1 -0
- package/dist/assets/index-WyZ91RLx.css +1 -0
- package/dist/assets/index-tFYRoFdE.js +1 -0
- package/dist/assets/vendor-42ANG6Sg.js +6 -0
- package/dist/assets/vite-Dw-pgLOX.js +1 -0
- package/dist/assets/vue-vendor-Br-l7wbK.js +29 -0
- package/dist/assets/xto-base-C-IBqjVs.js +1 -0
- package/dist/assets/xto-base-C6eqMPdO.css +1 -0
- package/dist/assets/xto-business--V1F5Gwb.css +1 -0
- package/dist/assets/xto-core-DZK7Cyg0.js +1 -0
- package/dist/assets/xto-data-BFpiDgJi.js +1 -0
- package/dist/assets/xto-data-CnAQAQH2.css +1 -0
- package/dist/assets/xto-feedback-B7ipsTfz.js +1 -0
- package/dist/assets/xto-feedback-DBwJzoTj.css +1 -0
- package/dist/assets/xto-form-CrsyAjyr.css +1 -0
- package/dist/assets/xto-form-NRjKKNcY.js +1 -0
- package/dist/assets/xto-layout-BqU8RuWL.css +1 -0
- package/dist/assets/xto-navigation-BiSaXPfr.js +1 -0
- package/dist/assets/xto-navigation-C1cnSL2E.css +1 -0
- package/dist/assets/xto-navigation-CBPg4dCc.css +1 -0
- package/dist/assets/xto-navigation-CKabFu9d.js +1 -0
- package/dist/index-54irhCHL.js +1830 -0
- package/dist/{index-15Bu0M8D.js → index-BzRf1eoJ.js} +1 -1
- package/dist/{index-BO2Zf9u6.js → index-DH4aoCZb.js} +1 -1
- package/dist/{index-BBqvHkzE.js → index-Kqa7iZ9E.js} +1 -1
- package/dist/{index-BQqo0ZIb.js → index-pxkZlvBw.js} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.html +28 -0
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +85 -86
- package/src/api/auth.ts +25 -25
- package/src/api/system.ts +66 -66
- package/src/assets/styles/_dark.scss +406 -406
- package/src/components/Layout/Header.vue +973 -973
- package/src/components/Layout/Sidebar.vue +273 -212
- package/src/components/Layout/index.vue +443 -63
- package/src/composables/useApp.ts +61 -61
- package/src/composables/useAuth.ts +16 -16
- package/src/directives/permission.ts +27 -27
- package/src/env.d.ts +18 -18
- package/src/index.ts +47 -47
- package/src/router/dynamicRoutes.ts +162 -162
- package/src/router/guards.ts +128 -128
- package/src/router/index.ts +79 -79
- package/src/stores/auth.ts +65 -65
- package/src/stores/menu.ts +48 -48
- package/src/stores/user.ts +50 -50
- package/src/types/api.d.ts +80 -80
- package/src/utils/auth.ts +99 -99
- package/src/utils/config.ts +80 -80
- package/src/utils/permission.ts +32 -32
- package/src/utils/request.ts +124 -124
- package/src/views/login/index.vue +194 -188
- package/vite.config.ts +135 -135
- package/dist/index-B3PLzNB0.js +0 -345
- package/dist/index-B6DTsC6l.js +0 -1715
- package/dist/index-B7etKk33.js +0 -372
- package/dist/index-B7mpL6Zf.js +0 -475
- package/dist/index-BC2PGkkJ.js +0 -1644
- package/dist/index-BGgbfcmf.js +0 -475
- package/dist/index-BGmUwemj.js +0 -372
- package/dist/index-BQFfQj5Q.js +0 -142
- package/dist/index-BkRneTya.js +0 -142
- package/dist/index-BlRrngsc.js +0 -475
- package/dist/index-BmVvM7sm.js +0 -345
- package/dist/index-Bn4ThpX9.js +0 -142
- package/dist/index-BwfjwDKr.js +0 -1477
- package/dist/index-BxIL2hrt.js +0 -475
- package/dist/index-C-3fhbN2.js +0 -1644
- package/dist/index-C0VN9nFF.js +0 -142
- package/dist/index-C0xyGOsz.js +0 -475
- package/dist/index-C3c8NAZq.js +0 -1477
- package/dist/index-C42VtP71.js +0 -142
- package/dist/index-C6Nm0r9k.js +0 -475
- package/dist/index-C6w0-8xN.js +0 -1648
- package/dist/index-CD364XjV.js +0 -142
- package/dist/index-CHww99-i.js +0 -345
- package/dist/index-CIgWYERJ.js +0 -1644
- package/dist/index-CTs6DTuQ.js +0 -345
- package/dist/index-CWRs4WMN.js +0 -372
- package/dist/index-Cb-SxHJp.js +0 -345
- package/dist/index-CeCysOnl.js +0 -345
- package/dist/index-Cg1UpC8D.js +0 -1644
- package/dist/index-Cgkqpyx2.js +0 -345
- package/dist/index-CiuDEfo-.js +0 -142
- package/dist/index-CmQfZC8r.js +0 -372
- package/dist/index-CmkjhpX_.js +0 -475
- package/dist/index-CpxpXTQX.js +0 -1462
- package/dist/index-CqXFk_ET.js +0 -345
- package/dist/index-Cqix1YLE.js +0 -1697
- package/dist/index-CtvB5J9E.js +0 -372
- package/dist/index-Cu3Z2-PY.js +0 -345
- package/dist/index-CvDxK7Ab.js +0 -372
- package/dist/index-D-FER0vJ.js +0 -372
- package/dist/index-D2fQ8TK8.js +0 -475
- package/dist/index-D3xVcFvg.js +0 -372
- package/dist/index-D4crnrO6.js +0 -142
- package/dist/index-D7EzwTM5.js +0 -372
- package/dist/index-D7TZamyY.js +0 -1664
- package/dist/index-D88fiqXR.js +0 -475
- package/dist/index-DEbpF-M4.js +0 -1457
- package/dist/index-DFXuyPge.js +0 -1627
- package/dist/index-DLgimJYb.js +0 -1667
- package/dist/index-DPEVEyik.js +0 -475
- package/dist/index-DWy_UGhI.js +0 -345
- package/dist/index-DYVtddfw.js +0 -142
- package/dist/index-DYnXaqYf.js +0 -142
- package/dist/index-DcvRPHuy.js +0 -372
- package/dist/index-DdC1uV2v.js +0 -1700
- package/dist/index-Dga14ZN7.js +0 -1774
- package/dist/index-Dk2V44uP.js +0 -372
- package/dist/index-DnJ481u1.js +0 -475
- package/dist/index-Do1CBqg8.js +0 -345
- package/dist/index-DqQRSPeF.js +0 -345
- package/dist/index-Jb4VMHIS.js +0 -142
- package/dist/index-MC3wWjNt.js +0 -475
- package/dist/index-MG0JePmx.js +0 -142
- package/dist/index-PRFGBLWt.js +0 -475
- package/dist/index-QgkT42dc.js +0 -372
- package/dist/index-TrLCW5xL.js +0 -372
- package/dist/index-YDlNLFVk.js +0 -142
- package/dist/index-ZAJgA3XD.js +0 -475
- package/dist/index-a_ilWAvi.js +0 -345
- package/dist/index-bi1TMGid.js +0 -372
- package/dist/index-fyarVCog.js +0 -475
- package/dist/index-mnTZtPFa.js +0 -345
- package/dist/index-orZCyV6I.js +0 -345
- package/dist/index-p3TbK44c.js +0 -142
- package/dist/index-sRwZYbZ4.js +0 -372
- package/dist/index-wATqKEcF.js +0 -142
- package/dist/setup.d.ts +0 -17
package/dist/index-Cgkqpyx2.js
DELETED
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import { defineComponent as j, ref as p, reactive as z, computed as q, onMounted as K, openBlock as V, createElementBlock as k, createVNode as t, unref as l, withCtx as o, withKeys as G, createTextVNode as i, createElementVNode as s, Fragment as H, renderList as J, toDisplayString as y } from "vue";
|
|
2
|
-
import { Form as N, FormItem as f, Input as E, Select as Q, Switch as W } from "@xto/form";
|
|
3
|
-
import { Card as x, Tag as A, Pagination as X } from "@xto/data";
|
|
4
|
-
import { Popconfirm as Y, Modal as Z, Message as U } from "@xto/feedback";
|
|
5
|
-
import { Space as S, Button as v } from "@xto/base";
|
|
6
|
-
import { S as r, a as h, _ as ee } from "./index-CIgWYERJ.js";
|
|
7
|
-
const le = { class: "role-page" }, te = { class: "toolbar" }, ae = { class: "data-table" }, oe = { key: 0 }, se = { key: 1 }, ne = { class: "pagination-wrapper" }, de = /* @__PURE__ */ j({
|
|
8
|
-
__name: "index",
|
|
9
|
-
setup(ue) {
|
|
10
|
-
const T = [
|
|
11
|
-
{ id: 1, name: "超级管理员", code: "admin", description: "拥有所有权限", status: r.ENABLED, permissions: ["*"], createTime: "2024-01-01 10:00:00" },
|
|
12
|
-
{ id: 2, name: "编辑", code: "editor", description: "内容编辑权限", status: r.ENABLED, permissions: ["user:read", "user:write"], createTime: "2024-01-02 10:00:00" },
|
|
13
|
-
{ id: 3, name: "访客", code: "viewer", description: "只读权限", status: r.ENABLED, permissions: ["user:read"], createTime: "2024-01-03 10:00:00" }
|
|
14
|
-
], C = p(!1), D = p([]), B = p(0), c = p(1), b = p(10), u = z({
|
|
15
|
-
keyword: "",
|
|
16
|
-
status: void 0
|
|
17
|
-
}), g = p(!1), w = q(() => n.id ? "编辑角色" : "新增角色"), n = z({
|
|
18
|
-
id: 0,
|
|
19
|
-
name: "",
|
|
20
|
-
code: "",
|
|
21
|
-
description: "",
|
|
22
|
-
status: r.ENABLED,
|
|
23
|
-
permissions: []
|
|
24
|
-
}), I = {
|
|
25
|
-
name: [
|
|
26
|
-
{ required: !0, message: "请输入角色名称", trigger: "blur" }
|
|
27
|
-
],
|
|
28
|
-
code: [
|
|
29
|
-
{ required: !0, message: "请输入角色编码", trigger: "blur" }
|
|
30
|
-
]
|
|
31
|
-
}, L = p(), m = () => {
|
|
32
|
-
C.value = !0, setTimeout(() => {
|
|
33
|
-
let d = [...T];
|
|
34
|
-
u.keyword && (d = d.filter(
|
|
35
|
-
(e) => e.name.includes(u.keyword) || e.code.includes(u.keyword)
|
|
36
|
-
)), u.status !== void 0 && (d = d.filter((e) => e.status === u.status)), B.value = d.length, D.value = d.slice((c.value - 1) * b.value, c.value * b.value), C.value = !1;
|
|
37
|
-
}, 300);
|
|
38
|
-
}, _ = () => {
|
|
39
|
-
c.value = 1, m();
|
|
40
|
-
}, R = () => {
|
|
41
|
-
u.keyword = "", u.status = void 0, c.value = 1, m();
|
|
42
|
-
}, F = () => {
|
|
43
|
-
Object.assign(n, {
|
|
44
|
-
id: 0,
|
|
45
|
-
name: "",
|
|
46
|
-
code: "",
|
|
47
|
-
description: "",
|
|
48
|
-
status: r.ENABLED,
|
|
49
|
-
permissions: []
|
|
50
|
-
}), g.value = !0;
|
|
51
|
-
}, P = (d) => {
|
|
52
|
-
Object.assign(n, d), g.value = !0;
|
|
53
|
-
}, M = (d) => {
|
|
54
|
-
U.success("删除成功"), m();
|
|
55
|
-
}, O = async () => {
|
|
56
|
-
var d;
|
|
57
|
-
try {
|
|
58
|
-
await ((d = L.value) == null ? void 0 : d.validate()), U.success(n.id ? "编辑成功" : "新增成功"), g.value = !1, m();
|
|
59
|
-
} catch (e) {
|
|
60
|
-
console.error(e);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
return K(() => {
|
|
64
|
-
m();
|
|
65
|
-
}), (d, e) => (V(), k("div", le, [
|
|
66
|
-
t(l(x), { class: "search-card" }, {
|
|
67
|
-
default: o(() => [
|
|
68
|
-
t(l(N), {
|
|
69
|
-
model: u,
|
|
70
|
-
inline: ""
|
|
71
|
-
}, {
|
|
72
|
-
default: o(() => [
|
|
73
|
-
t(l(f), { label: "关键词" }, {
|
|
74
|
-
default: o(() => [
|
|
75
|
-
t(l(E), {
|
|
76
|
-
modelValue: u.keyword,
|
|
77
|
-
"onUpdate:modelValue": e[0] || (e[0] = (a) => u.keyword = a),
|
|
78
|
-
placeholder: "角色名称/编码",
|
|
79
|
-
clearable: "",
|
|
80
|
-
onKeyup: G(_, ["enter"])
|
|
81
|
-
}, null, 8, ["modelValue"])
|
|
82
|
-
]),
|
|
83
|
-
_: 1
|
|
84
|
-
}),
|
|
85
|
-
t(l(f), { label: "状态" }, {
|
|
86
|
-
default: o(() => [
|
|
87
|
-
t(l(Q), {
|
|
88
|
-
modelValue: u.status,
|
|
89
|
-
"onUpdate:modelValue": e[1] || (e[1] = (a) => u.status = a),
|
|
90
|
-
options: l(h),
|
|
91
|
-
placeholder: "请选择",
|
|
92
|
-
clearable: ""
|
|
93
|
-
}, null, 8, ["modelValue", "options"])
|
|
94
|
-
]),
|
|
95
|
-
_: 1
|
|
96
|
-
}),
|
|
97
|
-
t(l(f), null, {
|
|
98
|
-
default: o(() => [
|
|
99
|
-
t(l(S), null, {
|
|
100
|
-
default: o(() => [
|
|
101
|
-
t(l(v), {
|
|
102
|
-
type: "primary",
|
|
103
|
-
onClick: _
|
|
104
|
-
}, {
|
|
105
|
-
default: o(() => [...e[10] || (e[10] = [
|
|
106
|
-
i("搜索", -1)
|
|
107
|
-
])]),
|
|
108
|
-
_: 1
|
|
109
|
-
}),
|
|
110
|
-
t(l(v), { onClick: R }, {
|
|
111
|
-
default: o(() => [...e[11] || (e[11] = [
|
|
112
|
-
i("重置", -1)
|
|
113
|
-
])]),
|
|
114
|
-
_: 1
|
|
115
|
-
})
|
|
116
|
-
]),
|
|
117
|
-
_: 1
|
|
118
|
-
})
|
|
119
|
-
]),
|
|
120
|
-
_: 1
|
|
121
|
-
})
|
|
122
|
-
]),
|
|
123
|
-
_: 1
|
|
124
|
-
}, 8, ["model"])
|
|
125
|
-
]),
|
|
126
|
-
_: 1
|
|
127
|
-
}),
|
|
128
|
-
t(l(x), { class: "table-card" }, {
|
|
129
|
-
default: o(() => [
|
|
130
|
-
s("div", te, [
|
|
131
|
-
t(l(v), {
|
|
132
|
-
type: "primary",
|
|
133
|
-
onClick: F
|
|
134
|
-
}, {
|
|
135
|
-
default: o(() => [...e[12] || (e[12] = [
|
|
136
|
-
i("新增角色", -1)
|
|
137
|
-
])]),
|
|
138
|
-
_: 1
|
|
139
|
-
})
|
|
140
|
-
]),
|
|
141
|
-
s("table", ae, [
|
|
142
|
-
e[17] || (e[17] = s("thead", null, [
|
|
143
|
-
s("tr", null, [
|
|
144
|
-
s("th", null, "ID"),
|
|
145
|
-
s("th", null, "角色名称"),
|
|
146
|
-
s("th", null, "角色编码"),
|
|
147
|
-
s("th", null, "描述"),
|
|
148
|
-
s("th", null, "状态"),
|
|
149
|
-
s("th", null, "创建时间"),
|
|
150
|
-
s("th", null, "操作")
|
|
151
|
-
])
|
|
152
|
-
], -1)),
|
|
153
|
-
s("tbody", null, [
|
|
154
|
-
C.value ? (V(), k("tr", oe, [...e[13] || (e[13] = [
|
|
155
|
-
s("td", {
|
|
156
|
-
colspan: "7",
|
|
157
|
-
class: "loading-cell"
|
|
158
|
-
}, "加载中...", -1)
|
|
159
|
-
])])) : D.value.length === 0 ? (V(), k("tr", se, [...e[14] || (e[14] = [
|
|
160
|
-
s("td", {
|
|
161
|
-
colspan: "7",
|
|
162
|
-
class: "empty-cell"
|
|
163
|
-
}, "暂无数据", -1)
|
|
164
|
-
])])) : (V(!0), k(H, { key: 2 }, J(D.value, (a) => (V(), k("tr", {
|
|
165
|
-
key: a.id
|
|
166
|
-
}, [
|
|
167
|
-
s("td", null, y(a.id), 1),
|
|
168
|
-
s("td", null, y(a.name), 1),
|
|
169
|
-
s("td", null, [
|
|
170
|
-
t(l(A), {
|
|
171
|
-
type: "primary",
|
|
172
|
-
size: "small"
|
|
173
|
-
}, {
|
|
174
|
-
default: o(() => [
|
|
175
|
-
i(y(a.code), 1)
|
|
176
|
-
]),
|
|
177
|
-
_: 2
|
|
178
|
-
}, 1024)
|
|
179
|
-
]),
|
|
180
|
-
s("td", null, y(a.description), 1),
|
|
181
|
-
s("td", null, [
|
|
182
|
-
t(l(A), {
|
|
183
|
-
type: a.status === l(r).ENABLED ? "success" : "danger",
|
|
184
|
-
size: "small"
|
|
185
|
-
}, {
|
|
186
|
-
default: o(() => [
|
|
187
|
-
i(y(a.status === l(r).ENABLED ? "启用" : "禁用"), 1)
|
|
188
|
-
]),
|
|
189
|
-
_: 2
|
|
190
|
-
}, 1032, ["type"])
|
|
191
|
-
]),
|
|
192
|
-
s("td", null, y(a.createTime), 1),
|
|
193
|
-
s("td", null, [
|
|
194
|
-
t(l(S), null, {
|
|
195
|
-
default: o(() => [
|
|
196
|
-
t(l(v), {
|
|
197
|
-
type: "primary",
|
|
198
|
-
link: "",
|
|
199
|
-
size: "small",
|
|
200
|
-
onClick: ($) => P(a)
|
|
201
|
-
}, {
|
|
202
|
-
default: o(() => [...e[15] || (e[15] = [
|
|
203
|
-
i("编辑", -1)
|
|
204
|
-
])]),
|
|
205
|
-
_: 1
|
|
206
|
-
}, 8, ["onClick"]),
|
|
207
|
-
t(l(Y), {
|
|
208
|
-
title: "确定删除该角色吗?",
|
|
209
|
-
onConfirm: ($) => M(a.id)
|
|
210
|
-
}, {
|
|
211
|
-
default: o(() => [
|
|
212
|
-
t(l(v), {
|
|
213
|
-
type: "danger",
|
|
214
|
-
link: "",
|
|
215
|
-
size: "small"
|
|
216
|
-
}, {
|
|
217
|
-
default: o(() => [...e[16] || (e[16] = [
|
|
218
|
-
i("删除", -1)
|
|
219
|
-
])]),
|
|
220
|
-
_: 1
|
|
221
|
-
})
|
|
222
|
-
]),
|
|
223
|
-
_: 1
|
|
224
|
-
}, 8, ["onConfirm"])
|
|
225
|
-
]),
|
|
226
|
-
_: 2
|
|
227
|
-
}, 1024)
|
|
228
|
-
])
|
|
229
|
-
]))), 128))
|
|
230
|
-
])
|
|
231
|
-
]),
|
|
232
|
-
s("div", ne, [
|
|
233
|
-
t(l(X), {
|
|
234
|
-
"current-page": c.value,
|
|
235
|
-
"onUpdate:currentPage": e[2] || (e[2] = (a) => c.value = a),
|
|
236
|
-
"page-size": b.value,
|
|
237
|
-
"onUpdate:pageSize": e[3] || (e[3] = (a) => b.value = a),
|
|
238
|
-
total: B.value,
|
|
239
|
-
"page-sizes": [10, 20, 50, 100],
|
|
240
|
-
layout: "total, sizes, prev, pager, next",
|
|
241
|
-
onCurrentChange: m,
|
|
242
|
-
onSizeChange: m
|
|
243
|
-
}, null, 8, ["current-page", "page-size", "total"])
|
|
244
|
-
])
|
|
245
|
-
]),
|
|
246
|
-
_: 1
|
|
247
|
-
}),
|
|
248
|
-
t(l(Z), {
|
|
249
|
-
modelValue: g.value,
|
|
250
|
-
"onUpdate:modelValue": e[9] || (e[9] = (a) => g.value = a),
|
|
251
|
-
title: w.value,
|
|
252
|
-
width: "500px"
|
|
253
|
-
}, {
|
|
254
|
-
footer: o(() => [
|
|
255
|
-
t(l(S), null, {
|
|
256
|
-
default: o(() => [
|
|
257
|
-
t(l(v), {
|
|
258
|
-
onClick: e[8] || (e[8] = (a) => g.value = !1)
|
|
259
|
-
}, {
|
|
260
|
-
default: o(() => [...e[18] || (e[18] = [
|
|
261
|
-
i("取消", -1)
|
|
262
|
-
])]),
|
|
263
|
-
_: 1
|
|
264
|
-
}),
|
|
265
|
-
t(l(v), {
|
|
266
|
-
type: "primary",
|
|
267
|
-
onClick: O
|
|
268
|
-
}, {
|
|
269
|
-
default: o(() => [...e[19] || (e[19] = [
|
|
270
|
-
i("确定", -1)
|
|
271
|
-
])]),
|
|
272
|
-
_: 1
|
|
273
|
-
})
|
|
274
|
-
]),
|
|
275
|
-
_: 1
|
|
276
|
-
})
|
|
277
|
-
]),
|
|
278
|
-
default: o(() => [
|
|
279
|
-
t(l(N), {
|
|
280
|
-
ref_key: "formRef",
|
|
281
|
-
ref: L,
|
|
282
|
-
model: n,
|
|
283
|
-
rules: I,
|
|
284
|
-
"label-width": "80px"
|
|
285
|
-
}, {
|
|
286
|
-
default: o(() => [
|
|
287
|
-
t(l(f), {
|
|
288
|
-
label: "角色名称",
|
|
289
|
-
prop: "name"
|
|
290
|
-
}, {
|
|
291
|
-
default: o(() => [
|
|
292
|
-
t(l(E), {
|
|
293
|
-
modelValue: n.name,
|
|
294
|
-
"onUpdate:modelValue": e[4] || (e[4] = (a) => n.name = a),
|
|
295
|
-
placeholder: "请输入角色名称"
|
|
296
|
-
}, null, 8, ["modelValue"])
|
|
297
|
-
]),
|
|
298
|
-
_: 1
|
|
299
|
-
}),
|
|
300
|
-
t(l(f), {
|
|
301
|
-
label: "角色编码",
|
|
302
|
-
prop: "code"
|
|
303
|
-
}, {
|
|
304
|
-
default: o(() => [
|
|
305
|
-
t(l(E), {
|
|
306
|
-
modelValue: n.code,
|
|
307
|
-
"onUpdate:modelValue": e[5] || (e[5] = (a) => n.code = a),
|
|
308
|
-
placeholder: "请输入角色编码"
|
|
309
|
-
}, null, 8, ["modelValue"])
|
|
310
|
-
]),
|
|
311
|
-
_: 1
|
|
312
|
-
}),
|
|
313
|
-
t(l(f), { label: "描述" }, {
|
|
314
|
-
default: o(() => [
|
|
315
|
-
t(l(E), {
|
|
316
|
-
modelValue: n.description,
|
|
317
|
-
"onUpdate:modelValue": e[6] || (e[6] = (a) => n.description = a),
|
|
318
|
-
placeholder: "请输入描述"
|
|
319
|
-
}, null, 8, ["modelValue"])
|
|
320
|
-
]),
|
|
321
|
-
_: 1
|
|
322
|
-
}),
|
|
323
|
-
t(l(f), { label: "状态" }, {
|
|
324
|
-
default: o(() => [
|
|
325
|
-
t(l(W), {
|
|
326
|
-
modelValue: n.status,
|
|
327
|
-
"onUpdate:modelValue": e[7] || (e[7] = (a) => n.status = a),
|
|
328
|
-
"active-value": l(r).ENABLED,
|
|
329
|
-
"inactive-value": l(r).DISABLED
|
|
330
|
-
}, null, 8, ["modelValue", "active-value", "inactive-value"])
|
|
331
|
-
]),
|
|
332
|
-
_: 1
|
|
333
|
-
})
|
|
334
|
-
]),
|
|
335
|
-
_: 1
|
|
336
|
-
}, 8, ["model"])
|
|
337
|
-
]),
|
|
338
|
-
_: 1
|
|
339
|
-
}, 8, ["modelValue", "title"])
|
|
340
|
-
]));
|
|
341
|
-
}
|
|
342
|
-
}), ce = /* @__PURE__ */ ee(de, [["__scopeId", "data-v-8ad30bc6"]]);
|
|
343
|
-
export {
|
|
344
|
-
ce as default
|
|
345
|
-
};
|
package/dist/index-CiuDEfo-.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, ref as r, resolveComponent as x, openBlock as o, createElementBlock as c, createElementVNode as s, Fragment as d, renderList as m, createBlock as u, unref as l, withCtx as i, normalizeStyle as p, toDisplayString as a, createVNode as n, createTextVNode as q } from "vue";
|
|
2
|
-
import { Card as _, Tag as C, Progress as y } from "@xto/data";
|
|
3
|
-
import { _ as V } from "./index-DLgimJYb.js";
|
|
4
|
-
const B = { class: "dashboard" }, L = { class: "dashboard__stats" }, N = { class: "stat-card__content" }, S = { class: "stat-card__info" }, w = { class: "stat-card__title" }, z = { class: "dashboard__main" }, E = { class: "quick-links" }, I = { class: "quick-link__icon" }, T = { class: "quick-link__title" }, D = { class: "activity-list" }, F = { class: "activity-item__action" }, P = { class: "activity-item__time" }, U = { class: "system-info" }, j = { class: "system-info__item" }, A = { class: "system-info__item" }, G = /* @__PURE__ */ g({
|
|
5
|
-
__name: "index",
|
|
6
|
-
setup(H) {
|
|
7
|
-
const f = r([
|
|
8
|
-
{ title: "用户总数", value: 1234, icon: "👥", color: "#409eff" },
|
|
9
|
-
{ title: "今日访问", value: 567, icon: "👀", color: "#67c23a" },
|
|
10
|
-
{ title: "订单数量", value: 890, icon: "📦", color: "#e6a23c" },
|
|
11
|
-
{ title: "销售金额", value: 123456, icon: "💰", color: "#f56c6c" }
|
|
12
|
-
]), v = r([
|
|
13
|
-
{ user: "张三", action: "登录系统", time: "2分钟前", type: "success" },
|
|
14
|
-
{ user: "李四", action: "修改了用户信息", time: "5分钟前", type: "warning" },
|
|
15
|
-
{ user: "王五", action: "创建了新订单", time: "10分钟前", type: "info" },
|
|
16
|
-
{ user: "赵六", action: "删除了测试数据", time: "30分钟前", type: "danger" },
|
|
17
|
-
{ user: "钱七", action: "更新了系统配置", time: "1小时前", type: "primary" }
|
|
18
|
-
]), k = r([
|
|
19
|
-
{ title: "用户管理", path: "/system/user", icon: "👤" },
|
|
20
|
-
{ title: "角色管理", path: "/system/role", icon: "👥" },
|
|
21
|
-
{ title: "菜单管理", path: "/system/menu", icon: "📋" },
|
|
22
|
-
{ title: "系统设置", path: "/system", icon: "⚙️" }
|
|
23
|
-
]);
|
|
24
|
-
return (J, t) => {
|
|
25
|
-
const b = x("router-link");
|
|
26
|
-
return o(), c("div", B, [
|
|
27
|
-
s("div", L, [
|
|
28
|
-
(o(!0), c(d, null, m(f.value, (e) => (o(), u(l(_), {
|
|
29
|
-
key: e.title,
|
|
30
|
-
class: "stat-card"
|
|
31
|
-
}, {
|
|
32
|
-
default: i(() => [
|
|
33
|
-
s("div", N, [
|
|
34
|
-
s("div", {
|
|
35
|
-
class: "stat-card__icon",
|
|
36
|
-
style: p({ backgroundColor: e.color + "20" })
|
|
37
|
-
}, a(e.icon), 5),
|
|
38
|
-
s("div", S, [
|
|
39
|
-
s("div", w, a(e.title), 1),
|
|
40
|
-
s("div", {
|
|
41
|
-
class: "stat-card__value",
|
|
42
|
-
style: p({ color: e.color })
|
|
43
|
-
}, a(e.value.toLocaleString()), 5)
|
|
44
|
-
])
|
|
45
|
-
])
|
|
46
|
-
]),
|
|
47
|
-
_: 2
|
|
48
|
-
}, 1024))), 128))
|
|
49
|
-
]),
|
|
50
|
-
s("div", z, [
|
|
51
|
-
n(l(_), { class: "dashboard__quick" }, {
|
|
52
|
-
header: i(() => [...t[0] || (t[0] = [
|
|
53
|
-
s("span", { class: "card-title" }, "快捷入口", -1)
|
|
54
|
-
])]),
|
|
55
|
-
default: i(() => [
|
|
56
|
-
s("div", E, [
|
|
57
|
-
(o(!0), c(d, null, m(k.value, (e) => (o(), u(b, {
|
|
58
|
-
key: e.path,
|
|
59
|
-
to: e.path,
|
|
60
|
-
class: "quick-link"
|
|
61
|
-
}, {
|
|
62
|
-
default: i(() => [
|
|
63
|
-
s("span", I, a(e.icon), 1),
|
|
64
|
-
s("span", T, a(e.title), 1)
|
|
65
|
-
]),
|
|
66
|
-
_: 2
|
|
67
|
-
}, 1032, ["to"]))), 128))
|
|
68
|
-
])
|
|
69
|
-
]),
|
|
70
|
-
_: 1
|
|
71
|
-
}),
|
|
72
|
-
n(l(_), { class: "dashboard__activity" }, {
|
|
73
|
-
header: i(() => [...t[1] || (t[1] = [
|
|
74
|
-
s("span", { class: "card-title" }, "最近活动", -1)
|
|
75
|
-
])]),
|
|
76
|
-
default: i(() => [
|
|
77
|
-
s("div", D, [
|
|
78
|
-
(o(!0), c(d, null, m(v.value, (e, h) => (o(), c("div", {
|
|
79
|
-
key: h,
|
|
80
|
-
class: "activity-item"
|
|
81
|
-
}, [
|
|
82
|
-
n(l(C), {
|
|
83
|
-
type: e.type,
|
|
84
|
-
size: "small"
|
|
85
|
-
}, {
|
|
86
|
-
default: i(() => [
|
|
87
|
-
q(a(e.user), 1)
|
|
88
|
-
]),
|
|
89
|
-
_: 2
|
|
90
|
-
}, 1032, ["type"]),
|
|
91
|
-
s("span", F, a(e.action), 1),
|
|
92
|
-
s("span", P, a(e.time), 1)
|
|
93
|
-
]))), 128))
|
|
94
|
-
])
|
|
95
|
-
]),
|
|
96
|
-
_: 1
|
|
97
|
-
})
|
|
98
|
-
]),
|
|
99
|
-
n(l(_), { class: "dashboard__system" }, {
|
|
100
|
-
header: i(() => [...t[2] || (t[2] = [
|
|
101
|
-
s("span", { class: "card-title" }, "系统信息", -1)
|
|
102
|
-
])]),
|
|
103
|
-
default: i(() => [
|
|
104
|
-
s("div", U, [
|
|
105
|
-
t[5] || (t[5] = s("div", { class: "system-info__item" }, [
|
|
106
|
-
s("span", { class: "system-info__label" }, "系统版本"),
|
|
107
|
-
s("span", { class: "system-info__value" }, "v1.0.0")
|
|
108
|
-
], -1)),
|
|
109
|
-
t[6] || (t[6] = s("div", { class: "system-info__item" }, [
|
|
110
|
-
s("span", { class: "system-info__label" }, "Vue 版本"),
|
|
111
|
-
s("span", { class: "system-info__value" }, "3.4.21")
|
|
112
|
-
], -1)),
|
|
113
|
-
t[7] || (t[7] = s("div", { class: "system-info__item" }, [
|
|
114
|
-
s("span", { class: "system-info__label" }, "构建工具"),
|
|
115
|
-
s("span", { class: "system-info__value" }, "Vite 5")
|
|
116
|
-
], -1)),
|
|
117
|
-
t[8] || (t[8] = s("div", { class: "system-info__item" }, [
|
|
118
|
-
s("span", { class: "system-info__label" }, "UI 组件库"),
|
|
119
|
-
s("span", { class: "system-info__value" }, "xto")
|
|
120
|
-
], -1)),
|
|
121
|
-
s("div", j, [
|
|
122
|
-
t[3] || (t[3] = s("span", { class: "system-info__label" }, "服务器状态", -1)),
|
|
123
|
-
n(l(y), {
|
|
124
|
-
percentage: 75,
|
|
125
|
-
status: "success"
|
|
126
|
-
})
|
|
127
|
-
]),
|
|
128
|
-
s("div", A, [
|
|
129
|
-
t[4] || (t[4] = s("span", { class: "system-info__label" }, "内存使用", -1)),
|
|
130
|
-
n(l(y), { percentage: 45 })
|
|
131
|
-
])
|
|
132
|
-
])
|
|
133
|
-
]),
|
|
134
|
-
_: 1
|
|
135
|
-
})
|
|
136
|
-
]);
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
}), Q = /* @__PURE__ */ V(G, [["__scopeId", "data-v-44648cb1"]]);
|
|
140
|
-
export {
|
|
141
|
-
Q as default
|
|
142
|
-
};
|