@aplus-frontend/ui 0.1.31 → 0.1.33

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 (179) 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/ap-form/ap-form-item.vue.d.ts +1 -1
  18. package/es/src/ap-form/ap-form-item.vue.mjs +68 -62
  19. package/es/src/ap-form/ap-form-list.vue.mjs +23 -21
  20. package/es/src/ap-form/ap-form.vue.d.ts +3 -1
  21. package/es/src/ap-form/ap-form.vue2.mjs +130 -80
  22. package/es/src/ap-form/interface.d.ts +51 -1
  23. package/es/src/ap-form/items/checkbox/index.vue.mjs +6 -5
  24. package/es/src/ap-form/items/date/index.vue.mjs +10 -9
  25. package/es/src/ap-form/items/date-range/index.vue.mjs +8 -7
  26. package/es/src/ap-form/items/number/index.vue.mjs +12 -11
  27. package/es/src/ap-form/items/radio/index.vue.mjs +5 -4
  28. package/es/src/ap-form/items/select/index.vue.mjs +1 -0
  29. package/es/src/ap-form/items/switch/index.vue.mjs +10 -9
  30. package/es/src/ap-form/items/text/index.vue2.mjs +1 -0
  31. package/es/src/ap-form/items/text/password.vue.mjs +1 -0
  32. package/es/src/ap-form/items/text-area/index.vue.mjs +7 -6
  33. package/es/src/ap-form/modal-form/index.vue.d.ts +7 -3
  34. package/es/src/ap-form/search-form/index.vue.d.ts +7 -3
  35. package/es/src/ap-form/utils/get.d.ts +1 -0
  36. package/es/src/ap-form/utils/get.mjs +12 -0
  37. package/es/src/ap-form/utils/set.d.ts +6 -0
  38. package/es/src/ap-form/utils/set.mjs +41 -0
  39. package/es/src/ap-list/index.vue.d.ts +3 -0
  40. package/es/src/ap-list/index.vue.mjs +51 -49
  41. package/es/src/ap-table/ap-table.vue.d.ts +4 -1
  42. package/es/src/ap-table/ap-table.vue.mjs +65 -59
  43. package/es/src/ap-table/constants.d.ts +121 -1
  44. package/es/src/ap-table/interface.d.ts +6 -1
  45. package/es/src/ap-table/utils.d.ts +121 -1
  46. package/es/src/business/ap-attachment/ApAttachment.mjs +76 -68
  47. package/es/src/business/ap-card/ApCard.vue.d.ts +27 -0
  48. package/es/src/business/ap-card/ApCard.vue.mjs +4 -0
  49. package/es/src/business/ap-card/ApCard.vue2.mjs +65 -0
  50. package/es/src/business/ap-card/index.css +10 -0
  51. package/es/src/business/ap-card/interface.d.ts +9 -0
  52. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +30 -100
  53. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +104 -64
  54. package/es/src/business/ap-expand-alert/interface.d.ts +24 -6
  55. package/es/src/business/ap-expand-alert/style.css +9 -0
  56. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +59 -70
  57. package/es/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
  58. package/es/src/business/ap-export-group/handleExportDownload.mjs +14 -0
  59. package/es/src/business/{title → ap-title}/style.css +4 -4
  60. package/es/src/business/hooks/usePageListApTable.d.ts +2 -0
  61. package/es/src/business/index.d.ts +105 -188
  62. package/es/src/business/index.mjs +28 -23
  63. package/es/src/check-card/group.vue.d.ts +7 -1
  64. package/es/src/check-card/group.vue.mjs +26 -22
  65. package/es/src/check-card/index.vue.d.ts +5 -2
  66. package/es/src/check-card/index.vue2.mjs +69 -60
  67. package/es/src/check-card/interface.d.ts +12 -0
  68. package/es/src/check-card/style/index.css +8 -5
  69. package/es/src/config-provider/config-provider-props.d.ts +5 -1
  70. package/es/src/config-provider/config-provider-props.mjs +6 -2
  71. package/es/src/config-provider/config-provider.d.ts +10 -1
  72. package/es/src/config-provider/config-provider.mjs +20 -19
  73. package/es/src/config-provider/constants.d.ts +9 -0
  74. package/es/src/config-provider/hooks/use-global-config.d.ts +5 -1
  75. package/es/src/config-provider/index.d.ts +20 -1
  76. package/es/src/editable-table/interface.d.ts +3 -2
  77. package/es/src/index.mjs +215 -210
  78. package/es/src/locale/lang/en.mjs +4 -0
  79. package/es/src/locale/lang/zh-cn.mjs +4 -0
  80. package/es/src/theme/ap-card/ap-card.css +10 -0
  81. package/es/src/theme/ap-descriptions/ap-descriptions.css +1 -5
  82. package/es/src/theme/ap-expand-alert/ap-expand-alert.css +9 -0
  83. package/es/src/theme/ap-title/ap-title.css +4 -4
  84. package/es/src/theme/check-card/index.css +8 -5
  85. package/es/src/theme/css-var/index.mjs +33 -15
  86. package/lib/index.js +1 -1
  87. package/lib/src/ap-button/ap-action-button.vue.d.ts +43 -0
  88. package/lib/src/ap-button/ap-action-button.vue.js +1 -0
  89. package/lib/src/ap-button/ap-action-button.vue2.js +1 -0
  90. package/lib/src/ap-button/ap-button.vue.js +1 -1
  91. package/lib/src/ap-button/index.d.ts +2 -1
  92. package/lib/src/ap-button/index.js +1 -1
  93. package/lib/src/ap-button/interface.d.ts +1 -0
  94. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  95. package/lib/src/ap-descriptions/formatter/index.d.ts +2 -2
  96. package/lib/src/ap-descriptions/helper.d.ts +19 -1
  97. package/lib/src/ap-descriptions/helper.js +1 -1
  98. package/lib/src/ap-descriptions/style/ap-descriptions.css +1 -5
  99. package/lib/src/ap-download/ap-download.vue.js +1 -1
  100. package/lib/src/ap-download/utils/getFileInfo.d.ts +4 -1
  101. package/lib/src/ap-download/utils/getFileInfo.js +1 -1
  102. package/lib/src/ap-form/ap-form-item.vue.d.ts +1 -1
  103. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  104. package/lib/src/ap-form/ap-form-list.vue.js +1 -1
  105. package/lib/src/ap-form/ap-form.vue.d.ts +3 -1
  106. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  107. package/lib/src/ap-form/interface.d.ts +51 -1
  108. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  109. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  110. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  111. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  112. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  113. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  114. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  115. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  116. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  117. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  118. package/lib/src/ap-form/modal-form/index.vue.d.ts +7 -3
  119. package/lib/src/ap-form/search-form/index.vue.d.ts +7 -3
  120. package/lib/src/ap-form/utils/get.d.ts +1 -0
  121. package/lib/src/ap-form/utils/get.js +1 -0
  122. package/lib/src/ap-form/utils/set.d.ts +6 -0
  123. package/lib/src/ap-form/utils/set.js +1 -0
  124. package/lib/src/ap-list/index.vue.d.ts +3 -0
  125. package/lib/src/ap-list/index.vue.js +1 -1
  126. package/lib/src/ap-table/ap-table.vue.d.ts +4 -1
  127. package/lib/src/ap-table/ap-table.vue.js +1 -1
  128. package/lib/src/ap-table/constants.d.ts +121 -1
  129. package/lib/src/ap-table/interface.d.ts +6 -1
  130. package/lib/src/ap-table/utils.d.ts +121 -1
  131. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  132. package/lib/src/business/ap-card/ApCard.vue.d.ts +27 -0
  133. package/lib/src/business/ap-card/ApCard.vue.js +1 -0
  134. package/lib/src/business/ap-card/ApCard.vue2.js +1 -0
  135. package/lib/src/business/ap-card/index.css +10 -0
  136. package/lib/src/business/ap-card/interface.d.ts +9 -0
  137. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +30 -100
  138. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  139. package/lib/src/business/ap-expand-alert/interface.d.ts +24 -6
  140. package/lib/src/business/ap-expand-alert/style.css +9 -0
  141. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  142. package/lib/src/business/ap-export-group/handleExportDownload.d.ts +1 -0
  143. package/lib/src/business/ap-export-group/handleExportDownload.js +1 -0
  144. package/lib/src/business/{title → ap-title}/style.css +4 -4
  145. package/lib/src/business/hooks/usePageListApTable.d.ts +2 -0
  146. package/lib/src/business/index.d.ts +105 -188
  147. package/lib/src/business/index.js +1 -1
  148. package/lib/src/check-card/group.vue.d.ts +7 -1
  149. package/lib/src/check-card/group.vue.js +1 -1
  150. package/lib/src/check-card/index.vue.d.ts +5 -2
  151. package/lib/src/check-card/index.vue2.js +1 -1
  152. package/lib/src/check-card/interface.d.ts +12 -0
  153. package/lib/src/check-card/style/index.css +8 -5
  154. package/lib/src/config-provider/config-provider-props.d.ts +5 -1
  155. package/lib/src/config-provider/config-provider-props.js +1 -1
  156. package/lib/src/config-provider/config-provider.d.ts +10 -1
  157. package/lib/src/config-provider/config-provider.js +1 -1
  158. package/lib/src/config-provider/constants.d.ts +9 -0
  159. package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -1
  160. package/lib/src/config-provider/index.d.ts +20 -1
  161. package/lib/src/editable-table/interface.d.ts +3 -2
  162. package/lib/src/index.js +1 -1
  163. package/lib/src/locale/lang/en.js +1 -1
  164. package/lib/src/locale/lang/zh-cn.js +1 -1
  165. package/lib/src/theme/ap-card/ap-card.css +10 -0
  166. package/lib/src/theme/ap-descriptions/ap-descriptions.css +1 -5
  167. package/lib/src/theme/ap-expand-alert/ap-expand-alert.css +9 -0
  168. package/lib/src/theme/ap-title/ap-title.css +4 -4
  169. package/lib/src/theme/check-card/index.css +8 -5
  170. package/lib/src/theme/css-var/index.js +1 -1
  171. package/package.json +1 -1
  172. /package/es/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
  173. /package/es/src/business/{title → ap-title}/ApTitle.vue.mjs +0 -0
  174. /package/es/src/business/{title → ap-title}/ApTitle.vue2.mjs +0 -0
  175. /package/es/src/business/{title → ap-title}/interface.d.ts +0 -0
  176. /package/lib/src/business/{title → ap-title}/ApTitle.vue.d.ts +0 -0
  177. /package/lib/src/business/{title → ap-title}/ApTitle.vue.js +0 -0
  178. /package/lib/src/business/{title → ap-title}/ApTitle.vue2.js +0 -0
  179. /package/lib/src/business/{title → ap-title}/interface.d.ts +0 -0
@@ -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,107 +1,37 @@
1
1
  import { ApExpandAlertProps } from './interface';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
- /**
4
- * @description: 手动调用收起展开
5
- * @param {boolean} state true 展开 false 收起
6
- */
7
- declare function setExpand(state?: boolean): void;
8
- declare function __VLS_template(): {
9
- slots: {
10
- default?(_: {}): any;
2
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
3
+ declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
5
+ onExpand?: ((...args: any[]) => any) | undefined;
6
+ onChoose?: ((...args: any[]) => any) | undefined;
7
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{}>> & {
8
+ onExpand?: ((...args: any[]) => any) | undefined;
9
+ onChoose?: ((...args: any[]) => any) | undefined;
10
+ }, never>, "onExpand" | "onChoose"> & ApExpandAlertProps<T>> & PublicProps;
11
+ expose(exposed: ShallowUnwrapRef<{
12
+ setExpand: (state?: boolean) => void;
13
+ }>): void;
14
+ attrs: any;
15
+ slots: Readonly<{
16
+ default(props: any): any;
17
+ item(props: {
18
+ record: T;
19
+ index: number;
20
+ }): any;
21
+ }> & {
22
+ default(props: any): any;
23
+ item(props: {
24
+ record: T;
25
+ index: number;
26
+ }): any;
11
27
  };
12
- refs: {
13
- ellipsisBoxRef: HTMLDivElement;
14
- };
15
- attrs: Partial<{}>;
28
+ emit: (event: "expand" | "choose", ...args: any[]) => void;
29
+ }>) => VNode<RendererNode, RendererElement, {
30
+ [key: string]: any;
31
+ }> & {
32
+ __ctx?: Awaited<typeof __VLS_setup>;
16
33
  };
17
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
- declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApExpandAlertProps>, {
19
- /**
20
- * Alert类型
21
- */
22
- type: string;
23
- /**
24
- * 数据
25
- */
26
- data: () => never[];
27
- /**
28
- * 前缀
29
- */
30
- prefix: string;
31
- /**
32
- * Tooltip 提示标题
33
- */
34
- tipTitle: string;
35
- /**
36
- * 分隔符
37
- */
38
- separator: string;
39
- /**
40
- * 内容达到几行显示展开收起
41
- */
42
- rows: number;
43
- }>, {
44
- setExpand: typeof setExpand;
45
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
46
- expand: (...args: any[]) => void;
47
- choose: (...args: any[]) => void;
48
- }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApExpandAlertProps>, {
49
- /**
50
- * Alert类型
51
- */
52
- type: string;
53
- /**
54
- * 数据
55
- */
56
- data: () => never[];
57
- /**
58
- * 前缀
59
- */
60
- prefix: string;
61
- /**
62
- * Tooltip 提示标题
63
- */
64
- tipTitle: string;
65
- /**
66
- * 分隔符
67
- */
68
- separator: string;
69
- /**
70
- * 内容达到几行显示展开收起
71
- */
72
- rows: number;
73
- }>>> & {
74
- onExpand?: ((...args: any[]) => any) | undefined;
75
- onChoose?: ((...args: any[]) => any) | undefined;
76
- }, {
77
- type: "warning" | "error" | "success" | "info" | undefined;
78
- data: Array<any> | string;
79
- separator: string;
80
- prefix: string;
81
- rows: string | number;
82
- tipTitle: string;
83
- }, {}>;
84
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
85
34
  export default _default;
86
- type __VLS_WithDefaults<P, D> = {
87
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
88
- default: D[K];
89
- }> : P[K];
90
- };
91
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
92
- type __VLS_TypePropsToOption<T> = {
93
- [K in keyof T]-?: {} extends Pick<T, K> ? {
94
- type: PropType<__VLS_NonUndefinedable<T[K]>>;
95
- } : {
96
- type: PropType<T[K]>;
97
- required: true;
98
- };
99
- };
100
- type __VLS_WithTemplateSlots<T, S> = T & {
101
- new (): {
102
- $slots: S;
103
- };
104
- };
105
35
  type __VLS_PrettifyLocal<T> = {
106
36
  [K in keyof T]: T[K];
107
37
  } & {};
@@ -1,119 +1,159 @@
1
- import { defineComponent as z, ref as f, computed as v, watch as R, nextTick as S, openBlock as n, createElementBlock as i, normalizeClass as s, unref as t, createVNode as h, withCtx as d, createBlock as V, createElementVNode as c, toDisplayString as r, createCommentVNode as w, normalizeStyle as D, renderSlot as M, Fragment as x, renderList as O } from "vue";
2
- import { DownOutlined as F } from "@ant-design/icons-vue";
3
- import { Alert as G, Tooltip as W } from "ant-design-vue";
4
- import { ApActionItem as j } from "../../ap-action/index.mjs";
1
+ import { defineComponent as W, computed as f, ref as h, watch as T, nextTick as w, openBlock as a, createElementBlock as n, normalizeClass as s, unref as t, createVNode as x, withCtx as m, createBlock as g, createElementVNode as b, toDisplayString as p, createCommentVNode as A, normalizeStyle as c, renderSlot as N, resolveDynamicComponent as I, Fragment as C, renderList as j, createTextVNode as q } from "vue";
2
+ import { DownOutlined as J } from "@ant-design/icons-vue";
3
+ import { Alert as K, Tooltip as P } from "ant-design-vue";
4
+ import { ApActionItem as Q } from "../../ap-action/index.mjs";
5
5
  import "../../config-provider/index.mjs";
6
6
  import "./style.css";
7
- import { useNamespace as q } from "../../config-provider/hooks/use-namespace.mjs";
8
- import { useGlobalConfig as J } from "../../config-provider/hooks/use-global-config.mjs";
9
- const K = { key: 0 }, P = ["onClick"], le = /* @__PURE__ */ z({
7
+ import { isString as E } from "lodash-unified";
8
+ import { useLocale as U } from "../../config-provider/hooks/use-locale.mjs";
9
+ import { useNamespace as X } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useGlobalConfig as Y } from "../../config-provider/hooks/use-global-config.mjs";
11
+ const Z = ["onClick"], ue = /* @__PURE__ */ W({
10
12
  __name: "ApExpandAlert",
11
13
  props: {
12
14
  type: { default: "warning" },
13
15
  data: { default: () => [] },
14
16
  prefix: { default: "" },
15
- tipTitle: { default: "查看详情" },
17
+ tipTitle: { default: "" },
16
18
  mapLabel: {},
17
19
  separator: { default: "|" },
18
- rows: { default: 2 }
20
+ separatorStyle: { default: () => ({}) },
21
+ contentStyle: { default: () => ({}) },
22
+ prefixStyle: { default: () => ({}) },
23
+ rows: { default: 2 },
24
+ defaultExpand: { type: Boolean, default: !0 },
25
+ showIcon: { type: Boolean, default: !0 }
19
26
  },
20
27
  emits: ["choose", "expand"],
21
- setup(g, { expose: b, emit: C }) {
22
- const B = C, k = g, a = f(""), p = f(null), E = v(() => ({
28
+ setup(L, { expose: $, emit: H }) {
29
+ const z = H, r = L, { t: S } = U(), V = f(() => {
30
+ if (r.type != "card")
31
+ return r.type;
32
+ }), l = h(""), u = h(null), D = f(() => ({
23
33
  fontWeight: "400",
24
34
  wordBreak: "break-all",
25
35
  overflow: "hidden",
26
36
  display: "-webkit-box",
27
- webkitLineClamp: a.value,
37
+ webkitLineClamp: l.value,
28
38
  webkitBoxOrient: "vertical",
29
39
  lineHeight: "22px"
30
40
  }));
31
- function N() {
32
- a.value === "1" ? a.value = "" : a.value = "1", B("expand");
41
+ function R() {
42
+ l.value === "1" ? l.value = "" : l.value = "1", z("expand");
33
43
  }
34
- const A = v(() => a.value === "1" ? "展开" : "收起"), m = f(!0), y = v(() => a.value !== "1");
35
- function T(e) {
36
- e ? a.value = "" : a.value = "1";
44
+ const M = f(() => l.value === "1" ? S("ap.apExpandAlert.expand") : S("ap.apExpandAlert.collapse")), y = h(!0), B = f(() => l.value !== "1");
45
+ function v(e) {
46
+ e ? l.value = "" : l.value = "1";
37
47
  }
38
- R(
39
- () => k.data,
48
+ T(
49
+ () => r.data,
40
50
  () => {
41
- a.value = "", S(() => {
42
- if (p.value) {
43
- const e = Number(p.value.clientHeight), u = Number(
44
- parseInt(p.value.style.lineHeight)
51
+ l.value = "", w(() => {
52
+ if (u.value) {
53
+ const e = Number(u.value.clientHeight), d = Number(
54
+ parseInt(u.value.style.lineHeight)
45
55
  );
46
- e < u * Number(k.rows) && y.value ? m.value = !1 : m.value = !0;
56
+ e < d * Number(r.rows) && B.value ? y.value = !1 : y.value = !0;
47
57
  }
48
58
  });
49
59
  },
50
60
  {
51
61
  immediate: !0
52
62
  }
63
+ ), T(
64
+ () => r.defaultExpand,
65
+ (e) => {
66
+ e ? w(() => {
67
+ v(e);
68
+ }) : w(() => {
69
+ v(e);
70
+ });
71
+ },
72
+ { immediate: !0 }
53
73
  );
54
- const { b: H, e: l, m: I } = q("ap-expand-alert"), L = J("uiMode", "aplus");
55
- return b({
56
- setExpand: T
57
- }), (e, u) => (n(), i("div", {
58
- class: s([t(H)(), `${t(I)(t(L))}`])
74
+ const { b: O, e: o, m: F } = X("ap-expand-alert"), G = Y("uiMode", "aplus");
75
+ return $({
76
+ setExpand: v
77
+ }), (e, d) => (a(), n("div", {
78
+ class: s([t(O)(), `${t(F)(t(G))}`])
59
79
  }, [
60
- h(t(G), {
61
- type: e.type,
62
- "show-icon": "",
63
- class: s(t(l)("antAlert"))
80
+ x(t(K), {
81
+ type: V.value,
82
+ "show-icon": e.showIcon,
83
+ class: s([t(o)("antAlert"), e.type == "card" ? "card-alert" : ""])
64
84
  }, {
65
- action: d(() => [
66
- m.value ? (n(), V(t(j), {
85
+ action: m(() => [
86
+ y.value ? (a(), g(t(Q), {
67
87
  key: 0,
68
88
  size: "small",
69
- onClick: u[0] || (u[0] = (o) => N()),
89
+ onClick: d[0] || (d[0] = (i) => R()),
70
90
  style: { "font-size": "12px", "padding-left": "16px" }
71
91
  }, {
72
- default: d(() => [
73
- c("span", {
74
- class: s(t(l)("expandText"))
75
- }, r(A.value), 3),
76
- h(t(F), {
77
- class: s(y.value ? t(l)("expandIcon") : t(l)("collapseIcon"))
92
+ default: m(() => [
93
+ b("span", {
94
+ class: s(t(o)("expandText"))
95
+ }, p(M.value), 3),
96
+ x(t(J), {
97
+ class: s(B.value ? t(o)("expandIcon") : t(o)("collapseIcon"))
78
98
  }, null, 8, ["class"])
79
99
  ]),
80
100
  _: 1
81
- })) : w("", !0)
101
+ })) : A("", !0)
82
102
  ]),
83
- message: d(() => [
84
- c("div", {
85
- style: D(E.value),
86
- class: s(t(l)("alertContent")),
103
+ message: m(() => [
104
+ b("div", {
105
+ style: c({ ...D.value, ...e.contentStyle }),
106
+ class: s(t(o)("alertContent")),
87
107
  ref_key: "ellipsisBoxRef",
88
- ref: p
108
+ ref: u
89
109
  }, [
90
- M(e.$slots, "default", {}, () => [
91
- c("span", {
92
- class: s(t(l)("prefix"))
93
- }, r(e.prefix), 3),
94
- typeof e.data == "string" ? (n(), i("span", K, r(e.data), 1)) : (n(!0), i(x, { key: 1 }, O(e.data, (o, $) => (n(), i(x, { key: o }, [
95
- h(t(W), { title: e.tipTitle }, {
96
- default: d(() => [
97
- c("span", {
98
- class: s(t(l)("showItem")),
99
- onClick: (Q) => e.$emit("choose", o)
100
- }, r(e.mapLabel ? o[e.mapLabel] : o), 11, P)
110
+ N(e.$slots, "default", {}, () => [
111
+ t(E)(e.prefix) ? (a(), n("span", {
112
+ key: 0,
113
+ class: s(t(o)("prefix")),
114
+ style: c(e.prefixStyle)
115
+ }, p(e.prefix), 7)) : (a(), g(I(e.prefix), {
116
+ key: 1,
117
+ style: c(e.prefixStyle)
118
+ }, null, 8, ["style"])),
119
+ t(E)(e.data) ? (a(), n("span", {
120
+ key: 2,
121
+ class: s(t(o)("text"))
122
+ }, p(e.data), 3)) : (a(!0), n(C, { key: 3 }, j(e.data, (i, k) => (a(), n(C, { key: k }, [
123
+ x(t(P), {
124
+ title: e.tipTitle ? e.tipTitle : null
125
+ }, {
126
+ default: m(() => [
127
+ N(e.$slots, "item", {
128
+ record: i,
129
+ index: k
130
+ }, () => [
131
+ b("span", {
132
+ class: s(t(o)("showItem")),
133
+ onClick: (_) => e.$emit("choose", i)
134
+ }, p(e.mapLabel ? i[e.mapLabel] : i), 11, Z)
135
+ ])
101
136
  ]),
102
137
  _: 2
103
138
  }, 1032, ["title"]),
104
- $ !== e.data.length - 1 ? (n(), i("span", {
139
+ k !== e.data.length - 1 ? (a(), n("span", {
105
140
  key: 0,
106
- class: s(t(l)("spliter"))
107
- }, r(e.separator), 3)) : w("", !0)
141
+ class: s(t(o)("spliter")),
142
+ style: c(e.separatorStyle)
143
+ }, [
144
+ t(E)(e.separator) ? (a(), n(C, { key: 0 }, [
145
+ q(p(e.separator), 1)
146
+ ], 64)) : (a(), g(I(e.separator), { key: 1 }))
147
+ ], 6)) : A("", !0)
108
148
  ], 64))), 128))
109
149
  ])
110
150
  ], 6)
111
151
  ]),
112
152
  _: 3
113
- }, 8, ["type", "class"])
153
+ }, 8, ["type", "show-icon", "class"])
114
154
  ], 2));
115
155
  }
116
156
  });
117
157
  export {
118
- le as default
158
+ ue as default
119
159
  };
@@ -1,12 +1,14 @@
1
- export interface ApExpandAlertProps {
1
+ import { AlertProps } from 'ant-design-vue/es/alert';
2
+ import { Component, CSSProperties, VNode } from 'vue';
3
+ export type ApExpandAlertProps<T> = {
2
4
  /**
3
5
  * Alert类型
4
6
  */
5
- type: 'warning' | 'error' | 'success' | 'info' | undefined;
7
+ type?: 'warning' | 'error' | 'success' | 'info' | 'card' | undefined;
6
8
  /**
7
9
  * 展开数据
8
10
  */
9
- data: Array<any> | string;
11
+ data?: Array<T> | string;
10
12
  /**
11
13
  * 标题前缀
12
14
  */
@@ -22,9 +24,25 @@ export interface ApExpandAlertProps {
22
24
  /**
23
25
  * 分隔符
24
26
  */
25
- separator: string;
27
+ separator?: Component | VNode | string;
28
+ /**
29
+ * 分隔符样式
30
+ */
31
+ separatorStyle?: CSSProperties;
32
+ /**
33
+ * 内容样式
34
+ */
35
+ contentStyle?: Omit<CSSProperties, 'wordBreak' | 'overflow' | 'display' | 'webkitLineClamp' | 'webkitBoxOrient'>;
36
+ /**
37
+ * 前缀样式
38
+ */
39
+ prefixStyle?: CSSProperties;
26
40
  /**
27
41
  * 内容达到几行显示展开收起,默认是两行
28
42
  */
29
- rows: string | number;
30
- }
43
+ rows?: string | number;
44
+ /**
45
+ * 默认是否展开
46
+ */
47
+ defaultExpand?: boolean;
48
+ } & Pick<AlertProps, 'showIcon'>;
@@ -19,6 +19,7 @@
19
19
  }
20
20
  .aplus-ap-expand-alert__prefix {
21
21
  color: #182948;
22
+ display: inline-block;
22
23
  }
23
24
  .aplus-ap-expand-alert__showItem {
24
25
  color: #0070ff;
@@ -40,3 +41,11 @@
40
41
  font-size: 16px;
41
42
  transform: translateY(2px);
42
43
  }
44
+ .aplus-ap-expand-alert--aplus .card-alert {
45
+ background-color: transparent !important;
46
+ border: none ;
47
+ }
48
+ .aplus-ap-expand-alert--admin .card-alert {
49
+ background-color: transparent !important;
50
+ border: none;
51
+ }
@@ -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
+ };