xto-fronted 0.4.8 → 0.4.10

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 (75) hide show
  1. package/dist/assets/index-4-QoJAgA.css +1 -0
  2. package/dist/assets/index-BHwEwbkp.js +1 -0
  3. package/dist/assets/{index-Te8_PRgJ.js → index-BTsRosKu.js} +1 -1
  4. package/dist/assets/index-CZAlkDIC.css +1 -0
  5. package/dist/assets/{index-1juADvYN.js → index-Do3gMkWw.js} +2 -2
  6. package/dist/index.html +2 -2
  7. package/package.json +4 -4
  8. package/src/assets/styles/_dark.scss +118 -0
  9. package/src/assets/styles/index.scss +8 -0
  10. package/src/components/Layout/Header.vue +0 -5
  11. package/src/components/Layout/Sidebar.vue +11 -1
  12. package/src/components/Layout/TopMenu.vue +186 -0
  13. package/src/components/Layout/index.vue +120 -443
  14. package/vite.config.ts +1 -1
  15. package/dist/App.vue.d.ts +0 -2
  16. package/dist/api/auth.d.ts +0 -8
  17. package/dist/api/system.d.ts +0 -16
  18. package/dist/api/user.d.ts +0 -13
  19. package/dist/assets/index-B-sX4Ru0.js +0 -1
  20. package/dist/assets/index-BMcziU5a.css +0 -1
  21. package/dist/assets/index-BZA0ksjx.css +0 -1
  22. package/dist/assets/index-BvzhR4zp.js +0 -1
  23. package/dist/assets/index-CVjdnIgR.css +0 -1
  24. package/dist/assets/index-CYq57-zj.js +0 -1
  25. package/dist/assets/index-CkL3sVAQ.js +0 -2
  26. package/dist/assets/index-CtrKVYJb.css +0 -1
  27. package/dist/assets/index-DfFR6NLf.js +0 -1
  28. package/dist/assets/index-Iaz1ZzPC.js +0 -2
  29. package/dist/assets/index-WyZ91RLx.css +0 -1
  30. package/dist/assets/index-tFYRoFdE.js +0 -1
  31. package/dist/assets/xto-navigation-CBPg4dCc.css +0 -1
  32. package/dist/assets/xto-navigation-CKabFu9d.js +0 -1
  33. package/dist/components/Layout/Footer.vue.d.ts +0 -2
  34. package/dist/components/Layout/Header.vue.d.ts +0 -5
  35. package/dist/components/Layout/Sidebar.vue.d.ts +0 -2
  36. package/dist/components/Layout/Tabs.vue.d.ts +0 -2
  37. package/dist/components/Layout/index.vue.d.ts +0 -2
  38. package/dist/composables/useApp.d.ts +0 -29
  39. package/dist/composables/useAuth.d.ts +0 -6
  40. package/dist/composables/useForm.d.ts +0 -20
  41. package/dist/composables/useTable.d.ts +0 -29
  42. package/dist/directives/permission.d.ts +0 -4
  43. package/dist/enums/index.d.ts +0 -32
  44. package/dist/index-54irhCHL.js +0 -1830
  45. package/dist/index-BzRf1eoJ.js +0 -372
  46. package/dist/index-DH4aoCZb.js +0 -142
  47. package/dist/index-Kqa7iZ9E.js +0 -475
  48. package/dist/index-pxkZlvBw.js +0 -345
  49. package/dist/index.d.ts +0 -31
  50. package/dist/index.es.js +0 -91
  51. package/dist/index.umd.js +0 -1
  52. package/dist/main.d.ts +0 -0
  53. package/dist/router/dynamicRoutes.d.ts +0 -30
  54. package/dist/router/guards.d.ts +0 -17
  55. package/dist/router/index.d.ts +0 -6
  56. package/dist/router/layoutRoute.d.ts +0 -18
  57. package/dist/router/staticRoutes.d.ts +0 -3
  58. package/dist/stores/app.d.ts +0 -87
  59. package/dist/stores/auth.d.ts +0 -41
  60. package/dist/stores/index.d.ts +0 -9
  61. package/dist/stores/menu.d.ts +0 -77
  62. package/dist/stores/user.d.ts +0 -92
  63. package/dist/style.css +0 -1
  64. package/dist/utils/auth.d.ts +0 -27
  65. package/dist/utils/config.d.ts +0 -30
  66. package/dist/utils/permission.d.ts +0 -18
  67. package/dist/utils/request.d.ts +0 -23
  68. package/dist/utils/storage.d.ts +0 -24
  69. package/dist/views/dashboard/index.vue.d.ts +0 -2
  70. package/dist/views/error/403.vue.d.ts +0 -2
  71. package/dist/views/error/404.vue.d.ts +0 -2
  72. package/dist/views/login/index.vue.d.ts +0 -4
  73. package/dist/views/system/menu/index.vue.d.ts +0 -4
  74. package/dist/views/system/role/index.vue.d.ts +0 -4
  75. package/dist/views/system/user/index.vue.d.ts +0 -4
@@ -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-54irhCHL.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.d.ts DELETED
@@ -1,31 +0,0 @@
1
- export { default as Layout } from './components/Layout/index.vue';
2
- export { default as Header } from './components/Layout/Header.vue';
3
- export { default as Sidebar } from './components/Layout/Sidebar.vue';
4
- export { default as Tabs } from './components/Layout/Tabs.vue';
5
- export { default as Footer } from './components/Layout/Footer.vue';
6
- export { default as Login } from './views/login/index.vue';
7
- export { default as NotFound } from './views/error/404.vue';
8
- export { default as Forbidden } from './views/error/403.vue';
9
- export * from './composables/useApp';
10
- export * from './composables/useAuth';
11
- export * from './composables/useForm';
12
- export * from './composables/useTable';
13
- export * from './utils/auth';
14
- export * from './utils/permission';
15
- export * from './utils/request';
16
- export * from './utils/storage';
17
- export * from './utils/config';
18
- export * from './stores/app';
19
- export * from './stores/auth';
20
- export * from './stores/menu';
21
- export * from './stores/user';
22
- export { default as router, resetRouter } from './router';
23
- export * from './router/staticRoutes';
24
- export * from './router/dynamicRoutes';
25
- export { createLayoutRoute, createRouter } from './router/layoutRoute';
26
- export { setupRouterGuards } from './router/guards';
27
- export * from './api/auth';
28
- export * from './api/system';
29
- export * from './api/user';
30
- export * from './enums';
31
- export { default as permissionDirective } from './directives/permission';
package/dist/index.es.js DELETED
@@ -1,91 +0,0 @@
1
- import { F as s, c as t, G as o, d as r, e as u, H as n, L as i, i as p, M as l, b as d, f as T, g, h as R, S as k, a as c, j as h, T as f, k as S, l as U, m, n as y, o as M, p as x, q as A, r as b, s as D, t as L, u as C, v as F, w as G, x as I, y as E, z as O, A as v, B as w, C as P, D as j, E as q, I as B, J as H, K as N, N as z, O as J, P as K, Q, R as V, U as W, V as X, W as Y, X as Z, Y as $, Z as _, $ as ee, a0 as ae, a1 as se, a2 as te, a3 as oe, a4 as re, a5 as ue, a6 as ne, a7 as ie, a8 as pe, a9 as le, aa as de, ab as Te, ac as ge, ad as Re, ae as ke, af as ce, ag as he, ah as fe, ai as Se, aj as Ue, ak as me, al as ye, am as Me, an as xe, ao as Ae, ap as be, aq as De, ar as Le, as as Ce, at as Fe, au as Ge, av as Ie, aw as Ee, ax as Oe, ay as ve } from "./index-54irhCHL.js";
2
- export {
3
- s as Footer,
4
- t as Forbidden,
5
- o as Gender,
6
- r as GenderOptions,
7
- u as GenderText,
8
- n as Header,
9
- i as Layout,
10
- p as Login,
11
- l as MenuType,
12
- d as MenuTypeOptions,
13
- T as MenuTypeText,
14
- g as NotFound,
15
- R as Sidebar,
16
- k as Status,
17
- c as StatusOptions,
18
- h as StatusText,
19
- f as Tabs,
20
- S as appConfig,
21
- U as batchDeleteUsers,
22
- m as clearToken,
23
- y as createLayoutRoute,
24
- M as createMenu,
25
- x as createRole,
26
- A as createRouter,
27
- b as createUser,
28
- D as defaultDynamicRoutes,
29
- L as deleteMenu,
30
- C as deleteRole,
31
- F as deleteUser,
32
- G as errorRoute,
33
- I as getApiBaseUrl,
34
- E as getAppId,
35
- O as getClientId,
36
- v as getCode,
37
- w as getMenuList,
38
- P as getMenuTree,
39
- j as getRefreshTime,
40
- q as getRefreshToken,
41
- B as getRoleDetail,
42
- H as getRoleList,
43
- N as getToken,
44
- z as getTokenExpire,
45
- J as getTokenType,
46
- K as getUserDetail,
47
- Q as getUserInfo,
48
- V as getUserList,
49
- W as hasPermission,
50
- X as hasRole,
51
- Y as hasToken,
52
- Z as http,
53
- $ as initAppConfig,
54
- _ as isAdmin,
55
- ee as isTokenExpired,
56
- ae as layoutRoute,
57
- se as local,
58
- te as localStorageUtil,
59
- oe as login,
60
- re as logout,
61
- ue as mockMenuData,
62
- ne as permissionDirective,
63
- ie as refreshToken,
64
- pe as resetPassword,
65
- le as resetRouter,
66
- de as router,
67
- Te as session,
68
- ge as sessionStorageUtil,
69
- Re as setCode,
70
- ke as setRefreshTime,
71
- ce as setRefreshToken,
72
- he as setToken,
73
- fe as setTokenExpire,
74
- Se as setTokenInfo,
75
- Ue as setTokenType,
76
- me as setupRouterGuards,
77
- ye as staticRoutes,
78
- Me as updateMenu,
79
- xe as updateRole,
80
- Ae as updateRoleStatus,
81
- be as updateUser,
82
- De as updateUserStatus,
83
- Le as useApp,
84
- Ce as useAppStore,
85
- Fe as useAuth,
86
- Ge as useAuthStore,
87
- Ie as useForm,
88
- Ee as useMenuStore,
89
- Oe as useTable,
90
- ve as useUserStore
91
- };