xto-fronted 0.9.2 → 0.9.3
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-DWJW3Fh8.js → index-B6OJp8lX.js} +1 -1
- package/dist/{index-CW3IiVm8.js → index-BGjN8fL4.js} +9 -9
- package/dist/{index-D5ZqtqTW.js → index-DkpGZDBh.js} +1 -1
- package/dist/{index-TQslB33m.js → index-U6a8866w.js} +1 -1
- package/dist/{index-C3AlXquT.js → index-rfFkJbFI.js} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/stores/app.ts +9 -8
|
@@ -3,7 +3,7 @@ import { Form as N, FormItem as v, Input as x, Select as Q, Switch as S } from "
|
|
|
3
3
|
import { Tag as W, Pagination as X } from "@xto/data";
|
|
4
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-
|
|
6
|
+
import { S as d, a as ee, _ as te } from "./index-BGjN8fL4.js";
|
|
7
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) {
|
|
@@ -18,7 +18,7 @@ function $e(t) {
|
|
|
18
18
|
return a === null || a === "" ? void 0 : a;
|
|
19
19
|
}
|
|
20
20
|
const Vt = ["layout", "primaryColor", "theme", "isDark", "showTabs", "showBreadcrumb", "showFooter"], _e = Pe("app", () => {
|
|
21
|
-
const t = st(), a = t.features || {}, p = y(T.get("appName") || "XTO App"), l = y(T.get("indexPath") || "/dashboard"), s = y(T.get("loginPath") || "/login"), d = y($e("theme") ??
|
|
21
|
+
const t = st(), a = t.features || {}, p = y(T.get("appName") || "XTO App"), l = y(T.get("indexPath") || "/dashboard"), s = y(T.get("loginPath") || "/login"), d = y(t.theme ?? $e("theme") ?? "light"), i = y(d.value === "dark"), h = y(t.layout ?? $e("layout") ?? "sidebar"), m = y(T.get("isCollapsed") || !1), f = y(a.showTabs ?? $e("showTabs") ?? !0), _ = y(a.showFooter ?? $e("showFooter") ?? !0), g = y(a.showBreadcrumb ?? $e("showBreadcrumb") ?? !0), u = y(t.primaryColor ?? $e("primaryColor") ?? "#4F46E5"), W = y(t.allowUserOverride !== !1), P = y([]), B = y([]), V = k(() => i.value ? "dark" : "light"), R = (M) => {
|
|
22
22
|
p.value = M, T.set("appName", M);
|
|
23
23
|
}, H = (M) => {
|
|
24
24
|
l.value = M, T.set("indexPath", M);
|
|
@@ -2856,7 +2856,7 @@ const _t = [
|
|
|
2856
2856
|
{
|
|
2857
2857
|
path: "/dashboard",
|
|
2858
2858
|
name: "Dashboard",
|
|
2859
|
-
component: () => import("./index-
|
|
2859
|
+
component: () => import("./index-U6a8866w.js"),
|
|
2860
2860
|
meta: {
|
|
2861
2861
|
title: "仪表盘",
|
|
2862
2862
|
icon: "dashboard",
|
|
@@ -2867,7 +2867,7 @@ const _t = [
|
|
|
2867
2867
|
{
|
|
2868
2868
|
path: "/system/user",
|
|
2869
2869
|
name: "SystemUser",
|
|
2870
|
-
component: () => import("./index-
|
|
2870
|
+
component: () => import("./index-DkpGZDBh.js"),
|
|
2871
2871
|
meta: {
|
|
2872
2872
|
title: "用户管理",
|
|
2873
2873
|
icon: "user",
|
|
@@ -2877,7 +2877,7 @@ const _t = [
|
|
|
2877
2877
|
{
|
|
2878
2878
|
path: "/system/role",
|
|
2879
2879
|
name: "SystemRole",
|
|
2880
|
-
component: () => import("./index-
|
|
2880
|
+
component: () => import("./index-B6OJp8lX.js"),
|
|
2881
2881
|
meta: {
|
|
2882
2882
|
title: "角色管理",
|
|
2883
2883
|
icon: "role",
|
|
@@ -2887,7 +2887,7 @@ const _t = [
|
|
|
2887
2887
|
{
|
|
2888
2888
|
path: "/system/menu",
|
|
2889
2889
|
name: "SystemMenu",
|
|
2890
|
-
component: () => import("./index-
|
|
2890
|
+
component: () => import("./index-rfFkJbFI.js"),
|
|
2891
2891
|
meta: {
|
|
2892
2892
|
title: "菜单管理",
|
|
2893
2893
|
icon: "menu",
|
|
@@ -2909,7 +2909,7 @@ const _t = [
|
|
|
2909
2909
|
{
|
|
2910
2910
|
path: "/dashboard",
|
|
2911
2911
|
name: "Dashboard",
|
|
2912
|
-
component: () => import("./index-
|
|
2912
|
+
component: () => import("./index-U6a8866w.js"),
|
|
2913
2913
|
meta: {
|
|
2914
2914
|
title: "仪表盘",
|
|
2915
2915
|
icon: "dashboard",
|
|
@@ -2929,7 +2929,7 @@ const _t = [
|
|
|
2929
2929
|
{
|
|
2930
2930
|
path: "user",
|
|
2931
2931
|
name: "SystemUser",
|
|
2932
|
-
component: () => import("./index-
|
|
2932
|
+
component: () => import("./index-DkpGZDBh.js"),
|
|
2933
2933
|
meta: {
|
|
2934
2934
|
title: "用户管理",
|
|
2935
2935
|
icon: "user",
|
|
@@ -2939,7 +2939,7 @@ const _t = [
|
|
|
2939
2939
|
{
|
|
2940
2940
|
path: "role",
|
|
2941
2941
|
name: "SystemRole",
|
|
2942
|
-
component: () => import("./index-
|
|
2942
|
+
component: () => import("./index-B6OJp8lX.js"),
|
|
2943
2943
|
meta: {
|
|
2944
2944
|
title: "角色管理",
|
|
2945
2945
|
icon: "role",
|
|
@@ -2949,7 +2949,7 @@ const _t = [
|
|
|
2949
2949
|
{
|
|
2950
2950
|
path: "menu",
|
|
2951
2951
|
name: "SystemMenu",
|
|
2952
|
-
component: () => import("./index-
|
|
2952
|
+
component: () => import("./index-rfFkJbFI.js"),
|
|
2953
2953
|
meta: {
|
|
2954
2954
|
title: "菜单管理",
|
|
2955
2955
|
icon: "menu",
|
|
@@ -3,7 +3,7 @@ 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-
|
|
6
|
+
import { S as d, a as te, _ as le } from "./index-BGjN8fL4.js";
|
|
7
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) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
2
|
import { Progress as u } from "@xto/data";
|
|
3
|
-
import { _ as b } from "./index-
|
|
3
|
+
import { _ as b } from "./index-BGjN8fL4.js";
|
|
4
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
5
|
key: 0,
|
|
6
6
|
viewBox: "0 0 24 24",
|
|
@@ -3,7 +3,7 @@ import { Form as Z, FormItem as m, Input as h, Select as q, InputNumber as Y, Sw
|
|
|
3
3
|
import { Tag as E } from "@xto/data";
|
|
4
4
|
import { Modal as G, Message as J } from "@xto/feedback";
|
|
5
5
|
import { Button as y, Space as C } from "@xto/base";
|
|
6
|
-
import { S as r, M as f, b as K, _ as P } from "./index-
|
|
6
|
+
import { S as r, M as f, b as K, _ as P } from "./index-BGjN8fL4.js";
|
|
7
7
|
const Q = { class: "menu-page" }, W = { class: "table-section" }, X = { class: "table-toolbar" }, ee = { class: "toolbar-left" }, te = { class: "toolbar-right" }, se = { class: "table-count" }, le = { class: "table-wrapper" }, oe = { class: "data-table" }, ae = { key: 0 }, ne = { key: 1 }, de = { class: "data-row tree-row--level-0" }, ie = { class: "col-name" }, re = { class: "menu-info" }, ue = { class: "menu-icon-wrapper" }, pe = {
|
|
8
8
|
viewBox: "0 0 24 24",
|
|
9
9
|
fill: "none",
|
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 g, f as T, g as d, h as R, S as c, a as f, j as h, T as S, k as U, l as k, m, n as A, o as M, p as y, q as C, r as x, s as L, t as D, u as b, v as B, w as I, x as F, y as G, z as P, A as v, B as E, C as w, D as O, 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 g, f as T, g as d, h as R, S as c, a as f, j as h, T as S, k as U, l as k, m, n as A, o as M, p as y, q as C, r as x, s as L, t as D, u as b, v as B, w as I, x as F, y as G, z as P, A as v, B as E, C as w, D as O, E as H, I as N, J as j, K as q, N as z } from "./index-BGjN8fL4.js";
|
|
2
2
|
import { O as K, b as X, D as Q, c as V, a as W, d as Y, e as Z, f as _, g as $, J as ee, A as se, h as ae, H as te, G as oe, P as re, i as ne, j as ue, Q as ie, R as pe, k as le, l as ge, z as Te, B as de, S as Re, T as ce, m as fe, n as he, o as Se, C as Ue, U as ke, L as me, V as Ae, I as Me, y as ye, W as Ce, p as xe, q as Le, r as De, s as be, X as Be, Y as Ie, K as Fe, M as Ge, Z as Pe, _ as ve, $ as Ee, N as we, a0 as Oe, a1 as He, E as Ne, a2 as je, u as qe, t as ze, v as Je, w as Ke, x as Xe, F as Qe } from "./user-B0q24FmO.js";
|
|
3
3
|
export {
|
|
4
4
|
a as Footer,
|
package/package.json
CHANGED
package/src/stores/app.ts
CHANGED
|
@@ -31,22 +31,23 @@ const PREFERENCE_KEYS = ['layout', 'primaryColor', 'theme', 'isDark', 'showTabs'
|
|
|
31
31
|
// 本模块经 index.ts 静态导出,若在模块顶层取值会在 createXtoApp 拉取配置前固化成空对象。
|
|
32
32
|
|
|
33
33
|
export const useAppStore = defineStore('app', () => {
|
|
34
|
-
//
|
|
34
|
+
// 服务端按应用下发的界面配置(xto-admin「界面设置」维护)
|
|
35
35
|
const serverUi = getServerUiConfig()
|
|
36
36
|
const serverFeatures = serverUi.features || {}
|
|
37
37
|
|
|
38
|
-
//
|
|
38
|
+
// 状态(优先级:服务端已配置的项 > 用户本地偏好 > 内置默认。
|
|
39
|
+
// 应用配置了的项始终以配置为准;未配置的项允许用户自行设置并本地记忆)
|
|
39
40
|
const appName = ref<string>(local.get<string>('appName') || 'XTO App')
|
|
40
41
|
const indexPath = ref<string>(local.get<string>('indexPath') || '/dashboard')
|
|
41
42
|
const loginPath = ref<string>(local.get<string>('loginPath') || '/login')
|
|
42
|
-
const theme = ref<ThemeMode>(readUserPreference<ThemeMode>('theme') ??
|
|
43
|
+
const theme = ref<ThemeMode>(serverUi.theme ?? readUserPreference<ThemeMode>('theme') ?? 'light')
|
|
43
44
|
const isDark = ref<boolean>(theme.value === 'dark')
|
|
44
|
-
const layout = ref<LayoutMode>(readUserPreference<LayoutMode>('layout') ??
|
|
45
|
+
const layout = ref<LayoutMode>(serverUi.layout ?? readUserPreference<LayoutMode>('layout') ?? 'sidebar')
|
|
45
46
|
const isCollapsed = ref<boolean>(local.get<boolean>('isCollapsed') || false)
|
|
46
|
-
const showTabs = ref<boolean>(readUserPreference<boolean>('showTabs') ??
|
|
47
|
-
const showFooter = ref<boolean>(readUserPreference<boolean>('showFooter') ??
|
|
48
|
-
const showBreadcrumb = ref<boolean>(readUserPreference<boolean>('showBreadcrumb') ??
|
|
49
|
-
const primaryColor = ref<string>(readUserPreference<string>('primaryColor') ??
|
|
47
|
+
const showTabs = ref<boolean>(serverFeatures.showTabs ?? readUserPreference<boolean>('showTabs') ?? true)
|
|
48
|
+
const showFooter = ref<boolean>(serverFeatures.showFooter ?? readUserPreference<boolean>('showFooter') ?? true)
|
|
49
|
+
const showBreadcrumb = ref<boolean>(serverFeatures.showBreadcrumb ?? readUserPreference<boolean>('showBreadcrumb') ?? true)
|
|
50
|
+
const primaryColor = ref<string>(serverUi.primaryColor ?? readUserPreference<string>('primaryColor') ?? '#4F46E5')
|
|
50
51
|
const allowUserOverride = ref<boolean>(serverUi.allowUserOverride !== false)
|
|
51
52
|
const cachedViews = ref<string[]>([])
|
|
52
53
|
const mixSubMenus = ref<any[]>([])
|