@das-fed/ui 6.4.0-dev.100 → 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.100",
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.100",
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.100",
60
- "@das-fed/utils": "6.4.0-dev.100",
61
- "@das-fed/web": "6.4.0-dev.100",
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,106 +1,105 @@
1
1
  import '@das-fed/ui/packages/business-components/layout-breadcrumb/style.css';
2
- import { ref as S, computed as T, watch as v, nextTick as I, defineComponent as q, unref as h, 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
- import { flatTree as M } from "@das-fed/utils/common-tools";
7
- import { getSubApps as g } from "@das-fed/utils/common-info";
6
+ import { flatTree as q } from "@das-fed/utils/common-tools";
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
- const J = (s, m) => {
10
- const a = S([]), p = T(() => [...a.value, ...s.data || []]), l = async (e, d) => {
11
- var f, n;
12
- await I();
13
- const r = [], c = d.menu || "", u = ((n = (f = g()) == null ? void 0 : f.currentSubApp) == null ? void 0 : n.menus) ?? [];
14
- if (!u || !u.length) return;
9
+ const J = (s, l) => {
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 o = M(u);
17
- if (c ? t = o.find((i) => i.code === c) : t = o.find((i) => i.routeUrl && i.routeUrl === e), t) {
18
- const i = t.code.split(".");
19
- if (i.length === 3) {
20
- const A = i.slice(0, 2).join("."), _ = o.find((L) => L.code === A || L.originalCode === A);
21
- r.push({ name: (_ == null ? void 0 : _.name) ?? "", isMenu: !0, disabled: !0 });
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) {
29
+ const m = t.code.split(".");
30
+ if (m.length === 3) {
31
+ const A = m.slice(0, 2).join("."), _ = r.find((L) => L.code === A || L.originalCode === A);
32
+ o.push({ name: (_ == null ? void 0 : _.name) ?? "", isMenu: !0, disabled: !0 });
22
33
  }
23
- const R = {
34
+ const M = {
24
35
  name: (t == null ? void 0 : t.name) ?? "",
25
36
  routerPath: (t == null ? void 0 : t.routeUrl) ?? "",
26
37
  isMenu: !0
27
38
  };
28
- r.push(R);
39
+ o.push(M);
29
40
  }
30
- a.value = r;
31
- }, y = (e) => {
32
- e.disabled || m("click-item", e);
33
- }, k = (e) => {
34
- const { app: d = "" } = e;
35
- return new Promise((r) => {
36
- const c = () => {
37
- var t, o;
38
- const u = ((o = (t = g()) == null ? void 0 : t.currentSubApp) == null ? void 0 : o.menus) ?? [];
39
- if (d === g().currentSubAppCode && u.length) return r();
40
- setTimeout(() => c(), 50);
41
- };
42
- c();
43
- });
44
- }, b = $(), C = j();
41
+ a.value = o;
42
+ }, C = (e) => {
43
+ e.disabled || l("click-item", e);
44
+ }, y = $(), u = j();
45
45
  v(
46
- () => b.currentRoute.value,
46
+ () => y.currentRoute.value,
47
47
  (e) => {
48
- const d = (e == null ? void 0 : e.path) ?? "", r = (e == null ? void 0 : e.query) ?? {};
49
- k(r).then(() => {
50
- l(d, r);
51
- });
52
- },
53
- { immediate: !0 }
54
- );
48
+ const d = (e == null ? void 0 : e.path) ?? "", o = (e == null ? void 0 : e.query) ?? {};
49
+ h(d, o);
50
+ }
51
+ ), h(u.path, u.query);
55
52
  const B = S(!1);
56
53
  return v(
57
54
  () => s.data,
58
55
  () => {
59
56
  I(() => {
60
- var t;
61
- const e = g(), d = C.query.app || e.currentSubApp.code || "";
62
- let r = C.query.menu || "";
63
- if (!r) {
64
- const o = ((t = e.currentSubApp) == null ? void 0 : t.menus) ?? [], f = M(o).find(
65
- (n) => `/${(n == null ? void 0 : n.applicationPath) ?? ""}${(n == null ? void 0 : n.routeUrl) ?? ""}`.replace(/\/\//g, "/") === location.pathname
66
- );
67
- f && (r = f.code);
68
- }
69
- const c = JSON.parse(sessionStorage.getItem("breadcrumb") || "{}")[d], u = [];
70
- for (let o in c) c[o] && u.push(o);
71
- B.value = !!u.find((o) => r === o);
57
+ p().then(() => {
58
+ var t;
59
+ const e = k(), d = u.query.app || e.currentSubApp.code || "";
60
+ let o = u.query.menu || "";
61
+ if (!o) {
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
64
+ );
65
+ b && (o = b.code);
66
+ }
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);
70
+ });
72
71
  });
73
72
  },
74
73
  { deep: !0, immediate: !0 }
75
74
  ), {
76
75
  isShow: B,
77
- breadcrumbList: p,
78
- clickItem: y
76
+ breadcrumbList: f,
77
+ clickItem: C
79
78
  };
80
79
  }, z = {
81
80
  key: 0,
82
81
  class: "layout-breadcrumb"
83
82
  }, F = {
84
83
  name: "LayoutBreadCrumb"
85
- }, G = /* @__PURE__ */ q({
84
+ }, G = /* @__PURE__ */ T({
86
85
  ...F,
87
86
  props: {
88
87
  data: { default: () => [] }
89
88
  },
90
89
  emits: ["click-item"],
91
- setup(s, { emit: m }) {
92
- const a = s, p = m, { isShow: l, breadcrumbList: y, clickItem: k } = J(a, p);
93
- return (b, C) => h(l) && b.data && b.data.length ? (N(), U("div", z, [
94
- x(h(O), {
95
- data: h(y),
96
- onClickItem: h(k)
90
+ setup(s, { emit: l }) {
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)
97
96
  }, null, 8, ["data", "onClickItem"])
98
97
  ])) : D("", !0);
99
98
  }
100
- }), H = (s, m) => {
99
+ }), H = (s, l) => {
101
100
  const a = s.__vccOpts || s;
102
- for (const [p, l] of m)
103
- a[p] = l;
101
+ for (const [f, p] of l)
102
+ a[f] = p;
104
103
  return a;
105
104
  }, K = /* @__PURE__ */ H(G, [["__scopeId", "data-v-878cd70a"]]), Q = {
106
105
  "--das-layout-micro-container-bg-color": "#e2e7ef",