@ditari/bsui 1.0.0 → 1.0.2
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/dist/cjs/components/components.cjs.js +1 -1
- package/dist/cjs/components/components.d.ts +2 -1
- package/dist/cjs/components/form/grid-form/GridForm.cjs.js +1 -0
- package/dist/cjs/components/form/grid-form/GridForm.d.ts +2 -0
- package/dist/cjs/components/form/index.cjs.js +1 -1
- package/dist/cjs/components/form/index.d.ts +8 -1
- package/dist/cjs/components/grid/Grid.cjs.js +1 -0
- package/dist/cjs/components/grid/Grid.d.ts +23 -0
- package/dist/cjs/components/grid/GridItem.cjs.js +1 -0
- package/dist/cjs/components/grid/GridItem.d.ts +2 -0
- package/dist/cjs/components/grid/index.cjs.js +1 -0
- package/dist/cjs/components/grid/index.d.ts +23 -0
- package/dist/cjs/components/index.cjs.js +1 -1
- package/dist/cjs/components/layout/Breadcrumb.vue.cjs.js +1 -1
- package/dist/cjs/components/layout/List.vue.cjs.js +1 -1
- package/dist/cjs/components/layout/Main.vue.cjs.js +1 -1
- package/dist/cjs/components/layout/Menu.cjs.js +1 -1
- package/dist/cjs/components/layout/NavTabs.vue.cjs.js +1 -1
- package/dist/cjs/components/layout/Show.vue.cjs.js +1 -1
- package/dist/cjs/components/layout/Show.vue.d.ts +11 -0
- package/dist/cjs/components/layout/index.d.ts +11 -25
- package/dist/cjs/components/table/Table.vue.cjs.js +1 -1
- package/dist/cjs/components/table/Table.vue.d.ts +1 -1
- package/dist/cjs/components/table/index.d.ts +1 -1
- package/dist/cjs/components/theme/index.cjs.js +1 -0
- package/dist/cjs/components/theme/index.d.ts +1 -0
- package/dist/cjs/hooks/http/index.cjs.js +1 -0
- package/dist/cjs/hooks/http/index.d.ts +29 -0
- package/dist/cjs/hooks/index.cjs.js +1 -0
- package/dist/cjs/hooks/index.d.ts +2 -0
- package/dist/cjs/hooks/route/index.cjs.js +1 -0
- package/dist/cjs/hooks/route/index.d.ts +9 -0
- package/dist/cjs/store/index.cjs.js +1 -0
- package/dist/cjs/store/index.d.ts +7 -7
- package/dist/cjs/store/modules/Breadcrumb.cjs.js +1 -1
- package/dist/cjs/store/modules/Breadcrumb.d.ts +6 -16
- package/dist/cjs/store/modules/DataDictionary.cjs.js +1 -1
- package/dist/cjs/store/modules/DataDictionary.d.ts +28 -3
- package/dist/cjs/store/modules/KeepAlive.cjs.js +1 -1
- package/dist/cjs/store/modules/KeepAlive.d.ts +3 -4
- package/dist/cjs/store/modules/Menu.cjs.js +1 -1
- package/dist/cjs/store/modules/Menu.d.ts +1 -2
- package/dist/cjs/store/modules/NavTab.cjs.js +1 -1
- package/dist/cjs/store/modules/NavTab.d.ts +3 -4
- package/dist/cjs/store/modules/Settings.cjs.js +1 -1
- package/dist/cjs/store/modules/Settings.d.ts +23 -9
- package/dist/cjs/store/modules/User.cjs.js +1 -1
- package/dist/cjs/store/modules/User.d.ts +1 -2
- package/dist/cjs/store/types.cjs.js +1 -1
- package/dist/cjs/utils/get.cjs.js +1 -0
- package/dist/css/grid/style/index.css +1 -0
- package/dist/css/index.css +1 -0
- package/dist/css/menu/style/index.css +1 -0
- package/dist/esm/components/components.d.ts +2 -1
- package/dist/esm/components/components.esm.js +10 -7
- package/dist/esm/components/form/grid-form/GridForm.d.ts +2 -0
- package/dist/esm/components/form/grid-form/GridForm.esm.js +9 -0
- package/dist/esm/components/form/index.d.ts +8 -1
- package/dist/esm/components/form/index.esm.js +5 -3
- package/dist/esm/components/grid/Grid.d.ts +23 -0
- package/dist/esm/components/grid/Grid.esm.js +55 -0
- package/dist/esm/components/grid/GridItem.d.ts +2 -0
- package/dist/esm/components/grid/GridItem.esm.js +15 -0
- package/dist/esm/components/grid/index.d.ts +23 -0
- package/dist/esm/components/grid/index.esm.js +8 -0
- package/dist/esm/components/index.esm.js +16 -13
- package/dist/esm/components/layout/Breadcrumb.vue.esm.js +13 -19
- package/dist/esm/components/layout/List.vue.esm.js +29 -35
- package/dist/esm/components/layout/Main.vue.esm.js +53 -50
- package/dist/esm/components/layout/Menu.esm.js +45 -19
- package/dist/esm/components/layout/NavTabs.vue.esm.js +27 -27
- package/dist/esm/components/layout/Show.vue.d.ts +11 -0
- package/dist/esm/components/layout/Show.vue.esm.js +70 -48
- package/dist/esm/components/layout/index.d.ts +11 -25
- package/dist/esm/components/table/Table.vue.d.ts +1 -1
- package/dist/esm/components/table/Table.vue.esm.js +2 -2
- package/dist/esm/components/table/index.d.ts +1 -1
- package/dist/esm/components/theme/index.d.ts +1 -0
- package/dist/esm/components/theme/index.esm.js +4 -0
- package/dist/esm/hooks/http/index.d.ts +29 -0
- package/dist/esm/hooks/http/index.esm.js +52 -0
- package/dist/esm/hooks/index.d.ts +2 -0
- package/dist/esm/hooks/index.esm.js +6 -0
- package/dist/esm/hooks/route/index.d.ts +9 -0
- package/dist/esm/hooks/route/index.esm.js +42 -0
- package/dist/esm/store/index.d.ts +7 -7
- package/dist/esm/store/index.esm.js +16 -0
- package/dist/esm/store/modules/Breadcrumb.d.ts +6 -16
- package/dist/esm/store/modules/Breadcrumb.esm.js +4 -12
- package/dist/esm/store/modules/DataDictionary.d.ts +28 -3
- package/dist/esm/store/modules/DataDictionary.esm.js +30 -6
- package/dist/esm/store/modules/KeepAlive.d.ts +3 -4
- package/dist/esm/store/modules/KeepAlive.esm.js +4 -4
- package/dist/esm/store/modules/Menu.d.ts +1 -2
- package/dist/esm/store/modules/Menu.esm.js +1 -1
- package/dist/esm/store/modules/NavTab.d.ts +3 -4
- package/dist/esm/store/modules/NavTab.esm.js +2 -2
- package/dist/esm/store/modules/Settings.d.ts +23 -9
- package/dist/esm/store/modules/Settings.esm.js +81 -6
- package/dist/esm/store/modules/User.d.ts +1 -2
- package/dist/esm/store/modules/User.esm.js +4 -1
- package/dist/esm/store/types.esm.js +4 -4
- package/dist/esm/style.css +1 -274
- package/dist/esm/utils/get.esm.js +11 -0
- package/dist/style/grid/style/index.scss +61 -0
- package/dist/style/index.scss +15 -0
- package/dist/style/menu/style/index.scss +18 -0
- package/dist/style/theme/theme.scss +1 -0
- package/dist/style/theme/variable.scss +21 -0
- package/package.json +10 -7
- package/src/components/components.ts +4 -0
- package/src/components/config/Config.vue +8 -0
- package/src/components/form/Form.vue +10 -0
- package/src/components/form/grid-form/GridForm.jsx +10 -0
- package/src/components/form/index.ts +8 -0
- package/src/components/form/style/index.less +0 -0
- package/src/components/grid/Grid.tsx +73 -0
- package/src/components/grid/GridItem.tsx +15 -0
- package/src/components/grid/index.md +4 -0
- package/src/components/grid/index.ts +7 -0
- package/src/components/grid/style/index.scss +61 -0
- package/src/components/index.scss +15 -0
- package/src/components/index.ts +31 -0
- package/src/components/layout/Breadcrumb.vue +119 -0
- package/src/components/layout/Header.vue +0 -0
- package/src/components/layout/Layout.jsx +24 -0
- package/src/components/layout/List.vue +159 -0
- package/src/components/layout/Main.vue +187 -0
- package/src/components/layout/Menu.jsx +96 -0
- package/src/components/layout/NavTabs.vue +192 -0
- package/src/components/layout/Show.vue +157 -0
- package/src/components/layout/index.ts +19 -0
- package/src/components/menu/Menu.jsx +94 -0
- package/src/components/menu/style/index.scss +18 -0
- package/src/components/select/Select.vue +85 -0
- package/src/components/table/Field.vue +49 -0
- package/src/components/table/Table.vue +391 -0
- package/src/components/table/index.md +1 -0
- package/src/components/table/index.ts +5 -0
- package/src/components/theme/index.ts +1 -0
- package/src/components/theme/theme.scss +1 -0
- package/src/components/theme/variable.scss +21 -0
- package/src/hooks/http/index.ts +107 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/route/index.ts +84 -0
- package/src/store/index.ts +7 -0
- package/src/store/modules/Breadcrumb.ts +25 -0
- package/src/store/modules/DataDictionary.ts +49 -0
- package/src/store/modules/KeepAlive.ts +47 -0
- package/src/store/modules/Menu.ts +24 -0
- package/src/store/modules/NavTab.ts +81 -0
- package/src/store/modules/Settings.ts +120 -0
- package/src/store/modules/User.ts +23 -0
- package/src/store/types.ts +15 -0
- package/src/tsconfig.json +16 -0
- package/src/utils/get.ts +15 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/install.ts +12 -0
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import { defineComponent as S, computed as
|
|
1
|
+
import { defineComponent as S, computed as _, resolveComponent as a, openBlock as n, createElementBlock as w, Fragment as x, createVNode as t, withCtx as l, unref as e, isRef as $, createElementVNode as o, renderSlot as f, normalizeStyle as y, createBlock as d, Transition as A, KeepAlive as M, resolveDynamicComponent as z } from "vue";
|
|
2
2
|
import { MenuUnfoldOutlined as B, MenuFoldOutlined as N } from "@ant-design/icons-vue";
|
|
3
3
|
import "../../store/modules/Breadcrumb.esm.js";
|
|
4
4
|
import "../../store/modules/DataDictionary.esm.js";
|
|
5
|
-
import D from "../../store/modules/KeepAlive.esm.js";
|
|
5
|
+
import { useKeepAliveStore as D } from "../../store/modules/KeepAlive.esm.js";
|
|
6
6
|
import "../../store/modules/Menu.esm.js";
|
|
7
7
|
import "../../store/modules/NavTab.esm.js";
|
|
8
|
-
import E from "../../store/modules/Settings.esm.js";
|
|
8
|
+
import { useSettingsStore as E } from "../../store/modules/Settings.esm.js";
|
|
9
9
|
import "../../store/modules/User.esm.js";
|
|
10
10
|
import F from "./NavTabs.vue.esm.js";
|
|
11
11
|
import "./NavTabs.vue.esm2.js";
|
|
12
12
|
import K from "./Breadcrumb.vue.esm.js";
|
|
13
13
|
import "./Breadcrumb.vue.esm2.js";
|
|
14
14
|
import L from "./Menu.esm.js";
|
|
15
|
-
const O = { class: "
|
|
15
|
+
const O = { class: "ditari-logo" }, R = { class: "ditari-menu" }, U = { class: "ditari-layout-header" }, V = { class: "ditari-layout-header-left" }, H = { class: "ditari-user-menu" }, T = {
|
|
16
16
|
name: "DMainLayout"
|
|
17
|
-
},
|
|
18
|
-
...
|
|
19
|
-
setup(
|
|
20
|
-
const v = D(),
|
|
17
|
+
}, lt = /* @__PURE__ */ S({
|
|
18
|
+
...T,
|
|
19
|
+
setup(j) {
|
|
20
|
+
const v = D(), g = _(() => v.get), c = E(), { switchCollapsed: u } = c, i = _(() => c.getCollapsed);
|
|
21
21
|
return (p, r) => {
|
|
22
|
-
const
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
default:
|
|
26
|
-
|
|
27
|
-
collapsed:
|
|
28
|
-
"onUpdate:collapsed": r[0] || (r[0] = (
|
|
22
|
+
const k = a("a-layout-sider"), h = a("router-view"), b = a("a-layout-content"), m = a("a-layout"), C = a("a-back-top");
|
|
23
|
+
return n(), w(x, null, [
|
|
24
|
+
t(m, { class: "ditari-layout" }, {
|
|
25
|
+
default: l(() => [
|
|
26
|
+
t(k, {
|
|
27
|
+
collapsed: e(i),
|
|
28
|
+
"onUpdate:collapsed": r[0] || (r[0] = (s) => $(i) ? i.value = s : null),
|
|
29
29
|
trigger: null,
|
|
30
30
|
collapsible: "",
|
|
31
|
-
class: "
|
|
31
|
+
class: "ditari-layout-sider"
|
|
32
32
|
}, {
|
|
33
|
-
default:
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
default: l(() => [
|
|
34
|
+
o("div", O, [
|
|
35
|
+
f(p.$slots, "logo")
|
|
36
36
|
]),
|
|
37
|
-
|
|
38
|
-
e(
|
|
37
|
+
o("div", R, [
|
|
38
|
+
t(e(L))
|
|
39
39
|
])
|
|
40
40
|
]),
|
|
41
41
|
_: 3
|
|
42
42
|
}, 8, ["collapsed"]),
|
|
43
|
-
|
|
44
|
-
default:
|
|
45
|
-
|
|
46
|
-
class: "
|
|
47
|
-
style: y({ left:
|
|
43
|
+
t(m, null, {
|
|
44
|
+
default: l(() => [
|
|
45
|
+
o("div", {
|
|
46
|
+
class: "ditari-top-layout",
|
|
47
|
+
style: y({ left: e(i) ? "80px" : "200px" })
|
|
48
48
|
}, [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
class: "
|
|
49
|
+
t(F),
|
|
50
|
+
o("div", U, [
|
|
51
|
+
o("div", V, [
|
|
52
|
+
o("div", {
|
|
53
|
+
class: "ditari-side-collapsed",
|
|
54
54
|
onClick: r[1] || (r[1] = //@ts-ignore
|
|
55
|
-
(...
|
|
55
|
+
(...s) => e(u) && e(u)(...s))
|
|
56
56
|
}, [
|
|
57
|
-
|
|
57
|
+
e(i) ? (n(), d(e(B), {
|
|
58
58
|
key: 0,
|
|
59
59
|
class: "trigger",
|
|
60
60
|
style: { "font-size": "16px", "font-weight": "bold", cursor: "pointer" }
|
|
61
|
-
})) : (
|
|
61
|
+
})) : (n(), d(e(N), {
|
|
62
62
|
key: 1,
|
|
63
63
|
style: { "font-size": "16px", "font-weight": "bold", cursor: "pointer" }
|
|
64
64
|
}))
|
|
65
65
|
]),
|
|
66
|
-
|
|
66
|
+
t(K)
|
|
67
67
|
]),
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
o("div", H, [
|
|
69
|
+
f(p.$slots, "operation")
|
|
70
70
|
])
|
|
71
71
|
])
|
|
72
72
|
], 4),
|
|
73
|
-
|
|
74
|
-
class: "
|
|
75
|
-
style: y({ marginLeft:
|
|
73
|
+
t(b, {
|
|
74
|
+
class: "ditari-layout-content",
|
|
75
|
+
style: y({ marginLeft: e(i) ? "80px" : "200px" })
|
|
76
76
|
}, {
|
|
77
|
-
default:
|
|
78
|
-
|
|
79
|
-
default:
|
|
80
|
-
|
|
77
|
+
default: l(() => [
|
|
78
|
+
t(h, null, {
|
|
79
|
+
default: l(({ Component: s }) => [
|
|
80
|
+
t(A, {
|
|
81
81
|
name: "main",
|
|
82
82
|
mode: "out-in",
|
|
83
83
|
appear: ""
|
|
84
84
|
}, {
|
|
85
|
-
default:
|
|
86
|
-
(
|
|
85
|
+
default: l(() => [
|
|
86
|
+
(n(), d(M, {
|
|
87
87
|
ref: "keepAliveRef",
|
|
88
|
-
include:
|
|
88
|
+
include: e(g)
|
|
89
89
|
}, [
|
|
90
|
-
(
|
|
90
|
+
(n(), d(z(s), {
|
|
91
91
|
key: p.$route.path
|
|
92
92
|
}))
|
|
93
93
|
], 1032, ["include"]))
|
|
@@ -106,11 +106,14 @@ const O = { class: "dfb-logo" }, R = { class: "dfb-menu" }, U = { class: "dfb-la
|
|
|
106
106
|
]),
|
|
107
107
|
_: 3
|
|
108
108
|
}),
|
|
109
|
-
|
|
109
|
+
t(C, {
|
|
110
|
+
class: "ditari-ant-back-top",
|
|
111
|
+
visibilityHeight: 50
|
|
112
|
+
})
|
|
110
113
|
], 64);
|
|
111
114
|
};
|
|
112
115
|
}
|
|
113
116
|
});
|
|
114
117
|
export {
|
|
115
|
-
|
|
118
|
+
lt as default
|
|
116
119
|
};
|
|
@@ -1,26 +1,52 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import "../../store/modules/NavTab.esm.js";
|
|
8
|
-
import "../../store/modules/Settings.esm.js";
|
|
9
|
-
import "../../store/modules/User.esm.js";
|
|
10
|
-
const g = a({
|
|
1
|
+
import { defineComponent as p, ref as c, createVNode as l, resolveComponent as o, Fragment as r, h as f, createTextVNode as b, isVNode as m } from "vue";
|
|
2
|
+
import { useMenuStore as y } from "../../store/modules/Menu.esm.js";
|
|
3
|
+
function v(u) {
|
|
4
|
+
return typeof u == "function" || Object.prototype.toString.call(u) === "[object Object]" && !m(u);
|
|
5
|
+
}
|
|
6
|
+
const h = /* @__PURE__ */ p({
|
|
11
7
|
name: "DMenu",
|
|
12
8
|
setup() {
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
const {
|
|
10
|
+
list: u
|
|
11
|
+
} = y(), a = c(["/labelList", "/label"]), i = c(["/label"]), s = ({
|
|
12
|
+
item: n,
|
|
13
|
+
key: e,
|
|
14
|
+
keyPath: t
|
|
15
|
+
}) => {
|
|
16
|
+
console.log(n, e, t), a.value = t, i.value = [e];
|
|
17
|
+
}, d = (n, e) => !n || !n.length ? null : l(o("a-sub-menu"), null, {
|
|
18
|
+
title: () => e.title,
|
|
19
|
+
default: () => n.map((t) => l(o("a-menu-item"), {
|
|
20
|
+
key: t.url
|
|
21
|
+
}, {
|
|
22
|
+
default: () => [t.title]
|
|
23
|
+
}))
|
|
16
24
|
});
|
|
17
|
-
return () =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
return () => {
|
|
26
|
+
let n;
|
|
27
|
+
return l(o("a-menu"), {
|
|
28
|
+
mode: "inline",
|
|
29
|
+
openKeys: a.value,
|
|
30
|
+
"onUpdate:openKeys": (e) => a.value = e,
|
|
31
|
+
selectedKeys: i.value,
|
|
32
|
+
"onUpdate:selectedKeys": (e) => i.value = e,
|
|
33
|
+
onClick: s
|
|
34
|
+
}, v(n = u.map((e) => l(o("a-sub-menu"), {
|
|
35
|
+
key: e.url
|
|
36
|
+
}, {
|
|
37
|
+
title: () => l(r, null, [e.title]),
|
|
38
|
+
icon: () => l(r, null, [l("span", null, [e.icon ? f(o(e.icon)) : void 0])]),
|
|
39
|
+
default: () => e.children && e.children.length ? e.children.map((t) => l(r, null, [t.children ? d(t.children, e) : l(o("a-menu-item"), {
|
|
40
|
+
key: t.url
|
|
41
|
+
}, {
|
|
42
|
+
default: () => [t.title]
|
|
43
|
+
})])) : l(r, null, [b("无子标签")])
|
|
44
|
+
}))) ? n : {
|
|
45
|
+
default: () => [n]
|
|
46
|
+
});
|
|
47
|
+
};
|
|
22
48
|
}
|
|
23
49
|
});
|
|
24
50
|
export {
|
|
25
|
-
|
|
51
|
+
h as default
|
|
26
52
|
};
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { defineComponent as k, computed as K, watch as T, resolveComponent as f, openBlock as c, createElementBlock as _, createVNode as d, unref as
|
|
1
|
+
import { defineComponent as k, computed as K, watch as T, resolveComponent as f, openBlock as c, createElementBlock as _, createVNode as d, unref as i, isRef as g, withCtx as h, Fragment as N, renderList as S, createBlock as A, createElementVNode as R, normalizeClass as x, toDisplayString as B } from "vue";
|
|
2
2
|
import { useRoute as P, useRouter as q } from "vue-router";
|
|
3
3
|
import { CloseOutlined as w } from "@ant-design/icons-vue";
|
|
4
4
|
import "../../store/modules/Breadcrumb.esm.js";
|
|
5
5
|
import "../../store/modules/DataDictionary.esm.js";
|
|
6
|
-
import D from "../../store/modules/KeepAlive.esm.js";
|
|
6
|
+
import { useKeepAliveStore as D } from "../../store/modules/KeepAlive.esm.js";
|
|
7
7
|
import "../../store/modules/Menu.esm.js";
|
|
8
|
-
import E from "../../store/modules/NavTab.esm.js";
|
|
8
|
+
import { useNavTabsStore as E } from "../../store/modules/NavTab.esm.js";
|
|
9
9
|
import "../../store/modules/Settings.esm.js";
|
|
10
10
|
import "../../store/modules/User.esm.js";
|
|
11
11
|
import { storeToRefs as L } from "pinia";
|
|
12
|
-
const V = { class: "
|
|
12
|
+
const V = { class: "ditari-nav" }, z = {
|
|
13
13
|
name: "DNavTabs"
|
|
14
14
|
}, Y = /* @__PURE__ */ k({
|
|
15
15
|
...z,
|
|
16
16
|
setup(F) {
|
|
17
|
-
const
|
|
17
|
+
const o = P(), u = q(), n = E(), m = D(), r = K(() => n.getList), { activeKey: l } = L(n);
|
|
18
18
|
v(), T(
|
|
19
|
-
() =>
|
|
19
|
+
() => o.path,
|
|
20
20
|
() => {
|
|
21
21
|
v();
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
function v() {
|
|
25
|
-
n.save(
|
|
25
|
+
n.save(o), n.setActiveKey(o.path), m.save(o);
|
|
26
26
|
}
|
|
27
|
-
const b = (
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
27
|
+
const b = (s) => {
|
|
28
|
+
if (s !== o.path) {
|
|
29
|
+
const t = r.value.filter((e) => e.path === s)[0];
|
|
30
30
|
u.push({
|
|
31
|
-
path:
|
|
32
|
-
query:
|
|
33
|
-
params:
|
|
31
|
+
path: t.path,
|
|
32
|
+
query: t.query,
|
|
33
|
+
params: t.params
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
}, C = (
|
|
37
|
-
const
|
|
38
|
-
|
|
36
|
+
}, C = (s, t) => {
|
|
37
|
+
const e = r.value.filter((p) => p.path === t)[0];
|
|
38
|
+
s.stopPropagation(), n.deleteTabs(t), u.push(r.value[r.value.length - 1].fullPath), e.name && m.deleteKeepAlive(e.name);
|
|
39
39
|
};
|
|
40
|
-
return (
|
|
41
|
-
const
|
|
40
|
+
return (s, t) => {
|
|
41
|
+
const e = f("a-tab-pane"), p = f("a-tabs");
|
|
42
42
|
return c(), _("div", V, [
|
|
43
|
-
d(
|
|
44
|
-
activeKey:
|
|
45
|
-
"onUpdate:activeKey":
|
|
43
|
+
d(p, {
|
|
44
|
+
activeKey: i(l),
|
|
45
|
+
"onUpdate:activeKey": t[0] || (t[0] = (a) => g(l) ? l.value = a : null),
|
|
46
46
|
type: "card",
|
|
47
47
|
onTabClick: b
|
|
48
48
|
}, {
|
|
49
49
|
default: h(() => [
|
|
50
|
-
(c(!0), _(N, null, S(
|
|
51
|
-
key:
|
|
50
|
+
(c(!0), _(N, null, S(i(r), (a) => (c(), A(e, {
|
|
51
|
+
key: a.path
|
|
52
52
|
}, {
|
|
53
53
|
tab: h(() => [
|
|
54
54
|
R("div", {
|
|
55
|
-
class: x(["tab-item", { active:
|
|
56
|
-
}, B(
|
|
57
|
-
d(
|
|
58
|
-
onClick: (y) => C(y,
|
|
55
|
+
class: x(["tab-item", { active: i(l) === a.path }])
|
|
56
|
+
}, B(a.meta.title), 3),
|
|
57
|
+
d(i(w), {
|
|
58
|
+
onClick: (y) => C(y, a.fullPath)
|
|
59
59
|
}, null, 8, ["onClick"])
|
|
60
60
|
]),
|
|
61
61
|
_: 2
|
|
@@ -5,6 +5,11 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
5
5
|
required: false;
|
|
6
6
|
default: boolean;
|
|
7
7
|
};
|
|
8
|
+
loading: {
|
|
9
|
+
type: __PropType<boolean | undefined>;
|
|
10
|
+
required: false;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
8
13
|
}, {
|
|
9
14
|
refresh: () => void;
|
|
10
15
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -13,7 +18,13 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
13
18
|
required: false;
|
|
14
19
|
default: boolean;
|
|
15
20
|
};
|
|
21
|
+
loading: {
|
|
22
|
+
type: __PropType<boolean | undefined>;
|
|
23
|
+
required: false;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
16
26
|
}>>, {
|
|
17
27
|
close: boolean | undefined;
|
|
28
|
+
loading: boolean | undefined;
|
|
18
29
|
}>;
|
|
19
30
|
export default _sfc_main;
|
|
@@ -1,61 +1,83 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { LeftOutlined as
|
|
4
|
-
import "
|
|
5
|
-
import "../../store/modules/
|
|
6
|
-
import "../../store/modules/
|
|
7
|
-
import "
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const N = { class: "dfb-show-layout" }, C = { class: "dfb-show-content" }, V = { class: "dfb-show-footer" }, D = {
|
|
1
|
+
import { defineComponent as $, useSlots as x, watch as B, resolveComponent as c, openBlock as d, createElementBlock as p, createVNode as a, withCtx as o, normalizeClass as C, unref as u, createTextVNode as N, toDisplayString as L, renderSlot as t, createElementVNode as R, createCommentVNode as V } from "vue";
|
|
2
|
+
import { useRouter as z, useRoute as D } from "vue-router";
|
|
3
|
+
import { LeftOutlined as E } from "@ant-design/icons-vue";
|
|
4
|
+
import { useWindowScroll as I, useScrollLock as O } from "@vueuse/core";
|
|
5
|
+
import { useNavTabsStore as W } from "../../store/modules/NavTab.esm.js";
|
|
6
|
+
import { useSettingsStore as j } from "../../store/modules/Settings.esm.js";
|
|
7
|
+
import { storeToRefs as q } from "pinia";
|
|
8
|
+
const A = { class: "ditari-show-layout" }, F = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "ditari-show-footer"
|
|
11
|
+
}, G = {
|
|
13
12
|
name: "DShowLayout"
|
|
14
|
-
},
|
|
15
|
-
...
|
|
13
|
+
}, Y = /* @__PURE__ */ $({
|
|
14
|
+
...G,
|
|
16
15
|
props: {
|
|
17
|
-
close: { type: Boolean, default: !
|
|
16
|
+
close: { type: Boolean, default: !1 },
|
|
17
|
+
loading: { type: Boolean, default: !1 }
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
setup(n, { expose: f }) {
|
|
20
|
+
const r = n, s = z(), l = D(), m = x(), i = W(), h = j(), { refresh: g } = q(h), _ = {
|
|
21
|
+
padding: `10px 10px ${m.footer ? "70px" : "10px"} 10px`
|
|
22
|
+
}, y = () => {
|
|
23
|
+
r.close && i.deleteTabs(l.path), s.go(-1);
|
|
24
|
+
}, S = () => {
|
|
25
|
+
g.value = !0, i.deleteTabs(l.path), s.go(-1);
|
|
26
|
+
}, { y: v } = I(), T = O(document.body);
|
|
27
|
+
B(
|
|
28
|
+
() => r.loading,
|
|
29
|
+
(e) => {
|
|
30
|
+
T.value = e;
|
|
26
31
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
);
|
|
33
|
+
const b = 200;
|
|
34
|
+
return f({
|
|
35
|
+
refresh: S
|
|
36
|
+
}), (e, H) => {
|
|
37
|
+
const k = c("a-page-header"), w = c("a-spin");
|
|
38
|
+
return d(), p("div", A, [
|
|
39
|
+
a(w, {
|
|
40
|
+
tip: "正在处理...",
|
|
41
|
+
spinning: n.loading,
|
|
42
|
+
delay: b,
|
|
43
|
+
size: "large"
|
|
34
44
|
}, {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
default: o(() => [
|
|
46
|
+
a(k, {
|
|
47
|
+
class: C(["ditari-page-header", { active: u(v) > 0 }]),
|
|
48
|
+
ghost: !1,
|
|
49
|
+
onBack: y
|
|
50
|
+
}, {
|
|
51
|
+
backIcon: o(() => [
|
|
52
|
+
a(u(E))
|
|
53
|
+
]),
|
|
54
|
+
title: o(() => [
|
|
55
|
+
N(L(e.$route.meta.title), 1)
|
|
56
|
+
]),
|
|
57
|
+
subTitle: o(() => [
|
|
58
|
+
t(e.$slots, "subTitle")
|
|
59
|
+
]),
|
|
60
|
+
extra: o(() => [
|
|
61
|
+
t(e.$slots, "extra")
|
|
62
|
+
]),
|
|
63
|
+
_: 3
|
|
64
|
+
}, 8, ["class"]),
|
|
65
|
+
R("div", {
|
|
66
|
+
class: "ditari-show-content",
|
|
67
|
+
style: _
|
|
68
|
+
}, [
|
|
69
|
+
t(e.$slots, "default")
|
|
70
|
+
]),
|
|
71
|
+
e.$slots.footer ? (d(), p("div", F, [
|
|
72
|
+
t(e.$slots, "footer")
|
|
73
|
+
])) : V("", !0)
|
|
46
74
|
]),
|
|
47
75
|
_: 3
|
|
48
|
-
})
|
|
49
|
-
l("div", C, [
|
|
50
|
-
t(e.$slots, "default")
|
|
51
|
-
]),
|
|
52
|
-
l("div", V, [
|
|
53
|
-
t(e.$slots, "footer")
|
|
54
|
-
])
|
|
76
|
+
}, 8, ["spinning"])
|
|
55
77
|
]);
|
|
56
78
|
};
|
|
57
79
|
}
|
|
58
80
|
});
|
|
59
81
|
export {
|
|
60
|
-
|
|
82
|
+
Y as default
|
|
61
83
|
};
|
|
@@ -9,6 +9,11 @@ export declare const DShow: import("../../utils/install").SFCWithInstall<import(
|
|
|
9
9
|
required: false;
|
|
10
10
|
default: boolean;
|
|
11
11
|
};
|
|
12
|
+
loading: {
|
|
13
|
+
type: import("vue").PropType<boolean | undefined>;
|
|
14
|
+
required: false;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
12
17
|
}, {
|
|
13
18
|
refresh: () => void;
|
|
14
19
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -17,31 +22,12 @@ export declare const DShow: import("../../utils/install").SFCWithInstall<import(
|
|
|
17
22
|
required: false;
|
|
18
23
|
default: boolean;
|
|
19
24
|
};
|
|
25
|
+
loading: {
|
|
26
|
+
type: import("vue").PropType<boolean | undefined>;
|
|
27
|
+
required: false;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
20
30
|
}>>, {
|
|
21
31
|
close: boolean | undefined;
|
|
32
|
+
loading: boolean | undefined;
|
|
22
33
|
}>>;
|
|
23
|
-
declare const _default: {
|
|
24
|
-
DList: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "refresh"[], "refresh", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
|
|
25
|
-
onRefresh?: ((...args: any[]) => any) | undefined;
|
|
26
|
-
}, {}>>;
|
|
27
|
-
DMain: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
28
|
-
DNavTabs: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
29
|
-
DShow: import("../../utils/install").SFCWithInstall<import("vue").DefineComponent<{
|
|
30
|
-
close: {
|
|
31
|
-
type: import("vue").PropType<boolean | undefined>;
|
|
32
|
-
required: false;
|
|
33
|
-
default: boolean;
|
|
34
|
-
};
|
|
35
|
-
}, {
|
|
36
|
-
refresh: () => void;
|
|
37
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
|
-
close: {
|
|
39
|
-
type: import("vue").PropType<boolean | undefined>;
|
|
40
|
-
required: false;
|
|
41
|
-
default: boolean;
|
|
42
|
-
};
|
|
43
|
-
}>>, {
|
|
44
|
-
close: boolean | undefined;
|
|
45
|
-
}>>;
|
|
46
|
-
};
|
|
47
|
-
export default _default;
|
|
@@ -118,11 +118,11 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
118
118
|
}, {
|
|
119
119
|
keys: Ref<Key[]> | undefined;
|
|
120
120
|
data: any;
|
|
121
|
+
loading: false | undefined;
|
|
121
122
|
config: any;
|
|
122
123
|
bordered: boolean | undefined;
|
|
123
124
|
columns: any;
|
|
124
125
|
rowKey: string | undefined;
|
|
125
|
-
loading: false | undefined;
|
|
126
126
|
height: number;
|
|
127
127
|
pagination: any;
|
|
128
128
|
selection: "M" | "N" | "S" | undefined;
|
|
@@ -38,7 +38,7 @@ const X = {
|
|
|
38
38
|
} = s;
|
|
39
39
|
return {
|
|
40
40
|
onPageChange: (i, o) => {
|
|
41
|
-
(t === "S" || !e) && (n.value = [], f("update:keys", n.value)), l({ page: i, size: o });
|
|
41
|
+
(t === "S" || !e) && (n.value = [], f("update:keys", n.value)), l({ page: i, size: o }), z.value.scrollTop = 0;
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
}
|
|
@@ -135,7 +135,7 @@ const X = {
|
|
|
135
135
|
), O(
|
|
136
136
|
() => s.loading,
|
|
137
137
|
(e) => {
|
|
138
|
-
e && s.selection === "S" && (n.value = [], f("update:keys", n.value)), e && s.selection === "M" && !s.keepSelected && (n.value = [], f("update:keys", n.value))
|
|
138
|
+
e && s.selection === "S" && (n.value = [], f("update:keys", n.value)), e && s.selection === "M" && !s.keepSelected && (n.value = [], f("update:keys", n.value));
|
|
139
139
|
}
|
|
140
140
|
), s.height > 0 && setTimeout(() => {
|
|
141
141
|
T();
|
|
@@ -115,11 +115,11 @@ export declare const DTable: import("../../utils/install").SFCWithInstall<import
|
|
|
115
115
|
}, {
|
|
116
116
|
keys: import("vue").Ref<(string | number)[]> | undefined;
|
|
117
117
|
data: any;
|
|
118
|
+
loading: false | undefined;
|
|
118
119
|
config: any;
|
|
119
120
|
bordered: boolean | undefined;
|
|
120
121
|
columns: any;
|
|
121
122
|
rowKey: string | undefined;
|
|
122
|
-
loading: false | undefined;
|
|
123
123
|
height: number;
|
|
124
124
|
pagination: any;
|
|
125
125
|
selection: "M" | "N" | "S" | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const prefixName = "ditari-bsui";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
interface Pagination {
|
|
3
|
+
currentKey: string;
|
|
4
|
+
pageSizeKey: string;
|
|
5
|
+
totalKey: string;
|
|
6
|
+
}
|
|
7
|
+
interface Options {
|
|
8
|
+
params?: Ref;
|
|
9
|
+
pagination?: Pagination;
|
|
10
|
+
dataKey?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 请求分页数据列表
|
|
14
|
+
* @param service 请求后台服务的接口
|
|
15
|
+
* @param options 配置
|
|
16
|
+
*/
|
|
17
|
+
declare const useRequestList: (service: any, options?: Options) => {
|
|
18
|
+
data: import("vue").ComputedRef<any>;
|
|
19
|
+
pagination: import("vue").ComputedRef<{
|
|
20
|
+
total: number;
|
|
21
|
+
current: number;
|
|
22
|
+
pageSize: number;
|
|
23
|
+
}>;
|
|
24
|
+
loading: Ref<boolean>;
|
|
25
|
+
run: (...arg: any) => void;
|
|
26
|
+
onPaginationChange: (paging: any) => void;
|
|
27
|
+
onQuery: (p: any) => void;
|
|
28
|
+
};
|
|
29
|
+
export { useRequestList };
|