@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.
Files changed (158) hide show
  1. package/dist/cjs/components/components.cjs.js +1 -1
  2. package/dist/cjs/components/components.d.ts +2 -1
  3. package/dist/cjs/components/form/grid-form/GridForm.cjs.js +1 -0
  4. package/dist/cjs/components/form/grid-form/GridForm.d.ts +2 -0
  5. package/dist/cjs/components/form/index.cjs.js +1 -1
  6. package/dist/cjs/components/form/index.d.ts +8 -1
  7. package/dist/cjs/components/grid/Grid.cjs.js +1 -0
  8. package/dist/cjs/components/grid/Grid.d.ts +23 -0
  9. package/dist/cjs/components/grid/GridItem.cjs.js +1 -0
  10. package/dist/cjs/components/grid/GridItem.d.ts +2 -0
  11. package/dist/cjs/components/grid/index.cjs.js +1 -0
  12. package/dist/cjs/components/grid/index.d.ts +23 -0
  13. package/dist/cjs/components/index.cjs.js +1 -1
  14. package/dist/cjs/components/layout/Breadcrumb.vue.cjs.js +1 -1
  15. package/dist/cjs/components/layout/List.vue.cjs.js +1 -1
  16. package/dist/cjs/components/layout/Main.vue.cjs.js +1 -1
  17. package/dist/cjs/components/layout/Menu.cjs.js +1 -1
  18. package/dist/cjs/components/layout/NavTabs.vue.cjs.js +1 -1
  19. package/dist/cjs/components/layout/Show.vue.cjs.js +1 -1
  20. package/dist/cjs/components/layout/Show.vue.d.ts +11 -0
  21. package/dist/cjs/components/layout/index.d.ts +11 -25
  22. package/dist/cjs/components/table/Table.vue.cjs.js +1 -1
  23. package/dist/cjs/components/table/Table.vue.d.ts +1 -1
  24. package/dist/cjs/components/table/index.d.ts +1 -1
  25. package/dist/cjs/components/theme/index.cjs.js +1 -0
  26. package/dist/cjs/components/theme/index.d.ts +1 -0
  27. package/dist/cjs/hooks/http/index.cjs.js +1 -0
  28. package/dist/cjs/hooks/http/index.d.ts +29 -0
  29. package/dist/cjs/hooks/index.cjs.js +1 -0
  30. package/dist/cjs/hooks/index.d.ts +2 -0
  31. package/dist/cjs/hooks/route/index.cjs.js +1 -0
  32. package/dist/cjs/hooks/route/index.d.ts +9 -0
  33. package/dist/cjs/store/index.cjs.js +1 -0
  34. package/dist/cjs/store/index.d.ts +7 -7
  35. package/dist/cjs/store/modules/Breadcrumb.cjs.js +1 -1
  36. package/dist/cjs/store/modules/Breadcrumb.d.ts +6 -16
  37. package/dist/cjs/store/modules/DataDictionary.cjs.js +1 -1
  38. package/dist/cjs/store/modules/DataDictionary.d.ts +28 -3
  39. package/dist/cjs/store/modules/KeepAlive.cjs.js +1 -1
  40. package/dist/cjs/store/modules/KeepAlive.d.ts +3 -4
  41. package/dist/cjs/store/modules/Menu.cjs.js +1 -1
  42. package/dist/cjs/store/modules/Menu.d.ts +1 -2
  43. package/dist/cjs/store/modules/NavTab.cjs.js +1 -1
  44. package/dist/cjs/store/modules/NavTab.d.ts +3 -4
  45. package/dist/cjs/store/modules/Settings.cjs.js +1 -1
  46. package/dist/cjs/store/modules/Settings.d.ts +23 -9
  47. package/dist/cjs/store/modules/User.cjs.js +1 -1
  48. package/dist/cjs/store/modules/User.d.ts +1 -2
  49. package/dist/cjs/store/types.cjs.js +1 -1
  50. package/dist/cjs/utils/get.cjs.js +1 -0
  51. package/dist/css/grid/style/index.css +1 -0
  52. package/dist/css/index.css +1 -0
  53. package/dist/css/menu/style/index.css +1 -0
  54. package/dist/esm/components/components.d.ts +2 -1
  55. package/dist/esm/components/components.esm.js +10 -7
  56. package/dist/esm/components/form/grid-form/GridForm.d.ts +2 -0
  57. package/dist/esm/components/form/grid-form/GridForm.esm.js +9 -0
  58. package/dist/esm/components/form/index.d.ts +8 -1
  59. package/dist/esm/components/form/index.esm.js +5 -3
  60. package/dist/esm/components/grid/Grid.d.ts +23 -0
  61. package/dist/esm/components/grid/Grid.esm.js +55 -0
  62. package/dist/esm/components/grid/GridItem.d.ts +2 -0
  63. package/dist/esm/components/grid/GridItem.esm.js +15 -0
  64. package/dist/esm/components/grid/index.d.ts +23 -0
  65. package/dist/esm/components/grid/index.esm.js +8 -0
  66. package/dist/esm/components/index.esm.js +16 -13
  67. package/dist/esm/components/layout/Breadcrumb.vue.esm.js +13 -19
  68. package/dist/esm/components/layout/List.vue.esm.js +29 -35
  69. package/dist/esm/components/layout/Main.vue.esm.js +53 -50
  70. package/dist/esm/components/layout/Menu.esm.js +45 -19
  71. package/dist/esm/components/layout/NavTabs.vue.esm.js +27 -27
  72. package/dist/esm/components/layout/Show.vue.d.ts +11 -0
  73. package/dist/esm/components/layout/Show.vue.esm.js +70 -48
  74. package/dist/esm/components/layout/index.d.ts +11 -25
  75. package/dist/esm/components/table/Table.vue.d.ts +1 -1
  76. package/dist/esm/components/table/Table.vue.esm.js +2 -2
  77. package/dist/esm/components/table/index.d.ts +1 -1
  78. package/dist/esm/components/theme/index.d.ts +1 -0
  79. package/dist/esm/components/theme/index.esm.js +4 -0
  80. package/dist/esm/hooks/http/index.d.ts +29 -0
  81. package/dist/esm/hooks/http/index.esm.js +52 -0
  82. package/dist/esm/hooks/index.d.ts +2 -0
  83. package/dist/esm/hooks/index.esm.js +6 -0
  84. package/dist/esm/hooks/route/index.d.ts +9 -0
  85. package/dist/esm/hooks/route/index.esm.js +42 -0
  86. package/dist/esm/store/index.d.ts +7 -7
  87. package/dist/esm/store/index.esm.js +16 -0
  88. package/dist/esm/store/modules/Breadcrumb.d.ts +6 -16
  89. package/dist/esm/store/modules/Breadcrumb.esm.js +4 -12
  90. package/dist/esm/store/modules/DataDictionary.d.ts +28 -3
  91. package/dist/esm/store/modules/DataDictionary.esm.js +30 -6
  92. package/dist/esm/store/modules/KeepAlive.d.ts +3 -4
  93. package/dist/esm/store/modules/KeepAlive.esm.js +4 -4
  94. package/dist/esm/store/modules/Menu.d.ts +1 -2
  95. package/dist/esm/store/modules/Menu.esm.js +1 -1
  96. package/dist/esm/store/modules/NavTab.d.ts +3 -4
  97. package/dist/esm/store/modules/NavTab.esm.js +2 -2
  98. package/dist/esm/store/modules/Settings.d.ts +23 -9
  99. package/dist/esm/store/modules/Settings.esm.js +81 -6
  100. package/dist/esm/store/modules/User.d.ts +1 -2
  101. package/dist/esm/store/modules/User.esm.js +4 -1
  102. package/dist/esm/store/types.esm.js +4 -4
  103. package/dist/esm/style.css +1 -274
  104. package/dist/esm/utils/get.esm.js +11 -0
  105. package/dist/style/grid/style/index.scss +61 -0
  106. package/dist/style/index.scss +15 -0
  107. package/dist/style/menu/style/index.scss +18 -0
  108. package/dist/style/theme/theme.scss +1 -0
  109. package/dist/style/theme/variable.scss +21 -0
  110. package/package.json +10 -7
  111. package/src/components/components.ts +4 -0
  112. package/src/components/config/Config.vue +8 -0
  113. package/src/components/form/Form.vue +10 -0
  114. package/src/components/form/grid-form/GridForm.jsx +10 -0
  115. package/src/components/form/index.ts +8 -0
  116. package/src/components/form/style/index.less +0 -0
  117. package/src/components/grid/Grid.tsx +73 -0
  118. package/src/components/grid/GridItem.tsx +15 -0
  119. package/src/components/grid/index.md +4 -0
  120. package/src/components/grid/index.ts +7 -0
  121. package/src/components/grid/style/index.scss +61 -0
  122. package/src/components/index.scss +15 -0
  123. package/src/components/index.ts +31 -0
  124. package/src/components/layout/Breadcrumb.vue +119 -0
  125. package/src/components/layout/Header.vue +0 -0
  126. package/src/components/layout/Layout.jsx +24 -0
  127. package/src/components/layout/List.vue +159 -0
  128. package/src/components/layout/Main.vue +187 -0
  129. package/src/components/layout/Menu.jsx +96 -0
  130. package/src/components/layout/NavTabs.vue +192 -0
  131. package/src/components/layout/Show.vue +157 -0
  132. package/src/components/layout/index.ts +19 -0
  133. package/src/components/menu/Menu.jsx +94 -0
  134. package/src/components/menu/style/index.scss +18 -0
  135. package/src/components/select/Select.vue +85 -0
  136. package/src/components/table/Field.vue +49 -0
  137. package/src/components/table/Table.vue +391 -0
  138. package/src/components/table/index.md +1 -0
  139. package/src/components/table/index.ts +5 -0
  140. package/src/components/theme/index.ts +1 -0
  141. package/src/components/theme/theme.scss +1 -0
  142. package/src/components/theme/variable.scss +21 -0
  143. package/src/hooks/http/index.ts +107 -0
  144. package/src/hooks/index.ts +2 -0
  145. package/src/hooks/route/index.ts +84 -0
  146. package/src/store/index.ts +7 -0
  147. package/src/store/modules/Breadcrumb.ts +25 -0
  148. package/src/store/modules/DataDictionary.ts +49 -0
  149. package/src/store/modules/KeepAlive.ts +47 -0
  150. package/src/store/modules/Menu.ts +24 -0
  151. package/src/store/modules/NavTab.ts +81 -0
  152. package/src/store/modules/Settings.ts +120 -0
  153. package/src/store/modules/User.ts +23 -0
  154. package/src/store/types.ts +15 -0
  155. package/src/tsconfig.json +16 -0
  156. package/src/utils/get.ts +15 -0
  157. package/src/utils/index.ts +2 -0
  158. package/src/utils/install.ts +12 -0
@@ -1,93 +1,93 @@
1
- import { defineComponent as S, computed as f, resolveComponent as a, openBlock as i, createElementBlock as w, Fragment as x, createVNode as e, withCtx as s, unref as o, isRef as $, createElementVNode as t, renderSlot as _, normalizeStyle as y, createBlock as d, Transition as A, KeepAlive as M, resolveDynamicComponent as z } from "vue";
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: "dfb-logo" }, R = { class: "dfb-menu" }, U = { class: "dfb-layout-header" }, V = { class: "dfb-layout-header-left" }, T = { class: "dfb-user-menu" }, j = {
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
- }, se = /* @__PURE__ */ S({
18
- ...j,
19
- setup(q) {
20
- const v = D(), b = f(() => v.get), c = E(), { switchCollapsed: u } = c, l = f(() => c.getCollapsed);
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 g = a("a-layout-sider"), k = a("router-view"), h = a("a-layout-content"), m = a("a-layout"), C = a("a-back-top");
23
- return i(), w(x, null, [
24
- e(m, { class: "dfb-layout" }, {
25
- default: s(() => [
26
- e(g, {
27
- collapsed: o(l),
28
- "onUpdate:collapsed": r[0] || (r[0] = (n) => $(l) ? l.value = n : null),
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: "dfb-layout-sider"
31
+ class: "ditari-layout-sider"
32
32
  }, {
33
- default: s(() => [
34
- t("div", O, [
35
- _(p.$slots, "logo")
33
+ default: l(() => [
34
+ o("div", O, [
35
+ f(p.$slots, "logo")
36
36
  ]),
37
- t("div", R, [
38
- e(o(L))
37
+ o("div", R, [
38
+ t(e(L))
39
39
  ])
40
40
  ]),
41
41
  _: 3
42
42
  }, 8, ["collapsed"]),
43
- e(m, null, {
44
- default: s(() => [
45
- t("div", {
46
- class: "dfb-top-layout",
47
- style: y({ left: o(l) ? "80px" : "200px" })
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
- e(F),
50
- t("div", U, [
51
- t("div", V, [
52
- t("div", {
53
- class: "dfb-side-collapsed",
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
- (...n) => o(u) && o(u)(...n))
55
+ (...s) => e(u) && e(u)(...s))
56
56
  }, [
57
- o(l) ? (i(), d(o(B), {
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
- })) : (i(), d(o(N), {
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
- e(K)
66
+ t(K)
67
67
  ]),
68
- t("div", T, [
69
- _(p.$slots, "operation")
68
+ o("div", H, [
69
+ f(p.$slots, "operation")
70
70
  ])
71
71
  ])
72
72
  ], 4),
73
- e(h, {
74
- class: "dfb-layout-content",
75
- style: y({ marginLeft: o(l) ? "80px" : "200px" })
73
+ t(b, {
74
+ class: "ditari-layout-content",
75
+ style: y({ marginLeft: e(i) ? "80px" : "200px" })
76
76
  }, {
77
- default: s(() => [
78
- e(k, null, {
79
- default: s(({ Component: n }) => [
80
- e(A, {
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: s(() => [
86
- (i(), d(M, {
85
+ default: l(() => [
86
+ (n(), d(M, {
87
87
  ref: "keepAliveRef",
88
- include: o(b)
88
+ include: e(g)
89
89
  }, [
90
- (i(), d(z(n), {
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
- e(C)
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
- se as default
118
+ lt as default
116
119
  };
@@ -1,26 +1,52 @@
1
- import { defineComponent as a } from "vue";
2
- import { AppstoreOutlined as m } from "@ant-design/icons-vue";
3
- import "../../store/modules/Breadcrumb.esm.js";
4
- import "../../store/modules/DataDictionary.esm.js";
5
- import "../../store/modules/KeepAlive.esm.js";
6
- import c from "../../store/modules/Menu.esm.js";
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 { list: n } = c(), l = (e, t) => !e || !e.length ? null : /* @__PURE__ */ React.createElement("a-sub-menu", null, {
14
- title: () => t.title,
15
- default: () => e.map((r) => /* @__PURE__ */ React.createElement("a-menu-item", { key: r.url }, r.title))
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 () => /* @__PURE__ */ React.createElement("a-menu", { mode: "inline" }, n.map((e) => /* @__PURE__ */ React.createElement("a-sub-menu", { key: e.url }, {
18
- title: () => /* @__PURE__ */ React.createElement(React.Fragment, null, e.title),
19
- icon: () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(m, null)),
20
- default: () => e.children && e.children.length ? e.children.map((t) => /* @__PURE__ */ React.createElement(React.Fragment, null, t.children ? l(t.children, e) : /* @__PURE__ */ React.createElement("a-menu-item", { key: t.url }, t.title))) : /* @__PURE__ */ React.createElement(React.Fragment, null, "无子标签")
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
- g as default
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 p, 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";
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: "dfb-nav" }, z = {
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 a = P(), u = q(), n = E(), m = D(), s = K(() => n.getList), { activeKey: l } = L(n);
17
+ const o = P(), u = q(), n = E(), m = D(), r = K(() => n.getList), { activeKey: l } = L(n);
18
18
  v(), T(
19
- () => a.path,
19
+ () => o.path,
20
20
  () => {
21
21
  v();
22
22
  }
23
23
  );
24
24
  function v() {
25
- n.save(a), n.setActiveKey(a.path), m.save(a);
25
+ n.save(o), n.setActiveKey(o.path), m.save(o);
26
26
  }
27
- const b = (r) => {
28
- if (r !== a.path) {
29
- const e = s.value.filter((t) => t.path === r)[0];
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: e.path,
32
- query: e.query,
33
- params: e.params
31
+ path: t.path,
32
+ query: t.query,
33
+ params: t.params
34
34
  });
35
35
  }
36
- }, C = (r, e) => {
37
- const t = s.value.filter((i) => i.path === e)[0];
38
- r.stopPropagation(), n.deleteTabs(e), u.push(s.value[s.value.length - 1].fullPath), t.name && m.deleteKeepAlive(t.name);
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 (r, e) => {
41
- const t = f("a-tab-pane"), i = f("a-tabs");
40
+ return (s, t) => {
41
+ const e = f("a-tab-pane"), p = f("a-tabs");
42
42
  return c(), _("div", V, [
43
- d(i, {
44
- activeKey: p(l),
45
- "onUpdate:activeKey": e[0] || (e[0] = (o) => g(l) ? l.value = o : null),
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(p(s), (o) => (c(), A(t, {
51
- key: o.path
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: p(l) === o.path }])
56
- }, B(o.meta.title), 3),
57
- d(p(w), {
58
- onClick: (y) => C(y, o.fullPath)
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 h, resolveComponent as _, openBlock as b, createElementBlock as g, createVNode as n, withCtx as o, unref as S, createTextVNode as T, toDisplayString as v, renderSlot as t, createElementVNode as l } from "vue";
2
- import { useRouter as w, useRoute as R } from "vue-router";
3
- import { LeftOutlined as $ } from "@ant-design/icons-vue";
4
- import "../../store/modules/Breadcrumb.esm.js";
5
- import "../../store/modules/DataDictionary.esm.js";
6
- import "../../store/modules/KeepAlive.esm.js";
7
- import "../../store/modules/Menu.esm.js";
8
- import k from "../../store/modules/NavTab.esm.js";
9
- import y from "../../store/modules/Settings.esm.js";
10
- import "../../store/modules/User.esm.js";
11
- import { storeToRefs as B } from "pinia";
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
- }, K = /* @__PURE__ */ h({
15
- ...D,
13
+ }, Y = /* @__PURE__ */ $({
14
+ ...G,
16
15
  props: {
17
- close: { type: Boolean, default: !0 }
16
+ close: { type: Boolean, default: !1 },
17
+ loading: { type: Boolean, default: !1 }
18
18
  },
19
- setup(c, { expose: i }) {
20
- const p = c, s = w(), r = R(), a = k(), f = y(), { refresh: d } = B(f), m = () => {
21
- p.close && a.deleteTabs(r.path), s.go(-1);
22
- };
23
- return i({
24
- refresh: () => {
25
- d.value = !0, a.deleteTabs(r.path), s.go(-1);
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
- }), (e, L) => {
28
- const u = _("a-page-header");
29
- return b(), g("div", N, [
30
- n(u, {
31
- class: "dfb-page-header",
32
- onBack: m,
33
- ghost: !1
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
- backIcon: o(() => [
36
- n(S($))
37
- ]),
38
- title: o(() => [
39
- T(v(e.$route.meta.title), 1)
40
- ]),
41
- subTitle: o(() => [
42
- t(e.$slots, "subTitle")
43
- ]),
44
- extra: o(() => [
45
- t(e.$slots, "extra")
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
- K as default
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)), z.value.scrollTop = 0;
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,4 @@
1
+ const i = "ditari-bsui";
2
+ export {
3
+ i as prefixName
4
+ };
@@ -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 };