@das-fed/ui 6.4.0-dev.101 → 6.4.0-dev.102

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/ui",
3
- "version": "6.4.0-dev.101",
3
+ "version": "6.4.0-dev.102",
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/cli": "6.4.0-dev.101",
29
+ "@das-fed/cli": "6.4.0-dev.102",
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/ui": "6.4.0-dev.101",
60
- "@das-fed/utils": "6.4.0-dev.101",
61
- "@das-fed/web": "6.4.0-dev.101",
59
+ "@das-fed/ui": "6.4.0-dev.102",
60
+ "@das-fed/utils": "6.4.0-dev.102",
61
+ "@das-fed/web": "6.4.0-dev.102",
62
62
  "@wangeditor/editor": "^5.1.23",
63
63
  "@wangeditor/editor-for-vue": "^5.1.12",
64
64
  "@wangeditor/plugin-upload-attachment": "^1.1.0",
@@ -1,23 +1,34 @@
1
1
  import '@das-fed/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 y, openBlock as N, createElementBlock as U, createVNode as x, createCommentVNode as D } from "vue";
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
3
  import { withInstall as P } from "@das-fed/utils/with-install/index";
4
4
  import { DasBreadCrumb as O } from "@das-fed/ui/packages/components/breadcrumb/index";
5
5
  import { useRouter as $, useRoute as j } from "vue-router";
6
6
  import { flatTree as q } from "@das-fed/utils/common-tools";
7
- import { getSubApps as g } from "@das-fed/utils/common-info";
7
+ import { getSubApps as k } from "@das-fed/utils/common-info";
8
8
  import { setThemeRule as E } from "@das-fed/web/packages/theme/index";
9
9
  const J = (s, l) => {
10
- const a = S([]), f = R(() => [...a.value, ...s.data || []]), p = async (e, d) => {
11
- var b, u;
12
- await I();
13
- const o = [], i = d.menu || "", c = ((u = (b = g()) == null ? void 0 : b.currentSubApp) == null ? void 0 : u.menus) ?? [];
14
- if (!c || !c.length) return;
10
+ const a = S([]), f = R(() => [...a.value, ...s.data || []]), p = () => {
11
+ const { app: e = "" } = (u == null ? void 0 : u.query) || {};
12
+ return new Promise((d) => {
13
+ const o = () => {
14
+ var n, t;
15
+ const i = ((t = (n = k()) == null ? void 0 : n.currentSubApp) == null ? void 0 : t.menus) ?? [];
16
+ if (e === k().currentSubAppCode && i.length) return d();
17
+ setTimeout(() => o(), 50);
18
+ };
19
+ o();
20
+ });
21
+ }, h = async (e, d) => {
22
+ var b, c;
23
+ await I(), await p();
24
+ const o = [], i = d.menu || "", n = ((c = (b = k()) == null ? void 0 : b.currentSubApp) == null ? void 0 : c.menus) ?? [];
25
+ if (!n || !n.length) return;
15
26
  let t = null;
16
- const n = q(c);
17
- if (i ? t = n.find((m) => m.code === i) : t = n.find((m) => m.routeUrl && m.routeUrl === e), t) {
27
+ const r = q(n);
28
+ if (i ? t = r.find((m) => m.code === i) : t = r.find((m) => m.routeUrl && m.routeUrl === e), t) {
18
29
  const m = t.code.split(".");
19
30
  if (m.length === 3) {
20
- const A = m.slice(0, 2).join("."), _ = n.find((L) => L.code === A || L.originalCode === A);
31
+ const A = m.slice(0, 2).join("."), _ = r.find((L) => L.code === A || L.originalCode === A);
21
32
  o.push({ name: (_ == null ? void 0 : _.name) ?? "", isMenu: !0, disabled: !0 });
22
33
  }
23
34
  const M = {
@@ -28,49 +39,34 @@ const J = (s, l) => {
28
39
  o.push(M);
29
40
  }
30
41
  a.value = o;
31
- }, k = (e) => {
42
+ }, C = (e) => {
32
43
  e.disabled || l("click-item", e);
33
- }, C = $(), r = j(), h = () => {
34
- const { app: e = "" } = (r == null ? void 0 : r.query) || {};
35
- return new Promise((d) => {
36
- const o = () => {
37
- var c, t;
38
- const i = ((t = (c = g()) == null ? void 0 : c.currentSubApp) == null ? void 0 : t.menus) ?? [];
39
- if (e === g().currentSubAppCode && i.length) return d();
40
- setTimeout(() => o(), 50);
41
- };
42
- o();
43
- });
44
- };
44
+ }, y = $(), u = j();
45
45
  v(
46
- () => C.currentRoute.value,
46
+ () => y.currentRoute.value,
47
47
  (e) => {
48
48
  const d = (e == null ? void 0 : e.path) ?? "", o = (e == null ? void 0 : e.query) ?? {};
49
- h().then(() => {
50
- p(d, o);
51
- });
49
+ h(d, o);
52
50
  }
53
- ), h().then(() => {
54
- p(r.path, r.query);
55
- });
51
+ ), h(u.path, u.query);
56
52
  const B = S(!1);
57
53
  return v(
58
54
  () => s.data,
59
55
  () => {
60
56
  I(() => {
61
- h().then(() => {
57
+ p().then(() => {
62
58
  var t;
63
- const e = g(), d = r.query.app || e.currentSubApp.code || "";
64
- let o = r.query.menu || "";
59
+ const e = k(), d = u.query.app || e.currentSubApp.code || "";
60
+ let o = u.query.menu || "";
65
61
  if (!o) {
66
- const n = ((t = e.currentSubApp) == null ? void 0 : t.menus) ?? [], b = q(n).find(
67
- (u) => `/${(u == null ? void 0 : u.applicationPath) ?? ""}${(u == null ? void 0 : u.routeUrl) ?? ""}`.replace(/\/\//g, "/") === location.pathname
62
+ const r = ((t = e.currentSubApp) == null ? void 0 : t.menus) ?? [], b = q(r).find(
63
+ (c) => `/${(c == null ? void 0 : c.applicationPath) ?? ""}${(c == null ? void 0 : c.routeUrl) ?? ""}`.replace(/\/\//g, "/") === location.pathname
68
64
  );
69
65
  b && (o = b.code);
70
66
  }
71
- const i = JSON.parse(sessionStorage.getItem("breadcrumb") || "{}")[d], c = [];
72
- for (let n in i) i[n] && c.push(n);
73
- B.value = !!c.find((n) => o === n);
67
+ const i = JSON.parse(sessionStorage.getItem("breadcrumb") || "{}")[d], n = [];
68
+ for (let r in i) i[r] && n.push(r);
69
+ B.value = !!n.find((r) => o === r);
74
70
  });
75
71
  });
76
72
  },
@@ -78,7 +74,7 @@ const J = (s, l) => {
78
74
  ), {
79
75
  isShow: B,
80
76
  breadcrumbList: f,
81
- clickItem: k
77
+ clickItem: C
82
78
  };
83
79
  }, z = {
84
80
  key: 0,
@@ -92,11 +88,11 @@ const J = (s, l) => {
92
88
  },
93
89
  emits: ["click-item"],
94
90
  setup(s, { emit: l }) {
95
- const a = s, f = l, { isShow: p, breadcrumbList: k, clickItem: C } = J(a, f);
96
- return (r, h) => y(p) && r.data && r.data.length ? (N(), U("div", z, [
97
- x(y(O), {
98
- data: y(k),
99
- onClickItem: y(C)
91
+ const a = s, f = l, { isShow: p, breadcrumbList: h, clickItem: C } = J(a, f);
92
+ return (y, u) => g(p) && y.data && y.data.length ? (N(), U("div", z, [
93
+ x(g(O), {
94
+ data: g(h),
95
+ onClickItem: g(C)
100
96
  }, null, 8, ["data", "onClickItem"])
101
97
  ])) : D("", !0);
102
98
  }