@das-fed/ui 7.1.0-dev.11 → 7.1.0-dev.12

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