@aplus-frontend/ui 0.1.30 → 0.1.32

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 (120) hide show
  1. package/es/index.mjs +153 -145
  2. package/es/src/{business/ap-action-button/ApActionButton.vue.d.ts → ap-button/ap-action-button.vue.d.ts} +3 -3
  3. package/es/src/ap-button/ap-action-button.vue.mjs +43 -0
  4. package/es/src/ap-button/ap-action-button.vue2.mjs +4 -0
  5. package/es/src/ap-button/ap-button.vue.d.ts +48 -0
  6. package/es/src/ap-button/ap-button.vue.mjs +118 -0
  7. package/es/src/ap-button/ap-button.vue2.mjs +4 -0
  8. package/es/src/ap-button/index.d.ts +4 -0
  9. package/es/src/ap-button/index.mjs +3 -0
  10. package/es/src/{business/ap-action-button → ap-button}/interface.d.ts +3 -1
  11. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +43 -45
  12. package/es/src/ap-descriptions/formatter/index.d.ts +2 -2
  13. package/es/src/ap-descriptions/helper.d.ts +19 -1
  14. package/es/src/ap-descriptions/helper.mjs +22 -12
  15. package/es/src/ap-descriptions/style/ap-descriptions.css +1 -5
  16. package/es/src/ap-download/ap-download.vue.mjs +51 -40
  17. package/es/src/ap-download/utils/getFileInfo.d.ts +4 -1
  18. package/es/src/ap-download/utils/getFileInfo.mjs +51 -26
  19. package/es/src/ap-form/dependency/index.vue.d.ts +28 -0
  20. package/es/src/ap-form/dependency/index.vue.mjs +37 -0
  21. package/es/src/ap-form/dependency/index.vue2.mjs +4 -0
  22. package/es/src/ap-form/index.d.ts +3 -1
  23. package/es/src/ap-form/index.mjs +10 -6
  24. package/es/src/ap-form/interface.d.ts +3 -0
  25. package/es/src/business/ap-attachment/ApAttachment.mjs +76 -68
  26. package/es/src/business/ap-card/ApCard.vue.d.ts +27 -0
  27. package/es/src/business/ap-card/ApCard.vue.mjs +4 -0
  28. package/es/src/business/ap-card/ApCard.vue2.mjs +60 -0
  29. package/es/src/business/ap-card/index.css +10 -0
  30. package/es/src/business/ap-card/interface.d.ts +9 -0
  31. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +56 -65
  32. package/es/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
  33. package/es/src/business/ap-export-group/handleExportDownload.mjs +14 -0
  34. package/es/src/business/hooks/useTableRefresh.d.ts +1 -1
  35. package/es/src/business/hooks/useTableRefresh.mjs +1 -1
  36. package/es/src/business/index.d.ts +21 -235
  37. package/es/src/business/index.mjs +30 -29
  38. package/es/src/config-provider/config-provider-props.d.ts +5 -1
  39. package/es/src/config-provider/config-provider-props.mjs +6 -2
  40. package/es/src/config-provider/config-provider.d.ts +10 -1
  41. package/es/src/config-provider/config-provider.mjs +20 -19
  42. package/es/src/config-provider/constants.d.ts +9 -0
  43. package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
  44. package/es/src/config-provider/index.d.ts +20 -1
  45. package/es/src/editable-table/interface.d.ts +3 -2
  46. package/es/src/index.d.ts +1 -0
  47. package/es/src/index.mjs +274 -265
  48. package/es/src/theme/ap-card/ap-card.css +10 -0
  49. package/es/src/theme/ap-descriptions/ap-descriptions.css +1 -5
  50. package/es/src/theme/css-var/index.mjs +33 -15
  51. package/lib/index.js +1 -1
  52. package/lib/src/{business/ap-action-button/ApActionButton.vue.d.ts → ap-button/ap-action-button.vue.d.ts} +3 -3
  53. package/lib/src/ap-button/ap-action-button.vue.js +1 -0
  54. package/lib/src/ap-button/ap-action-button.vue2.js +1 -0
  55. package/lib/src/ap-button/ap-button.vue.d.ts +48 -0
  56. package/lib/src/ap-button/ap-button.vue.js +1 -0
  57. package/lib/src/ap-button/ap-button.vue2.js +1 -0
  58. package/lib/src/ap-button/index.d.ts +4 -0
  59. package/lib/src/ap-button/index.js +1 -0
  60. package/lib/src/{business/ap-action-button → ap-button}/interface.d.ts +3 -1
  61. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  62. package/lib/src/ap-descriptions/formatter/index.d.ts +2 -2
  63. package/lib/src/ap-descriptions/helper.d.ts +19 -1
  64. package/lib/src/ap-descriptions/helper.js +1 -1
  65. package/lib/src/ap-descriptions/style/ap-descriptions.css +1 -5
  66. package/lib/src/ap-download/ap-download.vue.js +1 -1
  67. package/lib/src/ap-download/utils/getFileInfo.d.ts +4 -1
  68. package/lib/src/ap-download/utils/getFileInfo.js +1 -1
  69. package/lib/src/ap-form/dependency/index.vue.d.ts +28 -0
  70. package/lib/src/ap-form/dependency/index.vue.js +1 -0
  71. package/lib/src/ap-form/dependency/index.vue2.js +1 -0
  72. package/lib/src/ap-form/index.d.ts +3 -1
  73. package/lib/src/ap-form/index.js +1 -1
  74. package/lib/src/ap-form/interface.d.ts +3 -0
  75. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  76. package/lib/src/business/ap-card/ApCard.vue.d.ts +27 -0
  77. package/lib/src/business/{ap-action-button/ApActionButton.vue.js → ap-card/ApCard.vue.js} +1 -1
  78. package/lib/src/business/ap-card/ApCard.vue2.js +1 -0
  79. package/lib/src/business/ap-card/index.css +10 -0
  80. package/lib/src/business/ap-card/interface.d.ts +9 -0
  81. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  82. package/lib/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
  83. package/lib/src/business/ap-export-group/handleExportDownload.js +1 -0
  84. package/lib/src/business/hooks/useTableRefresh.d.ts +1 -1
  85. package/lib/src/business/hooks/useTableRefresh.js +1 -1
  86. package/lib/src/business/index.d.ts +21 -235
  87. package/lib/src/business/index.js +1 -1
  88. package/lib/src/config-provider/config-provider-props.d.ts +5 -1
  89. package/lib/src/config-provider/config-provider-props.js +1 -1
  90. package/lib/src/config-provider/config-provider.d.ts +10 -1
  91. package/lib/src/config-provider/config-provider.js +1 -1
  92. package/lib/src/config-provider/constants.d.ts +9 -0
  93. package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
  94. package/lib/src/config-provider/index.d.ts +20 -1
  95. package/lib/src/editable-table/interface.d.ts +3 -2
  96. package/lib/src/index.d.ts +1 -0
  97. package/lib/src/index.js +1 -1
  98. package/lib/src/theme/ap-card/ap-card.css +10 -0
  99. package/lib/src/theme/ap-descriptions/ap-descriptions.css +1 -5
  100. package/lib/src/theme/css-var/index.js +1 -1
  101. package/package.json +1 -1
  102. package/es/src/business/ap-action-button/ApActionButton.vue.mjs +0 -4
  103. package/es/src/business/ap-action-button/ApActionButton.vue2.mjs +0 -97
  104. package/lib/src/business/ap-action-button/ApActionButton.vue2.js +0 -1
  105. /package/es/src/{business/ap-action-button → ap-button}/index.css +0 -0
  106. /package/es/src/{business/ap-action-button → ap-button}/interface.mjs +0 -0
  107. /package/es/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
  108. /package/es/src/business/{title → ap-title}/ApTitle.vue.mjs +0 -0
  109. /package/es/src/business/{title → ap-title}/ApTitle.vue2.mjs +0 -0
  110. /package/es/src/business/{title → ap-title}/interface.d.ts +0 -0
  111. /package/es/src/business/{title → ap-title}/style.css +0 -0
  112. /package/es/src/theme/{ap-action-button/ap-action-button.css → ap-button/ap-button.css} +0 -0
  113. /package/lib/src/{business/ap-action-button → ap-button}/index.css +0 -0
  114. /package/lib/src/{business/ap-action-button → ap-button}/interface.js +0 -0
  115. /package/lib/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
  116. /package/lib/src/business/{title → ap-title}/ApTitle.vue.js +0 -0
  117. /package/lib/src/business/{title → ap-title}/ApTitle.vue2.js +0 -0
  118. /package/lib/src/business/{title → ap-title}/interface.d.ts +0 -0
  119. /package/lib/src/business/{title → ap-title}/style.css +0 -0
  120. /package/lib/src/theme/{ap-action-button/ap-action-button.css → ap-button/ap-button.css} +0 -0
@@ -0,0 +1,37 @@
1
+ import { defineComponent as p, ref as m, watchEffect as y, unref as _, renderSlot as g } from "vue";
2
+ import { useInjectForm as h } from "../context.mjs";
3
+ import { isArray as V, isNumber as d, cloneDeep as b } from "lodash-unified";
4
+ const A = /* @__PURE__ */ p({
5
+ __name: "index",
6
+ props: {
7
+ nameList: {}
8
+ },
9
+ setup(u) {
10
+ function a(t, s) {
11
+ return V(s) ? s.reduce((o, e) => o == null ? void 0 : o[e], t) : t == null ? void 0 : t[s];
12
+ }
13
+ const c = u, {
14
+ model: i
15
+ } = h(), f = m({});
16
+ function l(t, s, o) {
17
+ let e = s;
18
+ for (let r = 0; r < t.length; r++) {
19
+ const n = t[r];
20
+ r === t.length - 1 ? e[n] = o : (d(n) ? (Array.isArray(e) || (e[n] = []), e[n] || (e[n] = {})) : (typeof e[n] != "object" || e[n] === null) && (e[n] = {}), e = e[n]);
21
+ }
22
+ }
23
+ return y(() => {
24
+ const t = b(f.value);
25
+ for (const s of c.nameList) {
26
+ const o = [s].flat(1), e = a(_(i), o);
27
+ l(o, t, e);
28
+ }
29
+ f.value = t;
30
+ }), (t, s) => g(t.$slots, "default", {
31
+ values: f.value
32
+ });
33
+ }
34
+ });
35
+ export {
36
+ A as default
37
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -5,6 +5,7 @@ import { default as ApFormList } from './ap-form-list.vue';
5
5
  import { default as ApFormSearchForm } from './search-form/index.vue';
6
6
  import { default as ApFormModalForm } from './modal-form/index.vue';
7
7
  import { default as useWatch } from './hooks/use-watch';
8
+ import { default as ApFormDependency } from './dependency/index.vue';
8
9
  type ApFormMixedProps = typeof _ApForm & {
9
10
  FormItem: typeof ApFormItem;
10
11
  FormItemGroup: typeof ApFormItemGroup;
@@ -12,8 +13,9 @@ type ApFormMixedProps = typeof _ApForm & {
12
13
  SearchForm: typeof ApFormSearchForm;
13
14
  ModalForm: typeof ApFormModalForm;
14
15
  useWatch: typeof useWatch;
16
+ Dependency: typeof ApFormDependency;
15
17
  };
16
18
  declare const ApForm: ApFormMixedProps;
17
19
  export * from './items';
18
20
  export * from './interface';
19
- export { ApForm, ApFormItem, ApFormItemGroup, ApFormList, ApFormSearchForm, ApFormModalForm };
21
+ export { ApForm, ApFormItem, ApFormItemGroup, ApFormList, ApFormSearchForm, ApFormModalForm, ApFormDependency };
@@ -5,25 +5,29 @@ import "./ap-form-list.vue2.mjs";
5
5
  import "./search-form/index.vue2.mjs";
6
6
  import "./modal-form/index.vue2.mjs";
7
7
  import o from "./hooks/use-watch.mjs";
8
+ import "./dependency/index.vue2.mjs";
8
9
  import "./items/index.mjs";
9
10
  import "./interface.mjs";
10
11
  import r from "./ap-form.vue2.mjs";
11
- import t from "./ap-form-item.vue.mjs";
12
- import p from "./ap-form-item-group/index.vue.mjs";
12
+ import p from "./ap-form-item.vue.mjs";
13
+ import t from "./ap-form-item-group/index.vue.mjs";
13
14
  import i from "./ap-form-list.vue.mjs";
14
15
  import a from "./search-form/index.vue.mjs";
15
16
  import s from "./modal-form/index.vue.mjs";
17
+ import e from "./dependency/index.vue.mjs";
16
18
  const m = r;
17
- m.FormItem = t;
18
- m.FormItemGroup = p;
19
+ m.FormItem = p;
20
+ m.FormItemGroup = t;
19
21
  m.FormList = i;
20
22
  m.SearchForm = a;
21
23
  m.ModalForm = s;
22
24
  m.useWatch = o;
25
+ m.Dependency = e;
23
26
  export {
24
27
  m as ApForm,
25
- t as ApFormItem,
26
- p as ApFormItemGroup,
28
+ e as ApFormDependency,
29
+ p as ApFormItem,
30
+ t as ApFormItemGroup,
27
31
  i as ApFormList,
28
32
  s as ApFormModalForm,
29
33
  a as ApFormSearchForm
@@ -126,3 +126,6 @@ export type ApFormItemSlots = {
126
126
  extra: any;
127
127
  default(): VNode[];
128
128
  };
129
+ export type ApFormDependencyProps = {
130
+ nameList: NamePath[];
131
+ };
@@ -1,105 +1,113 @@
1
- import { defineComponent as S, ref as A, useSlots as V, computed as o, cloneVNode as z, unref as I, toRaw as f, createVNode as l, createTextVNode as M } from "vue";
2
- import { Tooltip as U, Popover as _ } from "ant-design-vue";
1
+ import { defineComponent as _, ref as w, useSlots as j, computed as n, cloneVNode as B, toRaw as v, unref as G, createVNode as l, createTextVNode as H } from "vue";
2
+ import { Tooltip as R, Popover as W } from "ant-design-vue";
3
3
  import "../../config-provider/index.mjs";
4
- import { ApAttachmentProps as B } from "./constans.mjs";
5
- import { getHexWithOpacity as G, getFileInfo as H } from "../../ap-download/utils/getFileInfo.mjs";
4
+ import { ApAttachmentProps as q } from "./constans.mjs";
5
+ import { getHexWithOpacity as D, getFileInfo as y } from "../../ap-download/utils/getFileInfo.mjs";
6
6
  import "./style.css";
7
- import { useOssInit as R } from "../../ap-download/hooks/index.mjs";
8
- import { isArray as W } from "lodash-unified";
9
- import { LoadingOutlined as v } from "@ant-design/icons-vue";
10
- import { useNamespace as j } from "../../config-provider/hooks/use-namespace.mjs";
11
- import { useGlobalConfig as y } from "../../config-provider/hooks/use-global-config.mjs";
12
- import { useLocale as q } from "../../config-provider/hooks/use-locale.mjs";
13
- const at = /* @__PURE__ */ S({
7
+ import { useOssInit as E } from "../../ap-download/hooks/index.mjs";
8
+ import { isArray as J } from "lodash-unified";
9
+ import { LoadingOutlined as g } from "@ant-design/icons-vue";
10
+ import { useNamespace as K } from "../../config-provider/hooks/use-namespace.mjs";
11
+ import { useGlobalConfig as p } from "../../config-provider/hooks/use-global-config.mjs";
12
+ import { useLocale as Q } from "../../config-provider/hooks/use-locale.mjs";
13
+ const se = /* @__PURE__ */ _({
14
14
  name: "ApAttachment",
15
- props: B(),
16
- setup(t) {
15
+ props: q(),
16
+ setup(e) {
17
17
  const {
18
- b: L,
18
+ b: O,
19
19
  e: a
20
- } = j("ap-attachment"), w = y("uiMode"), C = y("apUpload"), {
21
- lang: F,
22
- t: r
23
- } = q(), c = A(!1), s = A(""), m = V(), N = o(() => F.value === "zh-cn" ? "zh_CN" : "en_US"), u = o(() => t.attachmentList.length === 1), p = o(() => t.attachmentList.length > 0 ? t.attachmentList[0].fileName : ""), O = o(() => u.value ? p.value : r("ap.apAttachment.downloadall")), h = o(() => t.color ? t.color : w.value === "aplus" ? "#0070FF" : "#1890FF"), T = o(() => ({
24
- width: u.value ? "auto" : "266px"
25
- })), g = o(() => ({
26
- "--download-main-color": h.value,
27
- "--download-main-color-opacity": G(h.value, 0.6)
28
- })), b = o(() => {
29
- var e;
30
- return t.getOssAccess || ((e = C.value) == null ? void 0 : e.getOssAccess);
31
- }), x = o(() => {
32
- const e = m.default ? m.default()[0] : null;
33
- return e ? z(e, {
20
+ } = K("ap-attachment"), T = p("uiMode"), b = p("apUpload"), h = p("downloadCenterTriggerConfig"), {
21
+ lang: x,
22
+ t: m
23
+ } = Q(), i = w(!1), c = w(""), d = j(), P = n(() => x.value === "zh-cn" ? "zh_CN" : "en_US"), r = n(() => e.attachmentList.length === 1), A = n(() => e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), k = n(() => r.value ? A.value : m("ap.apAttachment.downloadall")), C = n(() => e.color ? e.color : T.value === "aplus" ? "#0070FF" : "#1890FF"), S = n(() => ({
24
+ width: r.value ? "auto" : "266px"
25
+ })), L = n(() => ({
26
+ "--download-main-color": C.value,
27
+ "--download-main-color-opacity": D(C.value, 0.6)
28
+ })), V = n(() => {
29
+ var t;
30
+ return e.getOssAccess || ((t = b.value) == null ? void 0 : t.getOssAccess);
31
+ }), z = n(() => {
32
+ const t = d.default ? d.default()[0] : null;
33
+ return t ? B(t, {
34
34
  style: {
35
35
  "font-size": "16px"
36
36
  }
37
37
  }) : null;
38
- }), d = async (e, i) => {
39
- if (!t.disabled) {
40
- c.value = !0, i && (s.value = i);
38
+ }), f = async (t, s) => {
39
+ var o, N;
40
+ if (!e.disabled) {
41
+ i.value = !0, s && (c.value = s);
41
42
  try {
42
- const n = await R(b.value, I(N)), k = W(f(e)) ? f(e) : [f(e)];
43
- await n.downloadFile(H(t.needName, k));
44
- } catch (n) {
45
- console.error(n);
43
+ const u = J(v(t)) ? v(t) : [v(t)];
44
+ if ((o = h.value) != null && o.trigger) {
45
+ const U = y(e.needName, u).map((F) => ({
46
+ objectName: F.path,
47
+ fileName: F.fileName
48
+ }));
49
+ (N = h.value) == null || N.trigger(U);
50
+ } else
51
+ await (await E(V.value, G(P))).downloadFile(y(e.needName, u));
52
+ } catch (u) {
53
+ console.error(u);
46
54
  } finally {
47
- c.value = !1, s.value = "";
55
+ i.value = !1, c.value = "";
48
56
  }
49
57
  }
50
- }, P = (e) => e && e.length > 0 ? l("ul", {
58
+ }, I = (t) => t && t.length > 0 ? l("ul", {
51
59
  class: [a("file-list")],
52
- style: g.value
53
- }, [e.map((i, n) => l("li", {
54
- key: n,
60
+ style: L.value
61
+ }, [t.map((s, o) => l("li", {
62
+ key: o,
55
63
  class: [a("file-item")],
56
- onClick: () => d(i, n + 1)
57
- }, [c.value && s.value === n + 1 ? l("span", {
64
+ onClick: () => f(s, o + 1)
65
+ }, [i.value && c.value === o + 1 ? l("span", {
58
66
  class: [a("spin")]
59
- }, [l(v, {
67
+ }, [l(g, {
60
68
  spin: !0
61
- }, null)]) : null, i.fileName])), l("li", {
69
+ }, null)]) : null, s.fileName])), l("li", {
62
70
  class: [a("down-load-all")],
63
- onClick: () => d(t.attachmentList, "all")
64
- }, [c.value && s.value === "all" ? l("span", {
71
+ onClick: () => f(e.attachmentList, "all")
72
+ }, [i.value && c.value === "all" ? l("span", {
65
73
  class: [a("spin")]
66
- }, [l(v, {
74
+ }, [l(g, {
67
75
  spin: !0
68
- }, null)]) : null, r("ap.apAttachment.downloadall")])]) : null;
76
+ }, null)]) : null, m("ap.apAttachment.downloadall")])]) : null;
69
77
  return () => {
70
- var e;
71
- return ((e = t.attachmentList) == null ? void 0 : e.length) > 0 && l("div", {
72
- class: [L()],
73
- style: [T.value, g.value]
74
- }, [l(U, {
75
- title: O.value,
76
- placement: t.textToolTipPlacement,
77
- color: t.toolTipBgColor
78
+ var t;
79
+ return ((t = e.attachmentList) == null ? void 0 : t.length) > 0 && l("div", {
80
+ class: [O()],
81
+ style: [S.value, L.value]
82
+ }, [l(R, {
83
+ title: k.value,
84
+ placement: e.textToolTipPlacement,
85
+ color: e.toolTipBgColor
78
86
  }, {
79
87
  default: () => [l("div", {
80
88
  class: [a("content")],
81
- onClick: () => d(u.value ? t.attachmentList[0] : t.attachmentList, "global")
82
- }, [c.value && s.value === "global" ? l("div", {
89
+ onClick: () => f(r.value ? e.attachmentList[0] : e.attachmentList, "global")
90
+ }, [i.value && c.value === "global" ? l("div", {
83
91
  class: [a("spin")]
84
- }, [l(v, {
92
+ }, [l(g, {
85
93
  spin: !0
86
- }, null)]) : null, m.default ? l("div", {
94
+ }, null)]) : null, d.default ? l("div", {
87
95
  class: [a("text-render")]
88
- }, [x.value, M(" ")]) : null, l("div", {
96
+ }, [z.value, H(" ")]) : null, l("div", {
89
97
  class: [a("text-inner")]
90
- }, [p.value])])]
91
- }), l(_, {
92
- content: P(t.attachmentList),
93
- placement: t.fileMorePopoverPlacement,
98
+ }, [A.value])])]
99
+ }), l(W, {
100
+ content: I(e.attachmentList),
101
+ placement: e.fileMorePopoverPlacement,
94
102
  color: "#fff"
95
103
  }, {
96
- default: () => [!u.value && l("div", {
104
+ default: () => [!r.value && l("div", {
97
105
  class: [a("more")]
98
- }, [r("ap.apAttachment.more")])]
106
+ }, [m("ap.apAttachment.more")])]
99
107
  })]);
100
108
  };
101
109
  }
102
110
  });
103
111
  export {
104
- at as default
112
+ se as default
105
113
  };
@@ -0,0 +1,27 @@
1
+ import { ApCardProps } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ declare function __VLS_template(): {
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ attrs: Partial<{}>;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: DefineComponent<__VLS_TypePropsToOption<ApCardProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<ApCardProps>>>, {}, {}>;
12
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
+ export default _default;
14
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
15
+ type __VLS_TypePropsToOption<T> = {
16
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
17
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
18
+ } : {
19
+ type: PropType<T[K]>;
20
+ required: true;
21
+ };
22
+ };
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ApCard.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,60 @@
1
+ import { defineComponent as v, computed as c, openBlock as t, createElementBlock as r, normalizeClass as g, unref as d, normalizeStyle as C, createBlock as a, mergeProps as h, createSlots as S, withCtx as u, isVNode as x, resolveDynamicComponent as P, toDisplayString as _, createCommentVNode as B, renderSlot as N } from "vue";
2
+ import "./index.css";
3
+ import "../ap-title/ApTitle.vue.mjs";
4
+ import { omit as $ } from "lodash-unified";
5
+ import "../../config-provider/index.mjs";
6
+ import { useNamespace as z } from "../../config-provider/hooks/use-namespace.mjs";
7
+ import D from "../ap-title/ApTitle.vue2.mjs";
8
+ const V = { key: 1 }, b = { key: 1 }, I = /* @__PURE__ */ v({
9
+ __name: "ApCard",
10
+ props: {
11
+ titleProps: {},
12
+ padding: {}
13
+ },
14
+ setup(p) {
15
+ const e = p, { b: s } = z("ap-card"), n = c(
16
+ () => $((e == null ? void 0 : e.titleProps) || {}, ["prefix", "suffix"])
17
+ ), y = c(() => e.padding ?? (n.value ? "14px 24px 24px" : "24px"));
18
+ return (k, w) => {
19
+ var f, m;
20
+ return t(), r("div", {
21
+ class: g([d(s)()]),
22
+ style: C({
23
+ padding: y.value
24
+ })
25
+ }, [
26
+ n.value ? (t(), a(D, h({
27
+ key: 0,
28
+ class: [`${d(s)()}-title`]
29
+ }, {
30
+ ...n.value
31
+ }), S({ _: 2 }, [
32
+ (f = e == null ? void 0 : e.titleProps) != null && f.suffix ? {
33
+ name: "suffix",
34
+ fn: u(() => {
35
+ var i, o, l;
36
+ return [
37
+ x((i = e == null ? void 0 : e.titleProps) == null ? void 0 : i.suffix) ? (t(), a(P((o = e == null ? void 0 : e.titleProps) == null ? void 0 : o.suffix), { key: 0 })) : (t(), r("div", V, _((l = e == null ? void 0 : e.titleProps) == null ? void 0 : l.suffix), 1))
38
+ ];
39
+ }),
40
+ key: "0"
41
+ } : void 0,
42
+ (m = e == null ? void 0 : e.titleProps) != null && m.prefix ? {
43
+ name: "prefix",
44
+ fn: u(() => {
45
+ var i, o, l;
46
+ return [
47
+ x((i = e == null ? void 0 : e.titleProps) == null ? void 0 : i.prefix) ? (t(), a(P((o = e == null ? void 0 : e.titleProps) == null ? void 0 : o.prefix), { key: 0 })) : (t(), r("div", b, _((l = e == null ? void 0 : e.titleProps) == null ? void 0 : l.prefix), 1))
48
+ ];
49
+ }),
50
+ key: "1"
51
+ } : void 0
52
+ ]), 1040, ["class"])) : B("", !0),
53
+ N(k.$slots, "default")
54
+ ], 6);
55
+ };
56
+ }
57
+ });
58
+ export {
59
+ I as default
60
+ };
@@ -0,0 +1,10 @@
1
+ .aplus-ap-card {
2
+ width: 100%;
3
+ background: #fff;
4
+ }
5
+ .aplus-ap-card + .aplus-ap-card {
6
+ margin-top: 10px;
7
+ }
8
+ .aplus-ap-card-title {
9
+ margin-bottom: 14px;
10
+ }
@@ -0,0 +1,9 @@
1
+ import { ApTitleProps } from '../ap-title/interface';
2
+ export type ApCardTitleProps = Partial<ApTitleProps> & {
3
+ prefix?: any;
4
+ suffix?: any;
5
+ };
6
+ export interface ApCardProps {
7
+ titleProps?: ApCardTitleProps;
8
+ padding?: string;
9
+ }
@@ -1,14 +1,14 @@
1
- import { defineComponent as K, computed as c, ref as R, openBlock as y, createBlock as p, unref as t, normalizeClass as B, withCtx as l, createVNode as x, createTextVNode as b, toDisplayString as h, normalizeStyle as T, createCommentVNode as I } from "vue";
2
- import { formatFileNameAndDownloadFile as V } from "@aplus-frontend/utils";
3
- import { DownOutlined as q } from "@ant-design/icons-vue";
4
- import { Modal as z, Dropdown as O, Menu as J, MenuItem as C, Button as j } from "ant-design-vue";
1
+ import { defineComponent as M, computed as r, ref as P, openBlock as m, createBlock as f, unref as t, normalizeClass as D, withCtx as n, createVNode as y, createTextVNode as x, toDisplayString as p, normalizeStyle as K, createCommentVNode as R } from "vue";
2
+ import { DownOutlined as B } from "@ant-design/icons-vue";
3
+ import { Dropdown as N, Menu as T, MenuItem as _, Button as I } from "ant-design-vue";
5
4
  import "../../config-provider/index.mjs";
6
- import { ApExportGroupActionType as d } from "./interface.mjs";
7
- import { usePermission as H } from "@aplus-frontend/hooks";
8
- import { useNamespace as Q } from "../../config-provider/hooks/use-namespace.mjs";
9
- import { useLocale as U } from "../../config-provider/hooks/use-locale.mjs";
10
- import { useGlobalConfig as W } from "../../config-provider/hooks/use-global-config.mjs";
11
- const re = /* @__PURE__ */ K({
5
+ import { ApExportGroupActionType as u } from "./interface.mjs";
6
+ import { usePermission as V } from "@aplus-frontend/hooks";
7
+ import { handleExportDownload as q } from "./handleExportDownload.mjs";
8
+ import { useNamespace as z } from "../../config-provider/hooks/use-namespace.mjs";
9
+ import { useLocale as O } from "../../config-provider/hooks/use-locale.mjs";
10
+ import { useGlobalConfig as j } from "../../config-provider/hooks/use-global-config.mjs";
11
+ const te = /* @__PURE__ */ M({
12
12
  __name: "ApExportGroup",
13
13
  props: {
14
14
  selectedRowKeys: {},
@@ -22,72 +22,63 @@ const re = /* @__PURE__ */ K({
22
22
  getInitialParams: { type: Function },
23
23
  beforeRequest: { type: Function }
24
24
  },
25
- setup(S) {
26
- const { hasPermission: F } = H(), e = S, { b: A } = Q("ap-export-group"), { t: r } = U(), L = W("uiMode"), G = c(() => {
25
+ setup(g) {
26
+ const { hasPermission: C } = V(), e = g, { b: E } = z("ap-export-group"), { t: c } = O(), S = j("uiMode"), L = r(() => {
27
27
  const o = {
28
28
  aplus: "#0070FF",
29
29
  admin: "#34b77c"
30
30
  };
31
- return w.value ? "" : o[L.value] || o.aplus;
32
- }), w = c(() => !!(e != null && e.disabled)), M = {
31
+ return b.value ? "" : o[S.value] || o.aplus;
32
+ }), b = r(() => !!(e != null && e.disabled)), A = {
33
33
  textAlign: "center"
34
- }, s = R(!1), v = c(() => (e == null ? void 0 : e.selectedRowKeys) || []), k = c(() => {
34
+ }, d = P(!1), w = r(() => (e == null ? void 0 : e.selectedRowKeys) || []), F = r(() => {
35
35
  let o = e == null ? void 0 : e.ifShow;
36
- return !(e != null && e.ifShow) && (e != null && e.auth) && (o = () => F(e.auth)), (o == null ? void 0 : o()) ?? !0;
36
+ return !(e != null && e.ifShow) && (e != null && e.auth) && (o = () => C(e.auth)), (o == null ? void 0 : o()) ?? !0;
37
37
  });
38
- async function N({ key: o }) {
39
- var g, E, _;
40
- const { getRequestParams: i, request: a } = e || {};
41
- let m = {};
42
- o === d.SELECT ? m = {
43
- [(e == null ? void 0 : e.idKey) || "ids"]: v.value
44
- } : o === d.ALL && (m = (i == null ? void 0 : i()) || {});
45
- const P = ((g = e == null ? void 0 : e.getInitialParams) == null ? void 0 : g.call(e)) || {};
38
+ async function k({ key: o }) {
39
+ var h, v;
40
+ const { getRequestParams: l, request: a } = e || {};
41
+ let s = {};
42
+ o === u.SELECT ? s = {
43
+ [(e == null ? void 0 : e.idKey) || "ids"]: w.value
44
+ } : o === u.ALL && (s = (l == null ? void 0 : l()) || {});
45
+ const G = ((h = e == null ? void 0 : e.getInitialParams) == null ? void 0 : h.call(e)) || {};
46
46
  try {
47
- s.value = !0;
48
- let u = {
49
- ...m,
50
- ...P
47
+ d.value = !0;
48
+ let i = {
49
+ ...s,
50
+ ...G
51
51
  };
52
- u = ((E = e == null ? void 0 : e.beforeRequest) == null ? void 0 : E.call(e, u)) || u;
53
- const n = await (a == null ? void 0 : a(u));
54
- n.headers && !((_ = n == null ? void 0 : n.headers) != null && _["content-disposition"]) ? n.data.text().then((D) => {
55
- const f = JSON.parse(D || "{}");
56
- f.code && f.code !== "200" && z.error({
57
- title: r("ap.apExportGroup.exportError"),
58
- content: f.message,
59
- centered: !0
60
- });
61
- }) : V(n);
52
+ i = ((v = e == null ? void 0 : e.beforeRequest) == null ? void 0 : v.call(e, i)) || i, await q(async () => await (a == null ? void 0 : a(i)));
62
53
  } finally {
63
- s.value = !1;
54
+ d.value = !1;
64
55
  }
65
56
  }
66
- return (o, i) => k.value ? (y(), p(t(O), {
57
+ return (o, l) => F.value ? (m(), f(t(N), {
67
58
  key: 0,
68
- class: B([t(A)()]),
69
- overlayStyle: M,
70
- disabled: w.value
59
+ class: D([t(E)()]),
60
+ overlayStyle: A,
61
+ disabled: b.value
71
62
  }, {
72
- overlay: l(() => [
73
- x(t(J), { onClick: N }, {
74
- default: l(() => {
63
+ overlay: n(() => [
64
+ y(t(T), { onClick: k }, {
65
+ default: n(() => {
75
66
  var a;
76
67
  return [
77
- (y(), p(t(C), {
78
- key: t(d).SELECT,
79
- disabled: ((a = v.value) == null ? void 0 : a.length) === 0
68
+ (m(), f(t(_), {
69
+ key: t(u).SELECT,
70
+ disabled: ((a = w.value) == null ? void 0 : a.length) === 0
80
71
  }, {
81
- default: l(() => [
82
- b(h(t(r)("ap.apExportGroup.exportSelected")), 1)
72
+ default: n(() => [
73
+ x(p(t(c)("ap.apExportGroup.exportSelected")), 1)
83
74
  ]),
84
75
  _: 1
85
76
  }, 8, ["disabled"])),
86
- (y(), p(t(C), {
87
- key: t(d).ALL
77
+ (m(), f(t(_), {
78
+ key: t(u).ALL
88
79
  }, {
89
- default: l(() => [
90
- b(h(t(r)("ap.apExportGroup.exportAll")), 1)
80
+ default: n(() => [
81
+ x(p(t(c)("ap.apExportGroup.exportAll")), 1)
91
82
  ]),
92
83
  _: 1
93
84
  }))
@@ -96,24 +87,24 @@ const re = /* @__PURE__ */ K({
96
87
  _: 1
97
88
  })
98
89
  ]),
99
- default: l(() => [
100
- x(t(j), {
101
- style: T({
102
- color: G.value
90
+ default: n(() => [
91
+ y(t(I), {
92
+ style: K({
93
+ color: L.value
103
94
  }),
104
- loading: s.value
95
+ loading: d.value
105
96
  }, {
106
- default: l(() => [
107
- b(h((e == null ? void 0 : e.text) ?? t(r)("ap.apExportGroup.export")) + " ", 1),
108
- x(t(q))
97
+ default: n(() => [
98
+ x(p((e == null ? void 0 : e.text) ?? t(c)("ap.apExportGroup.export")) + " ", 1),
99
+ y(t(B))
109
100
  ]),
110
101
  _: 1
111
102
  }, 8, ["style", "loading"])
112
103
  ]),
113
104
  _: 1
114
- }, 8, ["class", "disabled"])) : I("", !0);
105
+ }, 8, ["class", "disabled"])) : R("", !0);
115
106
  }
116
107
  });
117
108
  export {
118
- re as default
109
+ te as default
119
110
  };
@@ -0,0 +1 @@
1
+ export declare function handleExportDownload(request?: () => Promise<any> | undefined): Promise<void>;
@@ -0,0 +1,14 @@
1
+ import { formatFileNameAndDownloadFile as n } from "@aplus-frontend/utils";
2
+ import { Modal as r } from "ant-design-vue";
3
+ async function i(t) {
4
+ const o = await (t == null ? void 0 : t());
5
+ Object.prototype.toString.call(o == null ? void 0 : o.data) === "[object Blob]" && n(o).catch((a) => {
6
+ r.error({
7
+ title: a,
8
+ centered: !0
9
+ });
10
+ });
11
+ }
12
+ export {
13
+ i as handleExportDownload
14
+ };
@@ -8,7 +8,7 @@ export interface UseTableRefreshOption {
8
8
  /**
9
9
  * 刷新类型,reset:重置,submit:提交
10
10
  */
11
- refreskType?: 'reset' | 'submit';
11
+ refreshType?: 'reset' | 'submit';
12
12
  /**
13
13
  * 刷新前执行,返回false则不执行
14
14
  */
@@ -1,6 +1,6 @@
1
1
  import { onMounted as c, nextTick as l, onActivated as T } from "vue";
2
2
  function m(e) {
3
- const a = (["reset", "submit", void 0].includes(e == null ? void 0 : e.refreskType) ? e == null ? void 0 : e.refreskType : "submit") ?? "submit", r = (e == null ? void 0 : e.refreshBefore) ?? (() => !0);
3
+ const a = (["reset", "submit", void 0].includes(e == null ? void 0 : e.refreshType) ? e == null ? void 0 : e.refreshType : "submit") ?? "submit", r = (e == null ? void 0 : e.refreshBefore) ?? (() => !0);
4
4
  let s = !0;
5
5
  c(() => {
6
6
  l(() => {