@das-fed/upf-ui 6.4.0-dev.195 → 6.4.0-dev.197

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/upf-ui",
3
- "version": "6.4.0-dev.195",
3
+ "version": "6.4.0-dev.197",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -26,7 +26,7 @@
26
26
  "@antv/x6-plugin-snapline": "^2.1.7",
27
27
  "@antv/x6-plugin-transform": "^2.1.8",
28
28
  "@antv/x6-vue-shape": "^2.1.2",
29
- "@das-fed/upf-ui": "6.4.0-dev.195",
29
+ "@das-fed/upf-ui": "6.4.0-dev.197",
30
30
  "@element-plus/icons-vue": "^2.3.1",
31
31
  "@types/lodash": "^4.14.194",
32
32
  "@types/lodash-es": "^4.17.9",
@@ -56,9 +56,9 @@
56
56
  "vue-tsc": "^2.0.29"
57
57
  },
58
58
  "dependencies": {
59
- "@das-fed/upf-cli": "6.4.0-dev.195",
60
- "@das-fed/upf-utils": "6.4.0-dev.195",
61
- "@das-fed/upf-web": "6.4.0-dev.195",
59
+ "@das-fed/upf-cli": "6.4.0-dev.197",
60
+ "@das-fed/upf-utils": "6.4.0-dev.197",
61
+ "@das-fed/upf-web": "6.4.0-dev.197",
62
62
  "@types/markdown-it": "^14.1.2",
63
63
  "@wangeditor-next/editor": "5.6.31",
64
64
  "@wangeditor-next/editor-for-vue": "5.1.14",
@@ -1,110 +1,99 @@
1
1
  import '@das-fed/upf-ui/packages/business-components/layout-breadcrumb/style.css';
2
- import { ref as S, computed as R, watch as v, nextTick as I, defineComponent as T, unref as g, openBlock as N, createElementBlock as U, createVNode as x, createCommentVNode as D } from "vue";
3
- import { withInstall as P } from "@das-fed/upf-utils/with-install/index";
4
- import { DasBreadCrumb as O } from "@das-fed/upf-ui/packages/components/breadcrumb/index";
5
- import { useRouter as $, useRoute as j } from "vue-router";
6
- import { flatTree as q } from "@das-fed/upf-utils/common-tools";
7
- import { getSubApps as k } from "@das-fed/upf-utils/common-info";
8
- import { setThemeRule as E } from "@das-fed/upf-web/packages/theme/index";
9
- const J = (a, l) => {
10
- const i = S([]), f = R(() => [...i.value, ...a.data || []]), p = () => new Promise((e) => {
11
- const s = () => {
12
- var n, t;
13
- const { app: o = "" } = (u == null ? void 0 : u.query) || {}, d = ((t = (n = k()) == null ? void 0 : n.currentSubApp) == null ? void 0 : t.menus) ?? [];
14
- if (o === k().currentSubAppCode && d.length) return e();
15
- setTimeout(() => s(), 50);
2
+ import { ref as k, computed as L, watch as C, nextTick as M, defineComponent as B, openBlock as S, createElementBlock as v, createVNode as A, unref as y, createCommentVNode as N } from "vue";
3
+ import { withInstall as q } from "@das-fed/upf-utils/with-install/index";
4
+ import { DasBreadCrumb as R } from "@das-fed/upf-ui/packages/components/breadcrumb/index";
5
+ import { useRouter as T, useRoute as x } from "vue-router";
6
+ import { flatTree as D } from "@das-fed/upf-utils/common-tools";
7
+ import { getSubApps as g, getMenuItemInfo as O, getMenuListnfo as P } from "@das-fed/upf-utils/common-info";
8
+ import { setThemeRule as $ } from "@das-fed/upf-web/packages/theme/index";
9
+ const E = (a, i) => {
10
+ const p = k([]), m = L(() => [...p.value, ...a.data || []]), f = () => new Promise((e) => {
11
+ const t = () => {
12
+ var r, o;
13
+ const { app: n = "" } = (u == null ? void 0 : u.query) || {}, c = ((o = (r = g()) == null ? void 0 : r.currentSubApp) == null ? void 0 : o.menus) ?? [];
14
+ if (n === g().currentSubAppCode && c.length) return e();
15
+ setTimeout(() => t(), 50);
16
16
  };
17
- s();
18
- }), h = async (e, s) => {
19
- var b, c;
20
- await I(), await p();
21
- const o = [], d = s.menu || "", n = ((c = (b = k()) == null ? void 0 : b.currentSubApp) == null ? void 0 : c.menus) ?? [];
22
- if (!n || !n.length) return;
23
- let t = null;
24
- const r = q(n);
25
- if (d ? t = r.find((m) => m.code === d) : t = r.find((m) => m.routeUrl && m.routeUrl === e), t) {
26
- const m = t.code.split(".");
27
- if (m.length === 3) {
28
- const A = m.slice(0, 2).join("."), _ = r.find((L) => L.code === A || L.originalCode === A);
29
- o.push({ name: (_ == null ? void 0 : _.name) ?? "", isMenu: !0, disabled: !0 });
17
+ t();
18
+ }), l = (...e) => {
19
+ const t = O(), n = P(), c = [], r = n.find((o) => o.appId === t.appId);
20
+ if (r && r.children && r.children.length)
21
+ if (t.parentId === r.id)
22
+ c.push({ name: t.showName || "", isMenu: !0 });
23
+ else {
24
+ const o = r.children.find((s) => s.id === t.parentId);
25
+ o && (c.push({ name: o.showName || "", isMenu: !0, disabled: !0 }), c.push({ name: t.showName || "", isMenu: !0 }));
30
26
  }
31
- const M = {
32
- name: (t == null ? void 0 : t.name) ?? "",
33
- routerPath: (t == null ? void 0 : t.routeUrl) ?? "",
34
- isMenu: !0
35
- };
36
- o.push(M);
37
- }
38
- i.value = o;
39
- }, C = (e) => {
40
- e.disabled || l("click-item", e);
41
- }, y = $(), u = j();
42
- v(
43
- () => y.currentRoute.value,
27
+ p.value = c;
28
+ }, h = (e) => {
29
+ e.disabled || i("click-item", e);
30
+ }, b = T(), u = x();
31
+ C(
32
+ () => b.currentRoute.value,
44
33
  (e) => {
45
- const s = (e == null ? void 0 : e.path) ?? "", o = (e == null ? void 0 : e.query) ?? {};
46
- h(s, o);
34
+ const t = (e == null ? void 0 : e.path) ?? "", n = (e == null ? void 0 : e.query) ?? {};
35
+ l(t, n);
47
36
  }
48
- ), h(u.path, u.query);
49
- const B = S(!1);
50
- return v(
37
+ ), l(u.path, u.query);
38
+ const _ = k(!1);
39
+ return C(
51
40
  () => a.data,
52
41
  () => {
53
- I(() => {
54
- p().then(() => {
55
- var t;
56
- const e = k(), s = u.query.app || e.currentSubApp.code || "";
57
- let o = u.query.menu || "";
58
- if (!o) {
59
- const r = ((t = e.currentSubApp) == null ? void 0 : t.menus) ?? [], b = q(r).find(
60
- (c) => `/${(c == null ? void 0 : c.applicationPath) ?? ""}${(c == null ? void 0 : c.routeUrl) ?? ""}`.replace(/\/\//g, "/") === location.pathname
42
+ M(() => {
43
+ f().then(() => {
44
+ var o;
45
+ const e = g(), t = u.query.app || e.currentSubApp.code || "";
46
+ let n = u.query.menu || "";
47
+ if (!n) {
48
+ const s = ((o = e.currentSubApp) == null ? void 0 : o.menus) ?? [], I = D(s).find(
49
+ (d) => `/${(d == null ? void 0 : d.applicationPath) ?? ""}${(d == null ? void 0 : d.routeUrl) ?? ""}`.replace(/\/\//g, "/") === location.pathname
61
50
  );
62
- b && (o = b.code);
51
+ I && (n = I.code);
63
52
  }
64
- const d = JSON.parse(sessionStorage.getItem("breadcrumb") || "{}")[s], n = [];
65
- for (let r in d) d[r] && n.push(r);
66
- B.value = !!n.find((r) => o === r);
53
+ const c = JSON.parse(sessionStorage.getItem("breadcrumb") || "{}")[t], r = [];
54
+ for (let s in c) c[s] && r.push(s);
55
+ _.value = !!r.find((s) => n === s);
67
56
  });
68
57
  });
69
58
  },
70
59
  { deep: !0, immediate: !0 }
71
60
  ), {
72
- isShow: B,
73
- breadcrumbList: f,
74
- clickItem: C
61
+ isShow: _,
62
+ breadcrumbList: m,
63
+ clickItem: h
75
64
  };
76
- }, z = {
65
+ }, J = {
77
66
  key: 0,
78
67
  class: "layout-breadcrumb"
79
- }, F = {
68
+ }, U = {
80
69
  name: "LayoutBreadCrumb"
81
- }, G = /* @__PURE__ */ T({
82
- ...F,
70
+ }, j = /* @__PURE__ */ B({
71
+ ...U,
83
72
  props: {
84
73
  data: { default: () => [] }
85
74
  },
86
75
  emits: ["click-item"],
87
- setup(a, { emit: l }) {
88
- const i = a, f = l, { isShow: p, breadcrumbList: h, clickItem: C } = J(i, f);
89
- return (y, u) => g(p) && y.data && y.data.length ? (N(), U("div", z, [
90
- x(g(O), {
91
- data: g(h),
92
- onClickItem: g(C)
76
+ setup(a, { emit: i }) {
77
+ const p = a, m = i, { isShow: f, breadcrumbList: l, clickItem: h } = E(p, m);
78
+ return (b, u) => b.data && b.data.length ? (S(), v("div", J, [
79
+ A(y(R), {
80
+ data: y(l),
81
+ onClickItem: y(h)
93
82
  }, null, 8, ["data", "onClickItem"])
94
- ])) : D("", !0);
83
+ ])) : N("", !0);
95
84
  }
96
- }), H = (a, l) => {
97
- const i = a.__vccOpts || a;
98
- for (const [f, p] of l)
99
- i[f] = p;
100
- return i;
101
- }, K = /* @__PURE__ */ H(G, [["__scopeId", "data-v-304a86a2"]]), Q = {
85
+ }), w = (a, i) => {
86
+ const p = a.__vccOpts || a;
87
+ for (const [m, f] of i)
88
+ p[m] = f;
89
+ return p;
90
+ }, z = /* @__PURE__ */ w(j, [["__scopeId", "data-v-511908ae"]]), F = {
102
91
  "--das-layout-micro-container-bg-color": "#e2e7ef",
103
92
  "--das-layout-breadcrumb-bg-color": "#ffffff"
104
93
  };
105
- E(Q);
106
- const te = P(K), oe = () => S(null);
94
+ $(F);
95
+ const Z = q(z), V = () => k(null);
107
96
  export {
108
- te as DasLayoutBreadcrumb,
109
- oe as DasLayoutBreadcrumbRef
97
+ Z as DasLayoutBreadcrumb,
98
+ V as DasLayoutBreadcrumbRef
110
99
  };
@@ -1 +1 @@
1
- .layout-breadcrumb[data-v-304a86a2]{height:40px;flex-shrink:0;display:flex;align-items:center;background-color:var(--das-layout-breadcrumb-bg-color);padding-left:18px}
1
+ .layout-breadcrumb[data-v-511908ae]{height:40px;flex-shrink:0;display:flex;align-items:center;background-color:var(--das-layout-breadcrumb-bg-color);padding-left:18px}