xto-fronted 0.9.1 → 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-C4x3PSxY.js → index-B6OJp8lX.js} +1 -1
- package/dist/{index-5-8RNGND.js → index-BGjN8fL4.js} +365 -365
- package/dist/{index-CsQthEv2.js → index-DkpGZDBh.js} +1 -1
- package/dist/{index-cytRUeAK.js → index-U6a8866w.js} +1 -1
- package/dist/{index-BYChodrz.js → index-rfFkJbFI.js} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -1
- package/src/stores/app.ts +9 -8
|
@@ -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/index.ts
CHANGED
|
@@ -51,8 +51,10 @@ export async function createXtoApp(config: Partial<XtoConfig>) {
|
|
|
51
51
|
|
|
52
52
|
// 拉取服务端按应用配置的界面默认值(免登录接口,xto-admin「界面设置」维护)
|
|
53
53
|
// 必须在 store 首次实例化前完成,失败/超时静默降级为内置默认
|
|
54
|
+
// H5 独立页(如扫码进入的移动端申请页)不使用 Layout/换肤体系,跳过该请求
|
|
55
|
+
const isH5Page = typeof window !== 'undefined' && window.location.pathname.includes('/h5/')
|
|
54
56
|
const resolvedAppId = config.appId || getAppId()
|
|
55
|
-
if (resolvedAppId) {
|
|
57
|
+
if (resolvedAppId && !isH5Page) {
|
|
56
58
|
try {
|
|
57
59
|
const uiConfig = await Promise.race([
|
|
58
60
|
getAppUiConfig(resolvedAppId),
|
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[]>([])
|