@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
@@ -1,14 +1,14 @@
1
- import { defineComponent as D, openBlock as o, createElementBlock as s, normalizeClass as N, unref as r, normalizeStyle as w, createVNode as F, mergeProps as B, withCtx as y, Fragment as p, renderList as T, createBlock as c, h as d, renderSlot as _, resolveDynamicComponent as M } from "vue";
2
- import { Descriptions as V, DescriptionsItem as f } from "ant-design-vue";
3
- import { transformValue as h, isEmptyWithType as j } from "./helper.mjs";
1
+ import { defineComponent as N, openBlock as l, createElementBlock as a, normalizeClass as h, unref as r, normalizeStyle as T, createVNode as B, mergeProps as _, withCtx as f, Fragment as s, renderList as w, createBlock as i, h as c, renderSlot as E, resolveDynamicComponent as M } from "vue";
2
+ import { Descriptions as V, DescriptionsItem as m } from "ant-design-vue";
3
+ import { mixinsAttachmentExtraProps as j, transformValue as x, isEmptyWithType as z } from "./helper.mjs";
4
4
  import { get as S } from "lodash-unified";
5
5
  import "./help-message/index.vue.mjs";
6
6
  import "../config-provider/index.mjs";
7
7
  import "./style/ap-descriptions.css";
8
- import { useGlobalConfig as m } from "../config-provider/hooks/use-global-config.mjs";
9
- import { useNamespace as x } from "../config-provider/hooks/use-namespace.mjs";
10
- import z from "./help-message/index.vue2.mjs";
11
- const E = { key: 0 }, J = /* @__PURE__ */ D({
8
+ import { useGlobalConfig as u } from "../config-provider/hooks/use-global-config.mjs";
9
+ import { useNamespace as A } from "../config-provider/hooks/use-namespace.mjs";
10
+ import F from "./help-message/index.vue2.mjs";
11
+ const G = { key: 0 }, Q = /* @__PURE__ */ N({
12
12
  __name: "ap-descriptions",
13
13
  props: {
14
14
  descriptionsProps: {},
@@ -18,46 +18,44 @@ const E = { key: 0 }, J = /* @__PURE__ */ D({
18
18
  className: {}
19
19
  },
20
20
  setup(b) {
21
- const i = b, k = m("uiMode", "admin"), g = m("apDescriptions"), { m: P, b: v } = x("ap-descriptions"), C = (t = {}) => {
22
- var l;
23
- let a = "";
24
- return ((l = i.descriptionsProps) == null ? void 0 : l.layout) === "vertical" && (a = "start"), {
25
- justifyContent: a,
21
+ const p = b, g = u("uiMode", "admin"), C = u("apDescriptions"), k = u("downloadCenterTriggerConfig"), { m: v, b: P } = A("ap-descriptions"), D = (t = {}) => {
22
+ var o;
23
+ let n = "";
24
+ return ((o = p.descriptionsProps) == null ? void 0 : o.layout) === "vertical" && (n = "start"), {
25
+ justifyContent: n,
26
26
  ...t
27
27
  };
28
- }, u = (t) => {
29
- var e, n;
30
- const a = S(i.dataSource, t.field);
31
- if (t.customRender)
32
- return t.customRender(i.dataSource);
33
- const l = (e = g.value) == null ? void 0 : e.downloadFile;
34
- return t.valueType === "attachment" && !((n = t.extraProps) != null && n.downloadFile) && l && (t.extraProps ? t.extraProps.downloadFile = l : t.extraProps = {
35
- downloadFile: l
36
- }), h({ value: a, record: i.dataSource }, t);
28
+ }, y = (t) => {
29
+ var o, e;
30
+ const n = S(p.dataSource, t.field);
31
+ return t.customRender ? t.customRender(p.dataSource) : (t.valueType === "attachment" && (t.extraProps = j(t.extraProps, {
32
+ fromConfig: (o = C.value) == null ? void 0 : o.downloadFile,
33
+ fromGlobal: (e = k.value) == null ? void 0 : e.trigger
34
+ })), x({ value: n, record: p.dataSource }, t));
37
35
  };
38
- return (t, a) => {
39
- var l;
40
- return o(), s("div", {
41
- class: N([t.className, r(v)(), r(P)(r(k))]),
42
- style: w(t.style)
36
+ return (t, n) => {
37
+ var o;
38
+ return l(), a("div", {
39
+ class: h([t.className, r(P)(), r(v)(r(g))]),
40
+ style: T(t.style)
43
41
  }, [
44
- F(r(V), B(t.descriptionsProps, {
45
- labelStyle: C({ ...((l = t.descriptionsProps) == null ? void 0 : l.labelStyle) || {} })
42
+ B(r(V), _(t.descriptionsProps, {
43
+ labelStyle: D({ ...((o = t.descriptionsProps) == null ? void 0 : o.labelStyle) || {} })
46
44
  }), {
47
- default: y(() => [
48
- (o(!0), s(p, null, T(t.schemas, (e, n) => (o(), s(p, {
49
- key: e.field || "empty" + n
45
+ default: f(() => [
46
+ (l(!0), a(s, null, w(t.schemas, (e, d) => (l(), a(s, {
47
+ key: e.field || "empty" + d
50
48
  }, [
51
- e.valueType === "empty" ? (o(), c(r(f), {
49
+ e.valueType === "empty" ? (l(), i(r(m), {
52
50
  key: 0,
53
51
  contentStyle: e.contentStyle,
54
52
  labelStyle: e.labelStyle,
55
53
  span: e.span
56
- }, null, 8, ["contentStyle", "labelStyle", "span"])) : (o(), c(r(f), {
54
+ }, null, 8, ["contentStyle", "labelStyle", "span"])) : (l(), i(r(m), {
57
55
  key: 1,
58
- label: e.label ? d(p, [
59
- d(
60
- z,
56
+ label: e.label ? c(s, [
57
+ c(
58
+ F,
61
59
  { helpMessage: e.helpMessage },
62
60
  { default: () => e.label }
63
61
  )
@@ -66,17 +64,17 @@ const E = { key: 0 }, J = /* @__PURE__ */ D({
66
64
  contentStyle: e.contentStyle,
67
65
  labelStyle: e.labelStyle
68
66
  }, {
69
- default: y(() => [
70
- r(j)(r(S)(t.dataSource, e.field), e.valueType) ? (o(), s("span", E, "--")) : (o(), s(p, { key: 1 }, [
71
- e.contentSlotName ? _(t.$slots, e.contentSlotName, {
67
+ default: f(() => [
68
+ r(z)(r(S)(t.dataSource, e.field), e.valueType) ? (l(), a("span", G, "--")) : (l(), a(s, { key: 1 }, [
69
+ e.contentSlotName ? E(t.$slots, e.contentSlotName, {
72
70
  key: 0,
73
- index: n,
74
- item: u(e),
71
+ index: d,
72
+ item: y(e),
75
73
  record: t.dataSource
76
- }) : (o(), c(M(
77
- d(p, [
74
+ }) : (l(), i(M(
75
+ c(s, [
78
76
  e.prefix,
79
- u(e),
77
+ y(e),
80
78
  e.suffix
81
79
  ])
82
80
  ), { key: 1 }))
@@ -93,5 +91,5 @@ const E = { key: 0 }, J = /* @__PURE__ */ D({
93
91
  }
94
92
  });
95
93
  export {
96
- J as default
94
+ Q as default
97
95
  };
@@ -44,7 +44,7 @@ interface DateRangeExtraProps {
44
44
  }
45
45
  /** 处理日期范围 */
46
46
  export declare function dateRange({ value, record }: FormatOptions, extraProps: DateRangeExtraProps): string;
47
- interface AttachmentExtraProps {
47
+ export interface AttachmentExtraProps {
48
48
  /** url字段路径 */
49
49
  urlPath?: string | string[];
50
50
  /** 资源名称字段路径 */
@@ -53,7 +53,7 @@ interface AttachmentExtraProps {
53
53
  style?: StyleValue;
54
54
  /** 类名称 */
55
55
  className?: string;
56
- /** 下载资源函数,可以通过descriptions的downloadFile属性统一设置 */
56
+ /** 配置downloadCenterTriggerConfig优先级最高,次配置失效 */
57
57
  downloadFile?: (url: string, name: string) => void;
58
58
  }
59
59
  /** 处理附件类型 */
@@ -1,5 +1,6 @@
1
1
  import { FormatOptions, FormatterValueType, TransformOptionType } from './interface';
2
- import { VNode, VNodeChild } from 'vue';
2
+ import { VNode, VNodeChild, StyleValue } from 'vue';
3
+ import { AttachmentExtraProps } from './formatter';
3
4
  export declare function transformValue(data: FormatOptions, opt: TransformOptionType): VNodeChild | VNode;
4
5
  /**
5
6
  * 根据type判断是否为空
@@ -7,3 +8,20 @@ export declare function transformValue(data: FormatOptions, opt: TransformOption
7
8
  * @param type 类型
8
9
  */
9
10
  export declare function isEmptyWithType(value: unknown, type: FormatterValueType): boolean;
11
+ /**
12
+ * 混入附件类型额外属性
13
+ * @param target 原配置
14
+ * @param options.fromGlobal 来自全局配置的下载文件方法
15
+ * @param options.fromConfig 来自全局配置里的ApDescriptions的下载文件方法
16
+ * @returns 混入后的配置
17
+ */
18
+ export declare function mixinsAttachmentExtraProps(target: AttachmentExtraProps | undefined, options: {
19
+ fromGlobal?: (...args: any[]) => any;
20
+ fromConfig?: (...args: any[]) => any;
21
+ }): AttachmentExtraProps | {
22
+ downloadFile: (...args: any[]) => any;
23
+ urlPath?: string | string[];
24
+ namePath?: string | string[];
25
+ style?: StyleValue;
26
+ className?: string;
27
+ };
@@ -1,24 +1,34 @@
1
- import { isEmpty as a } from "lodash-unified";
2
- import { formatterMap as n } from "./formatter/index.mjs";
3
- function c(t, r) {
4
- const e = n[r.valueType];
5
- return e ? e(t, r.extraProps || {}) : t.value;
1
+ import { isEmpty as o } from "lodash-unified";
2
+ import { formatterMap as f } from "./formatter/index.mjs";
3
+ function m(r, n) {
4
+ const e = f[n.valueType];
5
+ return e ? e(r, n.extraProps || {}) : r.value;
6
6
  }
7
- function m(t, r) {
8
- switch (r) {
7
+ function a(r, n) {
8
+ switch (n) {
9
9
  case "text":
10
10
  case "number":
11
11
  case "dateRange":
12
12
  case "date":
13
- return t == null || t === "";
13
+ return r == null || r === "";
14
14
  case "array":
15
15
  case "attachment":
16
- return a(t);
16
+ return o(r);
17
17
  default:
18
- return !t;
18
+ return !r;
19
19
  }
20
20
  }
21
+ function c(r = {}, n) {
22
+ return n.fromGlobal ? {
23
+ ...r,
24
+ downloadFile: n.fromGlobal
25
+ } : !(r != null && r.downloadFile) && n.fromConfig ? {
26
+ ...r,
27
+ downloadFile: n.fromConfig
28
+ } : r;
29
+ }
21
30
  export {
22
- m as isEmptyWithType,
23
- c as transformValue
31
+ a as isEmptyWithType,
32
+ c as mixinsAttachmentExtraProps,
33
+ m as transformValue
24
34
  };
@@ -2,10 +2,6 @@
2
2
  TODO:
3
3
  1.admin和aplus样式提成变量?
4
4
  */
5
- .aplus-ap-descriptions {
6
- --ap-descriptions-item-padding-bottom: 24px;
7
- --ap-descriptions-item-label-width: auto;
8
- }
9
5
  .aplus-ap-descriptions .ant-descriptions .ant-descriptions-view table {
10
6
  table-layout: fixed;
11
7
  }
@@ -16,7 +12,7 @@
16
12
  padding-bottom: 8px;
17
13
  }
18
14
  .aplus-ap-descriptions .ant-descriptions .ant-descriptions-row:last-child .ant-descriptions-item {
19
- padding-bottom: 0;
15
+ padding-bottom: var(--ap-descriptions-last-row-item-padding-bottom);
20
16
  }
21
17
  .aplus-ap-descriptions .ant-descriptions .ant-descriptions-item-label::after {
22
18
  margin-inline: 4px 20px;
@@ -1,20 +1,20 @@
1
- import { defineComponent as z, ref as N, useSlots as O, computed as t, unref as s, openBlock as l, createBlock as F, mergeProps as x, withCtx as A, createElementVNode as r, normalizeClass as S, createElementBlock as c, createVNode as I, createCommentVNode as d, renderSlot as L, toDisplayString as M } from "vue";
2
- import { Button as U } from "ant-design-vue";
3
- import { LoadingOutlined as V } from "@ant-design/icons-vue";
1
+ import { defineComponent as x, ref as A, useSlots as S, computed as t, unref as s, openBlock as r, createBlock as j, mergeProps as I, withCtx as M, createElementVNode as u, normalizeClass as T, createElementBlock as f, createVNode as U, createCommentVNode as g, renderSlot as V, toDisplayString as D } from "vue";
2
+ import { Button as E } from "ant-design-vue";
3
+ import { LoadingOutlined as G } from "@ant-design/icons-vue";
4
4
  import "../config-provider/index.mjs";
5
- import { useOssInit as j } from "./hooks/index.mjs";
5
+ import { useOssInit as P } from "./hooks/index.mjs";
6
6
  import "./style/ap-download.css";
7
- import { getFileInfo as D } from "./utils/getFileInfo.mjs";
8
- import { useStyle as E } from "./hooks/useStyle.mjs";
9
- import { useLocale as G } from "../config-provider/hooks/use-locale.mjs";
10
- import { useGlobalConfig as p } from "../config-provider/hooks/use-global-config.mjs";
11
- const P = {
7
+ import { getFileInfo as y } from "./utils/getFileInfo.mjs";
8
+ import { useStyle as R } from "./hooks/useStyle.mjs";
9
+ import { useLocale as W } from "../config-provider/hooks/use-locale.mjs";
10
+ import { useGlobalConfig as c } from "../config-provider/hooks/use-global-config.mjs";
11
+ const $ = {
12
12
  key: 0,
13
13
  class: "spin"
14
- }, R = {
14
+ }, q = {
15
15
  key: 1,
16
16
  class: "icon"
17
- }, T = { class: "text" }, ee = /* @__PURE__ */ z({
17
+ }, H = { class: "text" }, le = /* @__PURE__ */ x({
18
18
  name: "ApDownload",
19
19
  __name: "ap-download",
20
20
  props: {
@@ -41,45 +41,56 @@ const P = {
41
41
  getOssAccess: {}
42
42
  },
43
43
  emits: ["downloadCallback"],
44
- setup(m, { emit: u }) {
45
- const f = u, n = N(!1), { lang: g } = G(), y = O(), C = t(() => g.value === "zh-cn" ? "zh_CN" : "en_US"), _ = p("uiMode"), e = m, b = p("apUpload"), a = t(() => e.disabled), h = t(() => e.color ? e.color : _.value === "aplus" ? "#0070FF" : "#1890FF"), k = t(() => e.size), { getInnerWrapperClass: w } = E(h, k, a), B = t(() => {
44
+ setup(C, { emit: b }) {
45
+ const h = b, l = A(!1), { lang: N } = W(), _ = S(), w = t(() => N.value === "zh-cn" ? "zh_CN" : "en_US"), k = c("uiMode"), e = C, v = c("apUpload"), d = c(
46
+ "downloadCenterTriggerConfig"
47
+ ), p = t(() => e.disabled), B = t(() => e.color ? e.color : k.value === "aplus" ? "#0070FF" : "#1890FF"), z = t(() => e.size), { getInnerWrapperClass: O } = R(B, z, p), F = t(() => {
46
48
  var o;
47
- return e.getOssAccess || ((o = b.value) == null ? void 0 : o.getOssAccess);
48
- }), v = async () => {
49
+ return e.getOssAccess || ((o = v.value) == null ? void 0 : o.getOssAccess);
50
+ }), L = async () => {
51
+ var o, a;
49
52
  if (!e.disabled) {
50
- n.value = !0;
53
+ l.value = !0;
51
54
  try {
52
- const i = await (await j(
53
- B.value,
54
- s(C)
55
- )).downloadFile(
56
- D(e.needName, e.fileName)
57
- );
58
- f("downloadCallback", i);
59
- } catch (o) {
60
- console.error(o);
55
+ if ((o = d.value) != null && o.trigger) {
56
+ let i = y(e.needName, e.fileName).map((m) => ({
57
+ objectName: m.path,
58
+ fileName: m.fileName
59
+ }));
60
+ (a = d.value) == null || a.trigger(i);
61
+ } else {
62
+ const i = await (await P(
63
+ F.value,
64
+ s(w)
65
+ )).downloadFile(
66
+ y(e.needName, e.fileName)
67
+ );
68
+ h("downloadCallback", i);
69
+ }
70
+ } catch (n) {
71
+ console.error(n);
61
72
  } finally {
62
- n.value = !1;
73
+ l.value = !1;
63
74
  }
64
75
  }
65
76
  };
66
- return (o, i) => (l(), F(s(U), x(e, {
77
+ return (o, a) => (r(), j(s(E), I(e, {
67
78
  type: e.type,
68
79
  size: e.size,
69
- disabled: a.value,
70
- onClick: v
80
+ disabled: p.value,
81
+ onClick: L
71
82
  }), {
72
- default: A(() => [
73
- r("div", {
74
- class: S(s(w))
83
+ default: M(() => [
84
+ u("div", {
85
+ class: T(s(O))
75
86
  }, [
76
- n.value ? (l(), c("span", P, [
77
- I(s(V), { spin: !0 })
78
- ])) : d("", !0),
79
- s(y).icon ? (l(), c("span", R, [
80
- L(o.$slots, "icon")
81
- ])) : d("", !0),
82
- r("span", T, M(o.text), 1)
87
+ l.value ? (r(), f("span", $, [
88
+ U(s(G), { spin: !0 })
89
+ ])) : g("", !0),
90
+ s(_).icon ? (r(), f("span", q, [
91
+ V(o.$slots, "icon")
92
+ ])) : g("", !0),
93
+ u("span", H, D(o.text), 1)
83
94
  ], 2)
84
95
  ]),
85
96
  _: 3
@@ -87,5 +98,5 @@ const P = {
87
98
  }
88
99
  });
89
100
  export {
90
- ee as default
101
+ le as default
91
102
  };
@@ -2,7 +2,10 @@ import { ApDownLoadNeedNameModel } from '../interface';
2
2
  /**
3
3
  * 根据needName将fileName转换为OSS下载格式
4
4
  */
5
- export declare function getFileInfo(needName?: ApDownLoadNeedNameModel, fileName?: any): any;
5
+ export declare function getFileInfo(needName?: ApDownLoadNeedNameModel, fileName?: any): {
6
+ path: string;
7
+ fileName: string;
8
+ }[];
6
9
  /**
7
10
  * 根据hexColor颜色和opacity透明度计算rgba颜色数值,返回
8
11
  */
@@ -1,41 +1,66 @@
1
1
  import { ApDownLoadNeedNameKeyDefault as y } from "../interface.mjs";
2
- function K(t, r) {
3
- if (t === !0) {
4
- if (typeof r == "string")
5
- return r;
6
- if (Array.isArray(r))
7
- return r.map((p) => ({
8
- path: p == null ? void 0 : p[y.pathKey],
9
- fileName: p == null ? void 0 : p[y.nameKey]
2
+ function K(r, t) {
3
+ if (r === !0) {
4
+ if (typeof t == "string")
5
+ return [
6
+ {
7
+ path: t,
8
+ fileName: t
9
+ }
10
+ ];
11
+ if (Array.isArray(t))
12
+ return t.map((p) => ({
13
+ path: (p == null ? void 0 : p[y.pathKey]) ?? p,
14
+ fileName: (p == null ? void 0 : p[y.nameKey]) ?? p
10
15
  }));
11
- if (typeof r == "object")
16
+ if (typeof t == "object")
17
+ return [
18
+ {
19
+ path: t == null ? void 0 : t[y.pathKey],
20
+ fileName: t == null ? void 0 : t[y.nameKey]
21
+ }
22
+ ];
23
+ } else if (typeof r == "object") {
24
+ if (typeof t == "string")
12
25
  return [
13
26
  {
14
- path: r == null ? void 0 : r[y.pathKey],
15
- fileName: r == null ? void 0 : r[y.nameKey]
27
+ path: t,
28
+ fileName: t
16
29
  }
17
30
  ];
18
- } else if (typeof t == "object") {
19
- if (typeof r == "string")
20
- return r;
21
- if (Array.isArray(r))
22
- return r.map((p) => ({
23
- path: p == null ? void 0 : p[(t == null ? void 0 : t.pathKey) || y.pathKey],
24
- fileName: p == null ? void 0 : p[(t == null ? void 0 : t.nameKey) || y.nameKey]
31
+ if (Array.isArray(t))
32
+ return t.map((p) => ({
33
+ path: (p == null ? void 0 : p[(r == null ? void 0 : r.pathKey) || y.pathKey]) ?? p,
34
+ fileName: (p == null ? void 0 : p[(r == null ? void 0 : r.nameKey) || y.nameKey]) ?? p
25
35
  }));
26
- if (typeof r == "object")
36
+ if (typeof t == "object")
37
+ return [
38
+ {
39
+ path: t == null ? void 0 : t[(r == null ? void 0 : r.pathKey) || y.pathKey],
40
+ fileName: t == null ? void 0 : t[(r == null ? void 0 : r.nameKey) || y.nameKey]
41
+ }
42
+ ];
43
+ } else {
44
+ if (typeof t == "string")
27
45
  return [
28
46
  {
29
- path: r == null ? void 0 : r[(t == null ? void 0 : t.pathKey) || y.pathKey],
30
- fileName: r == null ? void 0 : r[(t == null ? void 0 : t.nameKey) || y.nameKey]
47
+ path: t,
48
+ fileName: t
31
49
  }
32
50
  ];
33
- } else
34
- return r;
51
+ if (Array.isArray(t))
52
+ return t.map((p) => typeof p == "string" ? {
53
+ path: p,
54
+ fileName: p
55
+ } : p);
56
+ if (typeof t == "object")
57
+ return [t];
58
+ }
59
+ return [];
35
60
  }
36
- function g(t, r) {
37
- t.length === 4 && (t = `#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`);
38
- const p = parseInt(t.slice(1, 3), 16), s = parseInt(t.slice(3, 5), 16), n = parseInt(t.slice(5, 7), 16), u = Math.round(r * 255).toString(16).padStart(2, "0");
61
+ function g(r, t) {
62
+ r.length === 4 && (r = `#${r[1]}${r[1]}${r[2]}${r[2]}${r[3]}${r[3]}`);
63
+ const p = parseInt(r.slice(1, 3), 16), s = parseInt(r.slice(3, 5), 16), n = parseInt(r.slice(5, 7), 16), u = Math.round(t * 255).toString(16).padStart(2, "0");
39
64
  return `#${p.toString(16).padStart(2, "0")}${s.toString(16).padStart(2, "0")}${n.toString(16).padStart(2, "0")}${u}`;
40
65
  }
41
66
  export {
@@ -9,7 +9,7 @@ declare function onFieldBlur(): void;
9
9
  declare function onFieldChange(): void;
10
10
  declare function clearValidate(): void;
11
11
  declare function resetField(): void;
12
- declare function getFieldValue(): any;
12
+ declare function getFieldValue(shouldFormat?: boolean): any;
13
13
  declare function __VLS_template(): {
14
14
  slots: Readonly<ApFormItemSlots> & ApFormItemSlots;
15
15
  refs: {