@aplus-frontend/ui 7.12.6 → 7.13.0

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 (168) hide show
  1. package/es/src/ag-grid/components/loading/index.vue.d.ts +3 -0
  2. package/es/src/ag-grid/components/loading/index.vue.mjs +4 -0
  3. package/es/src/ag-grid/components/loading/index.vue2.mjs +18 -0
  4. package/es/src/ag-grid/context.mjs +1 -1
  5. package/es/src/ag-grid/editable/form-item.vue.mjs +33 -31
  6. package/es/src/ag-grid/editable/index.vue.mjs +1 -0
  7. package/es/src/ag-grid/hooks/use-pinned-row.mjs +2 -2
  8. package/es/src/ag-grid/index.vue.mjs +209 -202
  9. package/es/src/ag-grid/interface.d.ts +4 -0
  10. package/es/src/ag-grid/style/index.mjs +8 -5
  11. package/es/src/ap-drawer/interface.d.ts +13 -2
  12. package/es/src/ap-drawer/utils/createDrawer.mjs +37 -32
  13. package/es/src/ap-field/select/index.vue.d.ts +1 -2
  14. package/es/src/ap-field/select/index.vue.mjs +126 -88
  15. package/es/src/ap-field/style/index.mjs +8 -6
  16. package/es/src/ap-field/style/select.d.ts +2 -0
  17. package/es/src/ap-field/style/select.mjs +43 -0
  18. package/es/src/ap-form/context.mjs +1 -1
  19. package/es/src/ap-form/item-group/helper.mjs +2 -2
  20. package/es/src/ap-form/items/select/index.vue.d.ts +4 -8
  21. package/es/src/ap-form/provider/context.mjs +1 -1
  22. package/es/src/ap-grid/utils/table.mjs +2 -2
  23. package/es/src/ap-pro-card/components/card/index.vue2.mjs +2 -2
  24. package/es/src/ap-table/ap-table.vue2.mjs +15 -16
  25. package/es/src/ap-table/components/setting/context.d.ts +17 -0
  26. package/es/src/ap-table/components/setting/context.mjs +18 -0
  27. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
  28. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +217 -88
  29. package/es/src/ap-table/components/setting/sorter/context.mjs +1 -1
  30. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +49 -51
  31. package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
  32. package/es/src/ap-table/components/setting/template/edit-form.vue.mjs +4 -0
  33. package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +74 -0
  34. package/es/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
  35. package/es/src/ap-table/components/setting/template/index.vue.mjs +4 -0
  36. package/es/src/ap-table/components/setting/template/index.vue2.mjs +51 -0
  37. package/es/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
  38. package/es/src/ap-table/components/setting/template/item.vue.mjs +4 -0
  39. package/es/src/ap-table/components/setting/template/item.vue2.mjs +77 -0
  40. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  41. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +26 -29
  42. package/es/src/ap-table/components/setting/utils.d.ts +1 -0
  43. package/es/src/ap-table/components/setting/utils.mjs +22 -15
  44. package/es/src/ap-table/constants.d.ts +2 -4
  45. package/es/src/ap-table/context.mjs +1 -1
  46. package/es/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
  47. package/es/src/ap-table/hooks/use-table-column-state.mjs +32 -120
  48. package/es/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
  49. package/es/src/ap-table/hooks/use-table-template-storage.mjs +150 -0
  50. package/es/src/ap-table/interface.d.ts +26 -3
  51. package/es/src/ap-table/style/index.d.ts +1 -0
  52. package/es/src/ap-table/style/index.mjs +2 -1
  53. package/es/src/ap-table/style/setting.d.ts +2 -0
  54. package/es/src/ap-table/style/setting.mjs +114 -19
  55. package/es/src/ap-table/utils.mjs +1 -1
  56. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +1 -1
  57. package/es/src/business/ag-grid-modal/style/index.mjs +7 -7
  58. package/es/src/business/ap-attachment/ApAttachment.mjs +96 -89
  59. package/es/src/business/ap-attachment/style/index.mjs +33 -16
  60. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +24 -22
  61. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
  62. package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +35 -31
  63. package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
  64. package/es/src/business/ap-batch-action-group/interface.d.ts +1 -1
  65. package/es/src/business/ap-download/hooks/index.mjs +1 -1
  66. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +1 -3
  67. package/es/src/business/ap-keep-alive/hook.mjs +1 -1
  68. package/es/src/business/ap-keep-alive/utils.mjs +1 -1
  69. package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +19 -19
  70. package/es/src/business/ap-upload/components/Picture.vue2.mjs +34 -34
  71. package/es/src/business/ap-value-select-card/style/index.mjs +3 -2
  72. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +21 -21
  73. package/es/src/business/ap-view/hooks/use-view-provide.mjs +1 -1
  74. package/es/src/business/ap-view/style/index.mjs +2 -2
  75. package/es/src/check-card/context.mjs +1 -1
  76. package/es/src/config-provider/constants.mjs +1 -1
  77. package/es/src/config-provider/hooks/use-locale.mjs +1 -1
  78. package/es/src/config-provider/hooks/use-namespace.mjs +1 -1
  79. package/es/src/config-provider/hooks/use-token.mjs +1 -1
  80. package/es/src/design-token/index.mjs +5 -5
  81. package/es/src/editable-table/utils.mjs +1 -1
  82. package/es/src/locale/lang/en.mjs +15 -4
  83. package/es/src/locale/lang/zh-cn.mjs +18 -7
  84. package/es/src/text/context.mjs +1 -1
  85. package/es/src/time-ago/useTimeAgo.mjs +26 -27
  86. package/es/src/utils/data-range-persets.d.ts +13 -1
  87. package/es/src/utils/data-range-persets.mjs +80 -60
  88. package/es/src/utils/index.d.ts +1 -0
  89. package/es/src/utils/index.mjs +56 -48
  90. package/es/src/utils/retry.d.ts +12 -0
  91. package/es/src/utils/retry.mjs +27 -0
  92. package/es/src/utils/slot.mjs +1 -1
  93. package/es/src/version.d.ts +1 -1
  94. package/es/src/version.mjs +1 -1
  95. package/lib/src/ag-grid/components/loading/index.vue.d.ts +3 -0
  96. package/lib/src/ag-grid/components/loading/index.vue.js +1 -0
  97. package/lib/src/ag-grid/components/loading/index.vue2.js +1 -0
  98. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  99. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  100. package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -1
  101. package/lib/src/ag-grid/index.vue.js +1 -1
  102. package/lib/src/ag-grid/interface.d.ts +4 -0
  103. package/lib/src/ag-grid/style/index.js +1 -1
  104. package/lib/src/ap-drawer/interface.d.ts +13 -2
  105. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  106. package/lib/src/ap-field/select/index.vue.d.ts +1 -2
  107. package/lib/src/ap-field/select/index.vue.js +1 -1
  108. package/lib/src/ap-field/style/index.js +1 -1
  109. package/lib/src/ap-field/style/select.d.ts +2 -0
  110. package/lib/src/ap-field/style/select.js +1 -0
  111. package/lib/src/ap-form/items/select/index.vue.d.ts +4 -8
  112. package/lib/src/ap-grid/utils/table.js +1 -1
  113. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  114. package/lib/src/ap-table/components/setting/context.d.ts +17 -0
  115. package/lib/src/ap-table/components/setting/context.js +1 -0
  116. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +1 -1
  117. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  118. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  119. package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +844 -0
  120. package/lib/src/ap-table/components/setting/template/edit-form.vue.js +1 -0
  121. package/lib/src/ap-table/components/setting/template/edit-form.vue2.js +1 -0
  122. package/lib/src/ap-table/components/setting/template/index.vue.d.ts +11 -0
  123. package/lib/src/ap-table/components/setting/template/index.vue.js +1 -0
  124. package/lib/src/ap-table/components/setting/template/index.vue2.js +1 -0
  125. package/lib/src/ap-table/components/setting/template/item.vue.d.ts +13 -0
  126. package/lib/src/ap-table/components/setting/template/item.vue.js +1 -0
  127. package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -0
  128. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +1 -1
  129. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
  130. package/lib/src/ap-table/components/setting/utils.d.ts +1 -0
  131. package/lib/src/ap-table/components/setting/utils.js +1 -1
  132. package/lib/src/ap-table/constants.d.ts +2 -4
  133. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +4 -23
  134. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  135. package/lib/src/ap-table/hooks/use-table-template-storage.d.ts +49 -0
  136. package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -0
  137. package/lib/src/ap-table/interface.d.ts +26 -3
  138. package/lib/src/ap-table/style/index.d.ts +1 -0
  139. package/lib/src/ap-table/style/index.js +1 -1
  140. package/lib/src/ap-table/style/setting.d.ts +2 -0
  141. package/lib/src/ap-table/style/setting.js +1 -1
  142. package/lib/src/business/ag-grid-modal/style/index.js +1 -1
  143. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  144. package/lib/src/business/ap-attachment/style/index.js +1 -1
  145. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  146. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue.d.ts +1 -1
  147. package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
  148. package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
  149. package/lib/src/business/ap-batch-action-group/interface.d.ts +1 -1
  150. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  151. package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
  152. package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
  153. package/lib/src/business/ap-value-select-card/style/index.js +1 -1
  154. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  155. package/lib/src/business/ap-view/style/index.js +1 -1
  156. package/lib/src/design-token/index.js +1 -1
  157. package/lib/src/locale/lang/en.js +1 -1
  158. package/lib/src/locale/lang/zh-cn.js +1 -1
  159. package/lib/src/time-ago/useTimeAgo.js +1 -1
  160. package/lib/src/utils/data-range-persets.d.ts +13 -1
  161. package/lib/src/utils/data-range-persets.js +1 -1
  162. package/lib/src/utils/index.d.ts +1 -0
  163. package/lib/src/utils/index.js +1 -1
  164. package/lib/src/utils/retry.d.ts +12 -0
  165. package/lib/src/utils/retry.js +1 -0
  166. package/lib/src/version.d.ts +1 -1
  167. package/lib/src/version.js +1 -1
  168. package/package.json +2 -2
@@ -1,20 +1,20 @@
1
1
  import { genComponentStyleHook as d } from "../../../utils/cssinjs/index.mjs";
2
2
  const l = (e) => {
3
- const { componentCls: o } = e, i = `${o}--table-layout`;
3
+ const { componentCls: i } = e, o = `${i}--table-layout`;
4
4
  return {
5
- [`${o}--bordered`]: {
6
- border: `${e.lineWidth} ${e.lineType} ${e.colorBg1}`,
5
+ [`${i}--bordered`]: {
6
+ border: `${e.lineWidth} ${e.lineType} ${e.borderColorBase}`,
7
7
  padding: e.spaceXL,
8
8
  borderRadius: e.borderRadius,
9
9
  "--ag-grid-modal-layout-divider-offset": "32px"
10
10
  },
11
- [i]: {
11
+ [o]: {
12
12
  boxSizing: "border-box",
13
13
  display: "flex",
14
14
  flex: 1,
15
15
  justifyContent: "space-between",
16
16
  height: "100%",
17
- [`${i}-left`]: {
17
+ [`${o}-left`]: {
18
18
  flex: 1,
19
19
  minWidth: 0,
20
20
  paddingInlineEnd: e.spaceXL,
@@ -25,7 +25,7 @@ const l = (e) => {
25
25
  flex: 1
26
26
  }
27
27
  },
28
- [`${i}-right`]: {
28
+ [`${o}-right`]: {
29
29
  maxHeight: "100%",
30
30
  width: e.agGridModalRightWidth,
31
31
  paddingInlineStart: e.spaceXL,
@@ -45,7 +45,7 @@ const l = (e) => {
45
45
  content: '""',
46
46
  height: "calc(100% + var(--ag-grid-modal-layout-divider-offset,16px))",
47
47
  width: e.lineWidth,
48
- backgroundColor: e.colorBg1,
48
+ backgroundColor: e.borderColorBase,
49
49
  position: "absolute",
50
50
  left: 0,
51
51
  top: "-16px"
@@ -1,144 +1,151 @@
1
- import { defineComponent as j, ref as g, useSlots as M, computed as i, cloneVNode as R, toRaw as w, unref as B, createVNode as e, createTextVNode as D } from "vue";
2
- import { LoadingOutlined as N } from "@ant-design/icons-vue";
3
- import { Tooltip as A, Popover as G } from "@aplus-frontend/antdv";
4
- import { IconApAdLineDownload as H } from "@aplus-frontend/icon";
5
- import { debounce as q, isArray as E } from "lodash-unified";
6
- import { useToken as J } from "../../config-provider/hooks/use-token.mjs";
7
- import { warning as Q } from "../../utils/warning.mjs";
1
+ import { defineComponent as j, ref as g, useSlots as B, computed as c, cloneVNode as M, toRaw as w, unref as R, createVNode as e, createTextVNode as D } from "vue";
2
+ import { LoadingOutlined as T } from "@ant-design/icons-vue";
3
+ import { Tooltip as d, Popover as G } from "@aplus-frontend/antdv";
4
+ import { IconApAdLineDownload as O } from "@aplus-frontend/icon";
5
+ import { debounce as H, isArray as q } from "lodash-unified";
6
+ import { useToken as E } from "../../config-provider/hooks/use-token.mjs";
7
+ import { warning as J } from "../../utils/warning.mjs";
8
8
  import "../../config-provider/index.mjs";
9
- import { useOssInit as X } from "../ap-download/hooks/index.mjs";
10
- import { getHexWithOpacity as Y, getFileInfo as L } from "../ap-download/utils/getFileInfo.mjs";
11
- import { ApFilePreview as Z } from "../ap-file-preview/index.mjs";
12
- import { ApAttachmentProps as $ } from "./constans.mjs";
13
- import ee from "./style/index.mjs";
14
- import { useNamespace as te } from "../../config-provider/hooks/use-namespace.mjs";
15
- import { useGlobalConfig as T } from "../../config-provider/hooks/use-global-config.mjs";
16
- import { useLocale as ae } from "../../config-provider/hooks/use-locale.mjs";
17
- const Ne = /* @__PURE__ */ j({
9
+ import { useOssInit as Q } from "../ap-download/hooks/index.mjs";
10
+ import { getHexWithOpacity as X, getFileInfo as A } from "../ap-download/utils/getFileInfo.mjs";
11
+ import { ApFilePreview as Y } from "../ap-file-preview/index.mjs";
12
+ import { ApAttachmentProps as Z } from "./constans.mjs";
13
+ import $ from "./style/index.mjs";
14
+ import { useNamespace as ee } from "../../config-provider/hooks/use-namespace.mjs";
15
+ import { useGlobalConfig as P } from "../../config-provider/hooks/use-global-config.mjs";
16
+ import { useLocale as te } from "../../config-provider/hooks/use-locale.mjs";
17
+ const we = /* @__PURE__ */ j({
18
18
  name: "ApAttachment",
19
- props: $(),
19
+ props: Z(),
20
20
  setup(t, {
21
- emit: y
21
+ emit: N
22
22
  }) {
23
23
  const {
24
- b: P,
25
- e: l
26
- } = te("ap-attachment"), C = ee("ap-attachment"), d = T("apUpload"), F = T("downloadCenterTriggerConfig"), {
27
- token: x
28
- } = J(), {
24
+ b,
25
+ e: a
26
+ } = ee("ap-attachment"), C = $("ap-attachment"), f = P("apUpload"), L = P("downloadCenterTriggerConfig"), {
27
+ token: y
28
+ } = E(), {
29
29
  lang: I,
30
- t: c
31
- } = ae(), r = g(!1), u = g(""), f = M(), K = i(() => I.value === "zh-cn" ? "zh_CN" : "en_US"), s = i(() => t.needName ?? (d?.value?.needName === !0 ? {
30
+ t: s
31
+ } = te(), r = g(!1), m = g(""), p = B(), K = c(() => I.value === "zh-cn" ? "zh_CN" : "en_US"), i = c(() => t.needName ?? (f?.value?.needName === !0 ? {
32
32
  nameKey: "fileName",
33
33
  pathKey: "path"
34
- } : d?.value?.needName ?? {
34
+ } : f?.value?.needName ?? {
35
35
  nameKey: "fileName",
36
36
  pathKey: "filePath"
37
- })), p = i(() => t.attachmentList.length === 1), b = i(() => s.value ? t.attachmentList.length > 0 && s.value && s.value?.nameKey ? t.attachmentList[0][s.value.nameKey] : "" : t.attachmentList.length > 0 ? t.attachmentList[0].fileName : ""), S = i(() => p.value ? b.value : c("ap.apAttachment.downloadall")), k = i(() => ({
38
- "--download-main-color": x.value?.colorLink,
39
- "--download-main-color-opacity": Y(x.value?.colorLink, 0.6)
40
- })), U = i(() => t.getOssAccess || d.value?.getOssAccess), V = i(() => {
41
- const a = f.default ? f.default()[0] : null;
42
- return a ? R(a, {
37
+ })), S = c(() => t.attachmentList.length === 1), U = c(() => i.value ? t.attachmentList.length > 0 && i.value && i.value?.nameKey ? t.attachmentList[0][i.value.nameKey] : "" : t.attachmentList.length > 0 ? t.attachmentList[0].fileName : ""), x = c(() => ({
38
+ "--download-main-color": y.value?.colorLink,
39
+ "--download-main-color-opacity": X(y.value?.colorLink, 0.6)
40
+ })), V = c(() => t.getOssAccess || f.value?.getOssAccess), z = c(() => {
41
+ const l = p.default ? p.default()[0] : null;
42
+ return l ? M(l, {
43
43
  style: {
44
44
  "font-size": "16px"
45
45
  }
46
46
  }) : null;
47
- }), v = g(!1), h = q(async (a, n) => {
47
+ }), v = g(!1), h = H(async (l, n) => {
48
48
  if (!t.disabled) {
49
- r.value = !0, n && (u.value = n);
49
+ r.value = !0, n && (m.value = n);
50
50
  try {
51
- const o = E(w(a)) ? w(a) : [w(a)];
52
- if (F.value?.trigger) {
53
- const m = L(s.value, o).map((O) => ({
54
- objectName: O.path,
55
- fileName: O.fileName
51
+ const o = q(w(l)) ? w(l) : [w(l)];
52
+ if (L.value?.trigger) {
53
+ const u = A(i.value, o).map((k) => ({
54
+ objectName: k.path,
55
+ fileName: k.fileName
56
56
  }));
57
- F.value?.trigger(m), y("downloadCallback", m);
57
+ L.value?.trigger(u), N("downloadCallback", u);
58
58
  } else {
59
- const m = await (await X(U.value, B(K))).downloadFile(L(s.value, o));
60
- y("downloadCallback", m);
59
+ const u = await (await Q(V.value, R(K))).downloadFile(A(i.value, o));
60
+ N("downloadCallback", u);
61
61
  }
62
62
  } catch (o) {
63
- Q(!1, o);
63
+ J(!1, o);
64
64
  } finally {
65
- r.value = !1, u.value = "";
65
+ r.value = !1, m.value = "";
66
66
  }
67
67
  }
68
- }, 500), z = (a) => {
69
- const n = L(s.value, a)?.[0];
70
- Z.createFilePreviewModal({
68
+ }, 500), F = (l) => {
69
+ const n = A(i.value, l)?.[0];
70
+ Y.createFilePreviewModal({
71
71
  src: n.path,
72
72
  fileName: n.fileName
73
73
  }), v.value = !1;
74
- }, W = (a) => a && a.length > 0 ? e("ul", {
75
- class: [l("file-list"), C.value],
76
- style: k.value
77
- }, [a.map((n, o) => e("li", {
74
+ }, W = (l) => l && l.length > 0 ? e("ul", {
75
+ class: [a("file-list"), C.value],
76
+ style: x.value
77
+ }, [l.map((n, o) => e("li", {
78
78
  key: o,
79
- class: [l("file-item")]
80
- }, [r.value && u.value === o + 1 ? e("span", {
81
- class: [l("spin")]
82
- }, [e(N, {
79
+ class: [a("file-item")]
80
+ }, [r.value && m.value === o + 1 ? e("span", {
81
+ class: [a("spin")]
82
+ }, [e(T, {
83
83
  spin: !0
84
- }, null)]) : null, e(A, {
85
- title: c("ap.apAppendix.previewFile")
84
+ }, null)]) : null, e(d, {
85
+ title: s("ap.apAppendix.previewFile")
86
86
  }, {
87
87
  default: () => [e("span", {
88
- class: [l("file-item-text")],
89
- onClick: () => z(n)
88
+ class: [a("file-item-text")],
89
+ onClick: () => F(n)
90
90
  }, [n.fileName])]
91
- }), e(A, {
92
- title: c("ap.apAppendix.downloadFile")
91
+ }), e(d, {
92
+ title: s("ap.apAppendix.downloadFile")
93
93
  }, {
94
94
  default: () => [e("span", {
95
- class: [l("file-item-download")],
95
+ class: [a("file-item-download")],
96
96
  onClick: () => h(n, o + 1)
97
- }, [e(H, null, null)])]
97
+ }, [e(O, null, null)])]
98
98
  })])), e("li", {
99
- class: [l("download-all")],
99
+ class: [a("download-all")],
100
100
  onClick: () => h(t.attachmentList, "all")
101
- }, [r.value && u.value === "all" ? e("span", {
102
- class: [l("spin")]
103
- }, [e(N, {
101
+ }, [r.value && m.value === "all" ? e("span", {
102
+ class: [a("spin")]
103
+ }, [e(T, {
104
104
  spin: !0
105
- }, null)]) : null, c("ap.apAttachment.downloadall")])]) : null;
105
+ }, null)]) : null, s("ap.apAttachment.downloadall")])]) : null;
106
106
  return () => t.attachmentList?.length > 0 && e("div", {
107
- class: [P(), C.value],
108
- style: [k.value]
109
- }, [e(A, {
110
- title: S.value,
107
+ class: [b(), C.value],
108
+ style: [x.value]
109
+ }, [e("div", {
110
+ class: [a("content")]
111
+ }, [e(d, {
112
+ title: s("ap.apAppendix.previewFile"),
111
113
  placement: t.textToolTipPlacement,
112
114
  color: t.toolTipBgColor
113
115
  }, {
114
116
  default: () => [e("div", {
115
- class: [l("content")],
116
- onClick: () => h(p.value ? t.attachmentList[0] : t.attachmentList, "global")
117
- }, [r.value && u.value === "global" ? e("div", {
118
- class: [l("spin")]
119
- }, [e(N, {
120
- spin: !0
121
- }, null)]) : null, f.default ? e("div", {
122
- class: [l("text-render")]
123
- }, [V.value, D(" ")]) : null, e("div", {
124
- class: [l("text-inner")],
117
+ class: [a("content-text")],
118
+ onClick: () => F(t.attachmentList[0])
119
+ }, [p.default ? e("div", {
120
+ class: [a("text-render")]
121
+ }, [z.value, D(" ")]) : null, e("div", {
122
+ class: [a("text-inner")],
125
123
  style: {
126
124
  "max-width": t.maxWidth ? t.maxWidth + "px" : "auto"
127
125
  }
128
- }, [b.value])])]
129
- }), e(G, {
126
+ }, [U.value])])]
127
+ }), e(d, {
128
+ title: s("ap.apAppendix.downloadFile"),
129
+ placement: t.textToolTipPlacement,
130
+ color: t.toolTipBgColor
131
+ }, {
132
+ default: () => [e("span", {
133
+ class: [a("content-download")],
134
+ onClick: () => h(t.attachmentList[0], 0)
135
+ }, [e(O, null, null)])]
136
+ })]), e(G, {
130
137
  content: W(t.attachmentList),
131
138
  placement: t.fileMorePopoverPlacement,
132
139
  color: "#fff",
133
140
  open: v.value,
134
- "onUpdate:open": (a) => v.value = a
141
+ "onUpdate:open": (l) => v.value = l
135
142
  }, {
136
- default: () => [!p.value && e("div", {
137
- class: [l("more")]
138
- }, [c("ap.apAttachment.more")])]
143
+ default: () => [!S.value && e("div", {
144
+ class: [a("more")]
145
+ }, [s("ap.apAttachment.all")])]
139
146
  })]);
140
147
  }
141
148
  });
142
149
  export {
143
- Ne as default
150
+ we as default
144
151
  };
@@ -1,26 +1,43 @@
1
- import { genComponentStyleHook as e } from "../../../utils/cssinjs/index.mjs";
1
+ import { genComponentStyleHook as r } from "../../../utils/cssinjs/index.mjs";
2
2
  const a = (o) => {
3
- const { componentCls: r } = o;
3
+ const { componentCls: e } = o;
4
4
  return {
5
- [r]: {
5
+ [e]: {
6
6
  display: "flex",
7
7
  justifyContent: "space-between",
8
8
  alignItems: "center",
9
- [`${r}__content`]: {
9
+ [`${e}__content`]: {
10
10
  width: "80%",
11
11
  flex: 1,
12
+ overflow: "hidden",
12
13
  display: "flex",
13
- flexShrink: 0,
14
- alignItems: "center"
14
+ alignItems: "center",
15
+ "&:hover": {
16
+ [`${e}__content-download`]: {
17
+ opacity: 1
18
+ }
19
+ },
20
+ "&-text": {
21
+ display: "flex",
22
+ alignItems: "center",
23
+ overflow: "hidden"
24
+ },
25
+ "&-download": {
26
+ cursor: "pointer",
27
+ color: "var(--download-main-color)",
28
+ marginLeft: o.space,
29
+ opacity: 0,
30
+ fontSize: o.fontSizeXL
31
+ }
15
32
  },
16
- [`${r}__text-render`]: {
33
+ [`${e}__text-render`]: {
17
34
  color: "var(--download-main-color)",
18
35
  marginInlineEnd: o.spaceXS,
19
36
  "&:hover": {
20
37
  color: "var(--download-main-color-opacity)"
21
38
  }
22
39
  },
23
- [`${r}__text-inner`]: {
40
+ [`${e}__text-inner`]: {
24
41
  flex: 1,
25
42
  flexShrink: 0,
26
43
  whiteSpace: "nowrap",
@@ -33,7 +50,7 @@ const a = (o) => {
33
50
  color: "var(--download-main-color-opacity)"
34
51
  }
35
52
  },
36
- [`${r}__more`]: {
53
+ [`${e}__more`]: {
37
54
  fontSize: o.fontSize,
38
55
  lineHeight: o.lineHeight,
39
56
  cursor: "pointer",
@@ -44,24 +61,24 @@ const a = (o) => {
44
61
  }
45
62
  }
46
63
  },
47
- [`${r}__spin`]: {
64
+ [`${e}__spin`]: {
48
65
  float: "left",
49
66
  marginRight: o.spaceXS
50
67
  },
51
- [`${r}__file-list`]: {
68
+ [`${e}__file-list`]: {
52
69
  maxWidth: o.apAttachmentListMaxWidth,
53
70
  display: "flex",
54
71
  flexDirection: "column",
55
72
  margin: 0,
56
73
  padding: 0,
57
- [`${r}__file-item`]: {
74
+ [`${e}__file-item`]: {
58
75
  flex: 1,
59
76
  wordWrap: "break-word",
60
77
  marginBlockEnd: o.spaceLG,
61
78
  fontSize: o.fontSize,
62
79
  color: o.textColor1,
63
80
  "&:hover": {
64
- [`${r}__file-item-download`]: {
81
+ [`${e}__file-item-download`]: {
65
82
  opacity: 1
66
83
  }
67
84
  },
@@ -79,7 +96,7 @@ const a = (o) => {
79
96
  fontSize: o.fontSizeXL
80
97
  }
81
98
  },
82
- [`${r}__download-all`]: {
99
+ [`${e}__download-all`]: {
83
100
  fontSize: o.fontSize,
84
101
  color: "var(--download-main-color)",
85
102
  cursor: "pointer",
@@ -90,7 +107,7 @@ const a = (o) => {
90
107
  }
91
108
  }
92
109
  };
93
- }, n = e(
110
+ }, i = r(
94
111
  "ApAttachment",
95
112
  (o) => [a(o)],
96
113
  {
@@ -98,5 +115,5 @@ const a = (o) => {
98
115
  }
99
116
  );
100
117
  export {
101
- n as default
118
+ i as default
102
119
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as O, useSlots as j, computed as t, createBlock as u, createCommentVNode as x, openBlock as p, unref as r, mergeProps as f, createSlots as S, withCtx as n, createElementVNode as E, normalizeStyle as q, resolveDynamicComponent as k, h as L, createVNode as i, renderList as g, renderSlot as A, normalizeProps as b, guardReactiveProps as v, normalizeClass as F } from "vue";
1
+ import { defineComponent as O, useSlots as j, computed as o, createBlock as l, createCommentVNode as x, openBlock as p, unref as r, mergeProps as f, createSlots as S, withCtx as n, createElementVNode as E, normalizeStyle as q, resolveDynamicComponent as k, h as L, createVNode as i, renderList as g, renderSlot as A, normalizeProps as b, guardReactiveProps as v, normalizeClass as F } from "vue";
2
2
  import { DownOutlined as H } from "@ant-design/icons-vue";
3
3
  import { DropdownButton as J, Dropdown as K } from "@aplus-frontend/antdv";
4
4
  import { usePermission as M } from "@aplus-frontend/hooks";
@@ -11,7 +11,7 @@ import { useNamespace as W } from "../../config-provider/hooks/use-namespace.mjs
11
11
  import { useLocale as X } from "../../config-provider/hooks/use-locale.mjs";
12
12
  import B from "./MenuItemGroup.vue2.mjs";
13
13
  import Y from "../../ap-button/ap-button.vue.mjs";
14
- const me = /* @__PURE__ */ O({
14
+ const de = /* @__PURE__ */ O({
15
15
  __name: "ApBatchActionGroup",
16
16
  props: {
17
17
  selectedRows: {},
@@ -19,17 +19,19 @@ const me = /* @__PURE__ */ O({
19
19
  menuList: {}
20
20
  },
21
21
  setup(C, { expose: $ }) {
22
- const { b: h } = W("ap-batch-action-group"), D = U("ap-batch-action-group"), { t: R } = X(), { columns: T, dataSource: N } = Q(), e = C, { hasPermission: z } = M(), y = j(), w = t(
22
+ const { b: h } = W("ap-batch-action-group"), D = U("ap-batch-action-group"), { t: R } = X(), { columns: T, dataSource: N } = Q(), e = C, { hasPermission: z } = M(), y = j(), w = o(
23
23
  () => e?.buttonProps?.dropdownType || "default"
24
- ), a = t(
24
+ ), a = o(
25
25
  () => e?.buttonProps?.type || "borderLink"
26
- ), P = t(
26
+ ), P = o(
27
27
  () => e?.buttonProps?.content || R("ap.apApBatchActionGroup.batchOperation")
28
- ), V = t(() => e?.selectedRows || []), c = t(
28
+ ), V = o(() => e?.selectedRows || []), c = o(
29
29
  () => e?.buttonProps?.disabled ?? (Array.isArray(e.selectedRows) ? V.value.length === 0 : !1)
30
- ), G = t(() => a.value === "borderLink" ? c.value ? void 0 : "var(--ap-button-border-link-color)" : void 0), l = t(() => e?.menuList?.filter((o) => {
31
- let m = o?.ifShow;
32
- return !o?.ifShow && o?.auth && (m = () => z(o.auth)), m?.() ?? !0;
30
+ ), G = o(() => a.value === "borderLink" ? c.value ? void 0 : "var(--ap-button-border-link-color)" : void 0), u = o(() => e?.menuList?.filter((t) => {
31
+ if (t === "divider")
32
+ return !0;
33
+ let d = t?.ifShow;
34
+ return !t?.ifShow && t?.auth && (d = () => z(t.auth)), d?.() ?? !0;
33
35
  }) || []);
34
36
  function _() {
35
37
  return e?.buttonProps ? {
@@ -40,18 +42,18 @@ const me = /* @__PURE__ */ O({
40
42
  return $({
41
43
  columns: T,
42
44
  dataSource: N
43
- }), (o, m) => l.value.length && w.value === "dropdown" ? (p(), u(r(J), f({
45
+ }), (t, d) => u.value.length && w.value === "dropdown" ? (p(), l(r(J), f({
44
46
  key: 0,
45
47
  class: [r(h)(), r(D)]
46
48
  }, {
47
- ...o.$attrs,
49
+ ...t.$attrs,
48
50
  ..._(),
49
51
  disabled: c.value
50
52
  }), S({
51
53
  overlay: n(() => [
52
54
  i(B, f({
53
55
  ...e
54
- }, { "menu-list": l.value }), null, 16, ["menu-list"])
56
+ }, { "menu-list": u.value }), null, 16, ["menu-list"])
55
57
  ]),
56
58
  default: n(() => [
57
59
  E("span", {
@@ -59,18 +61,18 @@ const me = /* @__PURE__ */ O({
59
61
  color: G.value
60
62
  })
61
63
  }, [
62
- (p(), u(k(L("span", [P.value]))))
64
+ (p(), l(k(L("span", [P.value]))))
63
65
  ], 4)
64
66
  ]),
65
67
  _: 2
66
68
  }, [
67
69
  g(y, (I, s) => ({
68
70
  name: s,
69
- fn: n((d) => [
70
- A(o.$slots, s, b(v(d || {})))
71
+ fn: n((m) => [
72
+ A(t.$slots, s, b(v(m || {})))
71
73
  ])
72
74
  }))
73
- ]), 1040, ["class"])) : l.value.length && w.value === "default" ? (p(), u(r(K), {
75
+ ]), 1040, ["class"])) : u.value.length && w.value === "default" ? (p(), l(r(K), {
74
76
  key: 1,
75
77
  class: F([r(h)()]),
76
78
  disabled: c.value
@@ -78,16 +80,16 @@ const me = /* @__PURE__ */ O({
78
80
  overlay: n(() => [
79
81
  i(B, f({
80
82
  ...e
81
- }, { "menu-list": l.value }), null, 16, ["menu-list"])
83
+ }, { "menu-list": u.value }), null, 16, ["menu-list"])
82
84
  ]),
83
85
  default: n(() => [
84
86
  i(r(Y), b(v({
85
- ...o.$attrs,
87
+ ...t.$attrs,
86
88
  ..._(),
87
89
  type: a.value
88
90
  })), {
89
91
  default: n(() => [
90
- (p(), u(k(L("span", [P.value])))),
92
+ (p(), l(k(L("span", [P.value])))),
91
93
  i(r(H))
92
94
  ]),
93
95
  _: 1
@@ -97,13 +99,13 @@ const me = /* @__PURE__ */ O({
97
99
  }, [
98
100
  g(y, (I, s) => ({
99
101
  name: s,
100
- fn: n((d) => [
101
- A(o.$slots, s, b(v(d || {})))
102
+ fn: n((m) => [
103
+ A(t.$slots, s, b(v(m || {})))
102
104
  ])
103
105
  }))
104
106
  ]), 1032, ["class", "disabled"])) : x("", !0);
105
107
  }
106
108
  });
107
109
  export {
108
- me as default
110
+ de as default
109
111
  };
@@ -1,7 +1,7 @@
1
1
  import { ApBatchActionGroupMenuProps, ApBatchActionGroupProps } from './interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  type __VLS_Props = ApBatchActionGroupProps & {
4
- menuList: ApBatchActionGroupMenuProps[];
4
+ menuList: (ApBatchActionGroupMenuProps | 'divider')[];
5
5
  };
6
6
  declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
7
7
  export default _default;
@@ -1,48 +1,52 @@
1
- import { defineComponent as p, ref as m, createBlock as r, openBlock as o, unref as a, withCtx as d, createElementBlock as _, Fragment as u, renderList as v, mergeProps as w, createElementVNode as y, withDirectives as h, createVNode as k, vShow as b, resolveDynamicComponent as g, h as C } from "vue";
2
- import { LoadingOutlined as R } from "@ant-design/icons-vue";
3
- import { Menu as L, MenuItem as M } from "@aplus-frontend/antdv";
4
- const B = { style: { display: "flex", "align-items": "center" } }, I = /* @__PURE__ */ p({
1
+ import { defineComponent as y, ref as _, createBlock as r, openBlock as o, unref as l, withCtx as c, createElementBlock as u, Fragment as a, renderList as k, mergeProps as m, createElementVNode as w, withDirectives as h, createVNode as b, vShow as g, resolveDynamicComponent as C, h as R } from "vue";
2
+ import { LoadingOutlined as L } from "@ant-design/icons-vue";
3
+ import { Menu as f, MenuItem as M } from "@aplus-frontend/antdv";
4
+ const B = { style: { display: "flex", "align-items": "center" } }, N = /* @__PURE__ */ y({
5
5
  __name: "MenuItemGroup",
6
6
  props: {
7
7
  selectedRows: {},
8
8
  buttonProps: {},
9
9
  menuList: {}
10
10
  },
11
- setup(i) {
12
- const l = i, t = m({});
13
- async function f(s, c) {
14
- const e = s?.id || c;
15
- t.value[e] = !0;
11
+ setup(p) {
12
+ const s = p, n = _({});
13
+ async function v(d, i) {
14
+ const e = d?.id || i;
15
+ n.value[e] = !0;
16
16
  try {
17
- await s?.onClick?.({ selectedRows: l?.selectedRows });
17
+ await d?.onClick?.({ selectedRows: s?.selectedRows });
18
18
  } finally {
19
- t.value[e] = void 0;
19
+ n.value[e] = void 0;
20
20
  }
21
21
  }
22
- return (s, c) => (o(), r(a(L), null, {
23
- default: d(() => [
24
- (o(!0), _(u, null, v(l.menuList, (e, n) => (o(), r(a(M), w({
25
- key: e?.id || n
26
- }, { ref_for: !0 }, {
27
- ...e,
28
- onClick: () => f(e, n),
29
- disabled: t.value[e?.id || n] ?? (typeof e?.disabled == "function" ? e?.disabled({ selectedRows: l?.selectedRows }) : e?.disabled) ?? !1
30
- }), {
31
- default: d(() => [
32
- y("div", B, [
33
- h(k(a(R), { style: { "margin-right": "10px" } }, null, 512), [
34
- [b, t.value[e?.id || n]]
35
- ]),
36
- (o(), r(g(C(u, [e?.content]))))
37
- ])
38
- ]),
39
- _: 2
40
- }, 1040))), 128))
22
+ return (d, i) => (o(), r(l(f), null, {
23
+ default: c(() => [
24
+ (o(!0), u(a, null, k(s.menuList, (e, t) => (o(), u(a, {
25
+ key: e === "divider" ? `divider-${t}` : e?.id || t
26
+ }, [
27
+ e === "divider" ? (o(), r(l(f).Divider, { key: 0 })) : (o(), r(l(M), m({
28
+ key: e?.id || t
29
+ }, { ref_for: !0 }, {
30
+ ...e,
31
+ onClick: () => v(e, t),
32
+ disabled: n.value[e?.id || t] ?? (typeof e?.disabled == "function" ? e?.disabled({ selectedRows: s?.selectedRows }) : e?.disabled) ?? !1
33
+ }), {
34
+ default: c(() => [
35
+ w("div", B, [
36
+ h(b(l(L), { style: { "margin-right": "10px" } }, null, 512), [
37
+ [g, n.value[e?.id || t]]
38
+ ]),
39
+ (o(), r(C(R(a, [e?.content]))))
40
+ ])
41
+ ]),
42
+ _: 2
43
+ }, 1040))
44
+ ], 64))), 128))
41
45
  ]),
42
46
  _: 1
43
47
  }));
44
48
  }
45
49
  });
46
50
  export {
47
- I as default
51
+ N as default
48
52
  };
@@ -322,7 +322,7 @@ declare const ApBatchActionGroup: {
322
322
  type?: ButtonType | "borderLink" | undefined;
323
323
  content?: VNodeChild;
324
324
  }) | undefined;
325
- menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
325
+ menuList?: ("divider" | ApBatchActionGroupMenuProps<any>)[] | undefined;
326
326
  }> & Readonly<{}>, {
327
327
  columns: ComputedRef<TableColumnsType<any>> | undefined;
328
328
  dataSource: ComputedRef<any[]> | undefined;
@@ -644,7 +644,7 @@ declare const ApBatchActionGroup: {
644
644
  type?: ButtonType | "borderLink" | undefined;
645
645
  content?: VNodeChild;
646
646
  }) | undefined;
647
- menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
647
+ menuList?: ("divider" | ApBatchActionGroupMenuProps<any>)[] | undefined;
648
648
  }> & Readonly<{}>, {
649
649
  columns: ComputedRef<TableColumnsType<any>> | undefined;
650
650
  dataSource: ComputedRef<any[]> | undefined;
@@ -963,7 +963,7 @@ declare const ApBatchActionGroup: {
963
963
  type?: ButtonType | "borderLink" | undefined;
964
964
  content?: VNodeChild;
965
965
  }) | undefined;
966
- menuList?: ApBatchActionGroupMenuProps<any>[] | undefined;
966
+ menuList?: ("divider" | ApBatchActionGroupMenuProps<any>)[] | undefined;
967
967
  }> & Readonly<{}>, {
968
968
  columns: ComputedRef<TableColumnsType<any>> | undefined;
969
969
  dataSource: ComputedRef<any[]> | undefined;
@@ -43,7 +43,7 @@ export type ApBatchActionGroupProps<RecordType = any> = {
43
43
  /**
44
44
  * 下拉列表配置
45
45
  */
46
- menuList?: ApBatchActionGroupMenuProps<RecordType>[];
46
+ menuList?: (ApBatchActionGroupMenuProps<RecordType> | 'divider')[];
47
47
  };
48
48
  export type ApBatchActionGroupExpose<RecordType = any> = {
49
49
  columns?: ColumnType<any>[];