@aplus-frontend/ui 0.1.31 → 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 (89) hide show
  1. package/es/index.mjs +77 -72
  2. package/es/src/ap-button/ap-action-button.vue.d.ts +43 -0
  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.mjs +52 -50
  6. package/es/src/ap-button/index.d.ts +2 -1
  7. package/es/src/ap-button/index.mjs +1 -0
  8. package/es/src/ap-button/interface.d.ts +1 -0
  9. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +43 -45
  10. package/es/src/ap-descriptions/formatter/index.d.ts +2 -2
  11. package/es/src/ap-descriptions/helper.d.ts +19 -1
  12. package/es/src/ap-descriptions/helper.mjs +22 -12
  13. package/es/src/ap-descriptions/style/ap-descriptions.css +1 -5
  14. package/es/src/ap-download/ap-download.vue.mjs +51 -40
  15. package/es/src/ap-download/utils/getFileInfo.d.ts +4 -1
  16. package/es/src/ap-download/utils/getFileInfo.mjs +51 -26
  17. package/es/src/business/ap-attachment/ApAttachment.mjs +76 -68
  18. package/es/src/business/ap-card/ApCard.vue.d.ts +27 -0
  19. package/es/src/business/ap-card/ApCard.vue.mjs +4 -0
  20. package/es/src/business/ap-card/ApCard.vue2.mjs +60 -0
  21. package/es/src/business/ap-card/index.css +10 -0
  22. package/es/src/business/ap-card/interface.d.ts +9 -0
  23. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +59 -70
  24. package/es/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
  25. package/es/src/business/ap-export-group/handleExportDownload.mjs +14 -0
  26. package/es/src/business/index.d.ts +52 -1
  27. package/es/src/business/index.mjs +28 -23
  28. package/es/src/config-provider/config-provider-props.d.ts +5 -1
  29. package/es/src/config-provider/config-provider-props.mjs +6 -2
  30. package/es/src/config-provider/config-provider.d.ts +10 -1
  31. package/es/src/config-provider/config-provider.mjs +20 -19
  32. package/es/src/config-provider/constants.d.ts +9 -0
  33. package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
  34. package/es/src/config-provider/index.d.ts +20 -1
  35. package/es/src/editable-table/interface.d.ts +3 -2
  36. package/es/src/index.mjs +215 -210
  37. package/es/src/theme/ap-card/ap-card.css +10 -0
  38. package/es/src/theme/ap-descriptions/ap-descriptions.css +1 -5
  39. package/es/src/theme/css-var/index.mjs +33 -15
  40. package/lib/index.js +1 -1
  41. package/lib/src/ap-button/ap-action-button.vue.d.ts +43 -0
  42. package/lib/src/ap-button/ap-action-button.vue.js +1 -0
  43. package/lib/src/ap-button/ap-action-button.vue2.js +1 -0
  44. package/lib/src/ap-button/ap-button.vue.js +1 -1
  45. package/lib/src/ap-button/index.d.ts +2 -1
  46. package/lib/src/ap-button/index.js +1 -1
  47. package/lib/src/ap-button/interface.d.ts +1 -0
  48. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  49. package/lib/src/ap-descriptions/formatter/index.d.ts +2 -2
  50. package/lib/src/ap-descriptions/helper.d.ts +19 -1
  51. package/lib/src/ap-descriptions/helper.js +1 -1
  52. package/lib/src/ap-descriptions/style/ap-descriptions.css +1 -5
  53. package/lib/src/ap-download/ap-download.vue.js +1 -1
  54. package/lib/src/ap-download/utils/getFileInfo.d.ts +4 -1
  55. package/lib/src/ap-download/utils/getFileInfo.js +1 -1
  56. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  57. package/lib/src/business/ap-card/ApCard.vue.d.ts +27 -0
  58. package/lib/src/business/ap-card/ApCard.vue.js +1 -0
  59. package/lib/src/business/ap-card/ApCard.vue2.js +1 -0
  60. package/lib/src/business/ap-card/index.css +10 -0
  61. package/lib/src/business/ap-card/interface.d.ts +9 -0
  62. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  63. package/lib/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
  64. package/lib/src/business/ap-export-group/handleExportDownload.js +1 -0
  65. package/lib/src/business/index.d.ts +52 -1
  66. package/lib/src/business/index.js +1 -1
  67. package/lib/src/config-provider/config-provider-props.d.ts +5 -1
  68. package/lib/src/config-provider/config-provider-props.js +1 -1
  69. package/lib/src/config-provider/config-provider.d.ts +10 -1
  70. package/lib/src/config-provider/config-provider.js +1 -1
  71. package/lib/src/config-provider/constants.d.ts +9 -0
  72. package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
  73. package/lib/src/config-provider/index.d.ts +20 -1
  74. package/lib/src/editable-table/interface.d.ts +3 -2
  75. package/lib/src/index.js +1 -1
  76. package/lib/src/theme/ap-card/ap-card.css +10 -0
  77. package/lib/src/theme/ap-descriptions/ap-descriptions.css +1 -5
  78. package/lib/src/theme/css-var/index.js +1 -1
  79. package/package.json +1 -1
  80. /package/es/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
  81. /package/es/src/business/{title → ap-title}/ApTitle.vue.mjs +0 -0
  82. /package/es/src/business/{title → ap-title}/ApTitle.vue2.mjs +0 -0
  83. /package/es/src/business/{title → ap-title}/interface.d.ts +0 -0
  84. /package/es/src/business/{title → ap-title}/style.css +0 -0
  85. /package/lib/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
  86. /package/lib/src/business/{title → ap-title}/ApTitle.vue.js +0 -0
  87. /package/lib/src/business/{title → ap-title}/ApTitle.vue2.js +0 -0
  88. /package/lib/src/business/{title → ap-title}/interface.d.ts +0 -0
  89. /package/lib/src/business/{title → ap-title}/style.css +0 -0
@@ -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 R, computed as c, ref as T, openBlock as y, createBlock as p, unref as o, normalizeClass as I, withCtx as l, createVNode as x, createTextVNode as b, toDisplayString as h, normalizeStyle as V, createCommentVNode as q } from "vue";
2
- import { formatFileNameAndDownloadFile as z } from "@aplus-frontend/utils";
3
- import { DownOutlined as O } from "@ant-design/icons-vue";
4
- import { Modal as j, Dropdown as J, Menu as H, MenuItem as F, Button as Q } 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 U } from "@aplus-frontend/hooks";
8
- import { useNamespace as W } from "../../config-provider/hooks/use-namespace.mjs";
9
- import { useLocale as X } from "../../config-provider/hooks/use-locale.mjs";
10
- import { useGlobalConfig as Y } from "../../config-provider/hooks/use-global-config.mjs";
11
- const ue = /* @__PURE__ */ R({
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,74 +22,63 @@ const ue = /* @__PURE__ */ R({
22
22
  getInitialParams: { type: Function },
23
23
  beforeRequest: { type: Function }
24
24
  },
25
- setup(A) {
26
- const { hasPermission: L } = U(), e = A, { b: G } = W("ap-export-group"), { t: i } = X(), M = Y("uiMode"), k = c(() => {
27
- const a = {
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
+ const o = {
28
28
  aplus: "#0070FF",
29
29
  admin: "#34b77c"
30
30
  };
31
- return w.value ? "" : a[M.value] || a.aplus;
32
- }), w = c(() => !!(e != null && e.disabled)), N = {
31
+ return b.value ? "" : o[S.value] || o.aplus;
32
+ }), b = r(() => !!(e != null && e.disabled)), A = {
33
33
  textAlign: "center"
34
- }, s = T(!1), g = c(() => (e == null ? void 0 : e.selectedRowKeys) || []), P = c(() => {
35
- let a = e == null ? void 0 : e.ifShow;
36
- return !(e != null && e.ifShow) && (e != null && e.auth) && (a = () => L(e.auth)), (a == null ? void 0 : a()) ?? !0;
34
+ }, d = P(!1), w = r(() => (e == null ? void 0 : e.selectedRowKeys) || []), F = r(() => {
35
+ let o = e == null ? void 0 : e.ifShow;
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 B({ key: a }) {
39
- var v, E, S, _, C;
40
- const { getRequestParams: r, request: n } = e || {};
41
- let m = {};
42
- a === d.SELECT ? m = {
43
- [(e == null ? void 0 : e.idKey) || "ids"]: g.value
44
- } : a === d.ALL && (m = (r == null ? void 0 : r()) || {});
45
- const D = ((v = e == null ? void 0 : e.getInitialParams) == null ? void 0 : v.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
- ...D
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 t = await (n == null ? void 0 : n(u));
54
- if (toString.call(t == null ? void 0 : t.data) !== "[object Blob]")
55
- return;
56
- t != null && t.headers && !((S = t == null ? void 0 : t.headers) != null && S["content-disposition"]) ? (C = (_ = t == null ? void 0 : t.data) == null ? void 0 : _.text()) == null || C.then((K) => {
57
- const f = JSON.parse(K || "{}");
58
- f.code && f.code !== "200" && j.error({
59
- title: i("ap.apExportGroup.exportError"),
60
- content: f.message,
61
- centered: !0
62
- });
63
- }) : z(t);
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)));
64
53
  } finally {
65
- s.value = !1;
54
+ d.value = !1;
66
55
  }
67
56
  }
68
- return (a, r) => P.value ? (y(), p(o(J), {
57
+ return (o, l) => F.value ? (m(), f(t(N), {
69
58
  key: 0,
70
- class: I([o(G)()]),
71
- overlayStyle: N,
72
- disabled: w.value
59
+ class: D([t(E)()]),
60
+ overlayStyle: A,
61
+ disabled: b.value
73
62
  }, {
74
- overlay: l(() => [
75
- x(o(H), { onClick: B }, {
76
- default: l(() => {
77
- var n;
63
+ overlay: n(() => [
64
+ y(t(T), { onClick: k }, {
65
+ default: n(() => {
66
+ var a;
78
67
  return [
79
- (y(), p(o(F), {
80
- key: o(d).SELECT,
81
- disabled: ((n = g.value) == null ? void 0 : n.length) === 0
68
+ (m(), f(t(_), {
69
+ key: t(u).SELECT,
70
+ disabled: ((a = w.value) == null ? void 0 : a.length) === 0
82
71
  }, {
83
- default: l(() => [
84
- b(h(o(i)("ap.apExportGroup.exportSelected")), 1)
72
+ default: n(() => [
73
+ x(p(t(c)("ap.apExportGroup.exportSelected")), 1)
85
74
  ]),
86
75
  _: 1
87
76
  }, 8, ["disabled"])),
88
- (y(), p(o(F), {
89
- key: o(d).ALL
77
+ (m(), f(t(_), {
78
+ key: t(u).ALL
90
79
  }, {
91
- default: l(() => [
92
- b(h(o(i)("ap.apExportGroup.exportAll")), 1)
80
+ default: n(() => [
81
+ x(p(t(c)("ap.apExportGroup.exportAll")), 1)
93
82
  ]),
94
83
  _: 1
95
84
  }))
@@ -98,24 +87,24 @@ const ue = /* @__PURE__ */ R({
98
87
  _: 1
99
88
  })
100
89
  ]),
101
- default: l(() => [
102
- x(o(Q), {
103
- style: V({
104
- color: k.value
90
+ default: n(() => [
91
+ y(t(I), {
92
+ style: K({
93
+ color: L.value
105
94
  }),
106
- loading: s.value
95
+ loading: d.value
107
96
  }, {
108
- default: l(() => [
109
- b(h((e == null ? void 0 : e.text) ?? o(i)("ap.apExportGroup.export")) + " ", 1),
110
- x(o(O))
97
+ default: n(() => [
98
+ x(p((e == null ? void 0 : e.text) ?? t(c)("ap.apExportGroup.export")) + " ", 1),
99
+ y(t(B))
111
100
  ]),
112
101
  _: 1
113
102
  }, 8, ["style", "loading"])
114
103
  ]),
115
104
  _: 1
116
- }, 8, ["class", "disabled"])) : q("", !0);
105
+ }, 8, ["class", "disabled"])) : R("", !0);
117
106
  }
118
107
  });
119
108
  export {
120
- ue as default
109
+ te as default
121
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
+ };
@@ -19,8 +19,9 @@ import { PresetColorType } from 'ant-design-vue/es/_util/colors';
19
19
  import { AlignType, BuildInPlacements } from 'ant-design-vue/es/vc-trigger/interface';
20
20
  import { ApLadderSlots } from './ap-ladder/interface';
21
21
  import { AttachmentItemProps, ApAttachmentProps } from './ap-attachment';
22
+ import { ApCardTitleProps } from './ap-card/interface';
22
23
  export * from './hooks/index';
23
- export type { ApTitleProps } from './title/interface';
24
+ export type { ApTitleProps } from './ap-title/interface';
24
25
  export type { ApExpandAlertProps } from './ap-expand-alert/interface';
25
26
  export type { ApLabelProps, ApLabelGroupProps, ApLabelGroupItemProps } from './ap-label/interface';
26
27
  export type { ApStatusProps, ApStatusGroupProps, ApStatusGroupItemProps } from './ap-status/interface';
@@ -30,6 +31,7 @@ export type { ApExportGroupProps } from './ap-export-group/interface';
30
31
  export type { ApLadderProps, ApLadderLabelValue, CurrencyCode, TooltipNeedProps } from './ap-ladder/interface';
31
32
  export * from './ap-batch-action-group/interface';
32
33
  export type { AttachmentItemProps, ApAttachmentProps } from './ap-attachment';
34
+ export * from './ap-export-group/handleExportDownload';
33
35
  export declare const ApTitle: {
34
36
  new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
35
37
  title: {
@@ -2798,5 +2800,54 @@ export declare const ApAttachment: DefineComponent<{
2798
2800
  attachmentList: AttachmentItemProps[];
2799
2801
  fileMorePopoverPlacement: TooltipPlacement;
2800
2802
  }, {}>;
2803
+ export declare const ApCard: {
2804
+ new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
2805
+ titleProps: {
2806
+ type: PropType<ApCardTitleProps>;
2807
+ };
2808
+ padding: {
2809
+ type: PropType<string>;
2810
+ };
2811
+ }>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
2812
+ titleProps: {
2813
+ type: PropType<ApCardTitleProps>;
2814
+ };
2815
+ padding: {
2816
+ type: PropType<string>;
2817
+ };
2818
+ }>>, {}, true, {}, {}, {
2819
+ P: {};
2820
+ B: {};
2821
+ D: {};
2822
+ C: {};
2823
+ M: {};
2824
+ Defaults: {};
2825
+ }, Readonly< ExtractPropTypes<{
2826
+ titleProps: {
2827
+ type: PropType<ApCardTitleProps>;
2828
+ };
2829
+ padding: {
2830
+ type: PropType<string>;
2831
+ };
2832
+ }>>, {}, {}, {}, {}, {}>;
2833
+ __isFragment?: never;
2834
+ __isTeleport?: never;
2835
+ __isSuspense?: never;
2836
+ } & ComponentOptionsBase<Readonly< ExtractPropTypes<{
2837
+ titleProps: {
2838
+ type: PropType<ApCardTitleProps>;
2839
+ };
2840
+ padding: {
2841
+ type: PropType<string>;
2842
+ };
2843
+ }>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
2844
+ $slots: {
2845
+ default?(_: {}): any;
2846
+ };
2847
+ }) & ( Plugin & (new (...args: any[]) => {
2848
+ $props: {
2849
+ onClick?: () => void;
2850
+ };
2851
+ }));
2801
2852
  export { ApTransformDataHelper };
2802
2853
  export * from './ap-table-modal';
@@ -1,9 +1,9 @@
1
1
  import { withInstall as o } from "@aplus-frontend/utils";
2
2
  import "./hooks/index.mjs";
3
- import "./title/ApTitle.vue.mjs";
3
+ import "./ap-title/ApTitle.vue.mjs";
4
4
  import "./ap-expand-alert/ApExpandAlert.vue.mjs";
5
5
  import t from "./ap-label/ApLabel.mjs";
6
- import m from "./ap-label/ApLabelGroup.mjs";
6
+ import r from "./ap-label/ApLabelGroup.mjs";
7
7
  import "./ap-status/ApStatus.vue.mjs";
8
8
  import "./ap-status/ApStatusGroup.vue.mjs";
9
9
  import "./ap-select-layout/select-layout.vue.mjs";
@@ -13,11 +13,13 @@ import "./ap-batch-action/ApBatchAction.vue.mjs";
13
13
  import "./ap-batch-action-group/ApBatchActionGroup.vue.mjs";
14
14
  import "./ap-image/ApImage.vue.mjs";
15
15
  import "./ap-ladder/ApLadder.vue.mjs";
16
- import p from "./ap-attachment/ApAttachment.mjs";
17
- import { ApTransformDataHelper as io } from "../utils/ap-trans-data/index.mjs";
16
+ import m from "./ap-attachment/ApAttachment.mjs";
17
+ import "./ap-card/ApCard.vue.mjs";
18
+ import { ApTransformDataHelper as fo } from "../utils/ap-trans-data/index.mjs";
18
19
  import "./ap-batch-action-group/interface.mjs";
19
- import { default as no } from "./ap-table-modal/index.mjs";
20
- import r from "./title/ApTitle.vue2.mjs";
20
+ import { handleExportDownload as _o } from "./ap-export-group/handleExportDownload.mjs";
21
+ import { default as eo } from "./ap-table-modal/index.mjs";
22
+ import p from "./ap-title/ApTitle.vue2.mjs";
21
23
  import i from "./ap-expand-alert/ApExpandAlert.vue2.mjs";
22
24
  import a from "./ap-status/ApStatus.vue2.mjs";
23
25
  import n from "./ap-status/ApStatusGroup.vue2.mjs";
@@ -28,22 +30,25 @@ import _ from "./ap-batch-action/ApBatchAction.vue2.mjs";
28
30
  import A from "./ap-batch-action-group/ApBatchActionGroup.vue2.mjs";
29
31
  import e from "./ap-image/ApImage.vue2.mjs";
30
32
  import l from "./ap-ladder/ApLadder.vue2.mjs";
31
- const K = o(r), N = i, O = o(t), P = o(a), Q = o(n), U = o(c), V = o(f), W = s, X = _, Y = m, Z = A, oo = e, to = o(l), mo = p;
33
+ import $ from "./ap-card/ApCard.vue2.mjs";
34
+ const P = o(p), Q = i, U = o(t), V = o(a), W = o(n), X = o(c), Y = o(f), Z = s, oo = _, to = r, ro = A, mo = e, po = o(l), io = m, ao = o($);
32
35
  export {
33
- mo as ApAttachment,
34
- X as ApBatchAction,
35
- Z as ApBatchActionGroup,
36
- N as ApExpandAlert,
37
- V as ApExportGroup,
38
- oo as ApImage,
39
- W as ApInputRadio,
40
- O as ApLabel,
41
- Y as ApLabelGroup,
42
- to as ApLadder,
43
- U as ApSelectLayout,
44
- P as ApStatus,
45
- Q as ApStatusGroup,
46
- no as ApTableModal,
47
- K as ApTitle,
48
- io as ApTransformDataHelper
36
+ io as ApAttachment,
37
+ oo as ApBatchAction,
38
+ ro as ApBatchActionGroup,
39
+ ao as ApCard,
40
+ Q as ApExpandAlert,
41
+ Y as ApExportGroup,
42
+ mo as ApImage,
43
+ Z as ApInputRadio,
44
+ U as ApLabel,
45
+ to as ApLabelGroup,
46
+ po as ApLadder,
47
+ X as ApSelectLayout,
48
+ V as ApStatus,
49
+ W as ApStatusGroup,
50
+ eo as ApTableModal,
51
+ P as ApTitle,
52
+ fo as ApTransformDataHelper,
53
+ _o as handleExportDownload
49
54
  };