@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.
|
|
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.
|
|
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.
|
|
60
|
-
"@das-fed/utils": "6.4.0-dev.
|
|
61
|
-
"@das-fed/web": "6.4.0-dev.
|
|
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
|
|
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
|
|
7
|
-
import { getSubApps as
|
|
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,
|
|
10
|
-
const a = S([]),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
|
17
|
-
if (
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
const A =
|
|
21
|
-
|
|
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
|
|
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
|
-
|
|
39
|
+
o.push(M);
|
|
29
40
|
}
|
|
30
|
-
a.value =
|
|
31
|
-
},
|
|
32
|
-
e.disabled ||
|
|
33
|
-
},
|
|
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
|
-
() =>
|
|
46
|
+
() => y.currentRoute.value,
|
|
47
47
|
(e) => {
|
|
48
|
-
const d = (e == null ? void 0 : e.path) ?? "",
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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:
|
|
78
|
-
clickItem:
|
|
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__ */
|
|
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:
|
|
92
|
-
const a = s,
|
|
93
|
-
return (
|
|
94
|
-
x(
|
|
95
|
-
data: h
|
|
96
|
-
onClickItem:
|
|
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,
|
|
99
|
+
}), H = (s, l) => {
|
|
101
100
|
const a = s.__vccOpts || s;
|
|
102
|
-
for (const [
|
|
103
|
-
a[
|
|
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",
|
|
Binary file
|