@aplus-frontend/ui 7.13.8 → 7.13.10

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 (249) hide show
  1. package/es/src/ag-grid/components/body-cell/index.vue2.mjs +7 -7
  2. package/es/src/ag-grid/components/empty/index.vue2.mjs +10 -10
  3. package/es/src/ag-grid/components/header-cell/index.vue2.mjs +37 -37
  4. package/es/src/ag-grid/components/row/index.vue2.mjs +5 -5
  5. package/es/src/ag-grid/components/tooltip/index.vue2.mjs +12 -12
  6. package/es/src/ag-grid/editable/form-item.vue.mjs +49 -49
  7. package/es/src/ag-grid/editable/index.vue.mjs +27 -27
  8. package/es/src/ag-grid/hooks/use-columns.d.ts +2 -0
  9. package/es/src/ag-grid/hooks/use-columns.mjs +35 -17
  10. package/es/src/ag-grid/index.vue.mjs +349 -318
  11. package/es/src/ap-action/group/index.vue.mjs +15 -15
  12. package/es/src/ap-action/item/index.vue2.mjs +28 -28
  13. package/es/src/ap-action/item-dropdown/index.vue.mjs +39 -39
  14. package/es/src/ap-field/checkbox/index.vue.mjs +19 -19
  15. package/es/src/ap-field/checkbox/read.vue2.mjs +9 -9
  16. package/es/src/ap-field/date/index.vue.mjs +50 -50
  17. package/es/src/ap-field/date/read.vue2.mjs +7 -7
  18. package/es/src/ap-field/date-range/index.vue.mjs +29 -29
  19. package/es/src/ap-field/date-range/read.vue2.mjs +22 -22
  20. package/es/src/ap-field/hooks/use-default-presets.mjs +59 -16
  21. package/es/src/ap-field/interface.d.ts +46 -1
  22. package/es/src/ap-field/number/index.vue.mjs +24 -24
  23. package/es/src/ap-field/radio/index.vue.mjs +24 -24
  24. package/es/src/ap-field/second/index.vue.mjs +15 -15
  25. package/es/src/ap-field/second/read.vue2.mjs +7 -7
  26. package/es/src/ap-field/segmented/index.vue.mjs +24 -24
  27. package/es/src/ap-field/select/index.vue.d.ts +12 -2
  28. package/es/src/ap-field/select/index.vue.mjs +127 -124
  29. package/es/src/ap-field/select/read.vue2.mjs +6 -6
  30. package/es/src/ap-field/slider/index.vue.mjs +11 -11
  31. package/es/src/ap-field/style/select.mjs +53 -36
  32. package/es/src/ap-field/switch/index.vue.mjs +45 -45
  33. package/es/src/ap-field/text/read-password.vue2.mjs +13 -13
  34. package/es/src/ap-field/text/read.vue2.mjs +3 -3
  35. package/es/src/ap-field/text-area/index.vue.mjs +29 -29
  36. package/es/src/ap-field/text-area/read.vue2.mjs +12 -12
  37. package/es/src/ap-field/tree-select/index.vue.mjs +31 -31
  38. package/es/src/ap-form/ap-form.vue2.mjs +46 -46
  39. package/es/src/ap-form/drawer-form/index.vue.mjs +30 -30
  40. package/es/src/ap-form/item/index.vue.mjs +75 -75
  41. package/es/src/ap-form/items/checkbox/index.vue.mjs +10 -10
  42. package/es/src/ap-form/items/number/index.vue.mjs +17 -17
  43. package/es/src/ap-form/items/radio/index.vue.mjs +13 -13
  44. package/es/src/ap-form/items/switch/index.vue.mjs +14 -14
  45. package/es/src/ap-form/items/text/index.vue2.mjs +26 -26
  46. package/es/src/ap-form/items/text/password.vue.mjs +19 -19
  47. package/es/src/ap-form/items/text-area/index.vue.mjs +17 -17
  48. package/es/src/ap-form/modal-form/index.vue.mjs +34 -34
  49. package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +39 -39
  50. package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +7 -7
  51. package/es/src/ap-grid/editable/form-item.vue.mjs +46 -46
  52. package/es/src/ap-grid/editable/index.vue.mjs +19 -19
  53. package/es/src/ap-grid/index.vue.mjs +212 -212
  54. package/es/src/ap-list/index.vue.mjs +116 -116
  55. package/es/src/ap-table/ap-table.vue2.mjs +217 -217
  56. package/es/src/ap-table/components/index/index.vue2.mjs +9 -9
  57. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +52 -51
  58. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +21 -21
  59. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +15 -15
  60. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +69 -69
  61. package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +1 -0
  62. package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +31 -30
  63. package/es/src/ap-table/components/setting/template/index.vue2.mjs +25 -25
  64. package/es/src/ap-table/components/setting/template/item.vue2.mjs +41 -40
  65. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +14 -14
  66. package/es/src/ap-table/hooks/use-sorted-filtered.d.ts +18 -2
  67. package/es/src/ap-table/hooks/use-sorted-filtered.mjs +13 -11
  68. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +17 -2
  69. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +148 -142
  70. package/es/src/ap-table/style/setting.mjs +2 -2
  71. package/es/src/business/ag-grid-modal/modal-layout/index.vue2.mjs +54 -54
  72. package/es/src/business/ag-grid-modal/selected-items/default.vue2.mjs +13 -13
  73. package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +20 -20
  74. package/es/src/business/ap-descriptions/ap-descriptions.vue.mjs +33 -33
  75. package/es/src/business/ap-descriptions/help-message/index.vue2.mjs +13 -13
  76. package/es/src/business/ap-download/ap-download.vue.mjs +24 -24
  77. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.mjs +77 -77
  78. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +119 -112
  79. package/es/src/business/ap-export-group/handleExportDownload.d.ts +1 -1
  80. package/es/src/business/ap-export-group/handleExportDownload.mjs +2 -2
  81. package/es/src/business/ap-export-group/interface.d.ts +9 -0
  82. package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +33 -33
  83. package/es/src/business/ap-status/group/ApStatusGroup.vue2.mjs +12 -12
  84. package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +43 -43
  85. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +57 -57
  86. package/es/src/business/ap-tag/ap-tag-group.vue.mjs +37 -37
  87. package/es/src/business/ap-tag/ap-tag.vue.mjs +24 -24
  88. package/es/src/business/ap-title/ApTitle.vue2.mjs +27 -27
  89. package/es/src/business/ap-value-select-card/index.vue2.mjs +98 -98
  90. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  91. package/es/src/business/batch-input-group/form-item.vue.mjs +25 -25
  92. package/es/src/business/batch-input-group/index.vue.mjs +60 -60
  93. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +29 -29
  94. package/es/src/config-provider/config-provider-props.d.ts +1 -1
  95. package/es/src/config-provider/config-provider.d.ts +3 -0
  96. package/es/src/config-provider/hooks/use-global-config.d.ts +1 -0
  97. package/es/src/config-provider/index.d.ts +6 -0
  98. package/es/src/editable-table/form-item.vue.mjs +35 -35
  99. package/es/src/editable-table/index.vue.mjs +19 -19
  100. package/es/src/full-screen/index.vue.mjs +46 -46
  101. package/es/src/locale/lang/en.mjs +2 -1
  102. package/es/src/locale/lang/zh-cn.mjs +2 -1
  103. package/es/src/mask/index.vue.mjs +48 -48
  104. package/es/src/portal/index.vue.mjs +5 -5
  105. package/es/src/scroll-bar/internal.vue.mjs +62 -62
  106. package/es/src/scroll-view/index.vue.mjs +66 -66
  107. package/es/src/skeleton/components/desc/index.vue2.mjs +9 -9
  108. package/es/src/skeleton/components/desc/item-large.vue2.mjs +25 -25
  109. package/es/src/skeleton/components/desc/item.vue2.mjs +13 -13
  110. package/es/src/skeleton/components/list/index.vue2.mjs +14 -14
  111. package/es/src/skeleton/components/list/item.vue2.mjs +12 -12
  112. package/es/src/skeleton/components/page-header/index.vue2.mjs +8 -8
  113. package/es/src/skeleton/components/search-form/index.vue2.mjs +35 -35
  114. package/es/src/skeleton/components/table/index.vue2.mjs +17 -17
  115. package/es/src/skeleton/components/table/item.vue2.mjs +23 -23
  116. package/es/src/skeleton/descriptions.vue2.mjs +15 -15
  117. package/es/src/skeleton/list-page.vue2.mjs +12 -12
  118. package/es/src/splitter/Panel.vue2.mjs +11 -11
  119. package/es/src/splitter/SplitBar.vue2.mjs +79 -79
  120. package/es/src/splitter/Splitter.vue2.mjs +50 -50
  121. package/es/src/text/group.vue.mjs +8 -8
  122. package/es/src/text/index.vue.mjs +48 -48
  123. package/es/src/version.d.ts +1 -1
  124. package/es/src/version.mjs +1 -1
  125. package/lib/src/ag-grid/components/body-cell/index.vue2.js +1 -1
  126. package/lib/src/ag-grid/components/empty/index.vue2.js +1 -1
  127. package/lib/src/ag-grid/components/header-cell/index.vue2.js +1 -1
  128. package/lib/src/ag-grid/components/row/index.vue2.js +1 -1
  129. package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
  130. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  131. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  132. package/lib/src/ag-grid/hooks/use-columns.d.ts +2 -0
  133. package/lib/src/ag-grid/hooks/use-columns.js +1 -1
  134. package/lib/src/ag-grid/index.vue.js +1 -1
  135. package/lib/src/ap-action/group/index.vue.js +1 -1
  136. package/lib/src/ap-action/item/index.vue2.js +1 -1
  137. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  138. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  139. package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
  140. package/lib/src/ap-field/date/index.vue.js +1 -1
  141. package/lib/src/ap-field/date/read.vue2.js +1 -1
  142. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  143. package/lib/src/ap-field/date-range/read.vue2.js +1 -1
  144. package/lib/src/ap-field/hooks/use-default-presets.js +1 -1
  145. package/lib/src/ap-field/interface.d.ts +46 -1
  146. package/lib/src/ap-field/number/index.vue.js +1 -1
  147. package/lib/src/ap-field/radio/index.vue.js +1 -1
  148. package/lib/src/ap-field/second/index.vue.js +1 -1
  149. package/lib/src/ap-field/second/read.vue2.js +1 -1
  150. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  151. package/lib/src/ap-field/select/index.vue.d.ts +12 -2
  152. package/lib/src/ap-field/select/index.vue.js +1 -1
  153. package/lib/src/ap-field/select/read.vue2.js +1 -1
  154. package/lib/src/ap-field/slider/index.vue.js +1 -1
  155. package/lib/src/ap-field/style/select.js +1 -1
  156. package/lib/src/ap-field/switch/index.vue.js +1 -1
  157. package/lib/src/ap-field/text/read-password.vue2.js +1 -1
  158. package/lib/src/ap-field/text/read.vue2.js +1 -1
  159. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  160. package/lib/src/ap-field/text-area/read.vue2.js +1 -1
  161. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  162. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  163. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  164. package/lib/src/ap-form/item/index.vue.js +1 -1
  165. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  166. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  167. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  168. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  169. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  170. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  171. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  172. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  173. package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
  174. package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.js +1 -1
  175. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  176. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  177. package/lib/src/ap-grid/index.vue.js +1 -1
  178. package/lib/src/ap-list/index.vue.js +1 -1
  179. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  180. package/lib/src/ap-table/components/index/index.vue2.js +1 -1
  181. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  182. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
  183. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
  184. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
  185. package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +1 -0
  186. package/lib/src/ap-table/components/setting/template/edit-form.vue2.js +1 -1
  187. package/lib/src/ap-table/components/setting/template/index.vue2.js +1 -1
  188. package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
  189. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
  190. package/lib/src/ap-table/hooks/use-sorted-filtered.d.ts +18 -2
  191. package/lib/src/ap-table/hooks/use-sorted-filtered.js +1 -1
  192. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +17 -2
  193. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  194. package/lib/src/ap-table/style/setting.js +1 -1
  195. package/lib/src/business/ag-grid-modal/modal-layout/index.vue2.js +1 -1
  196. package/lib/src/business/ag-grid-modal/selected-items/default.vue2.js +1 -1
  197. package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
  198. package/lib/src/business/ap-descriptions/ap-descriptions.vue.js +1 -1
  199. package/lib/src/business/ap-descriptions/help-message/index.vue2.js +1 -1
  200. package/lib/src/business/ap-download/ap-download.vue.js +1 -1
  201. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.js +1 -1
  202. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  203. package/lib/src/business/ap-export-group/handleExportDownload.d.ts +1 -1
  204. package/lib/src/business/ap-export-group/handleExportDownload.js +1 -1
  205. package/lib/src/business/ap-export-group/interface.d.ts +9 -0
  206. package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
  207. package/lib/src/business/ap-status/group/ApStatusGroup.vue2.js +1 -1
  208. package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
  209. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  210. package/lib/src/business/ap-tag/ap-tag-group.vue.js +1 -1
  211. package/lib/src/business/ap-tag/ap-tag.vue.js +1 -1
  212. package/lib/src/business/ap-title/ApTitle.vue2.js +1 -1
  213. package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
  214. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  215. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  216. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  217. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
  218. package/lib/src/config-provider/config-provider-props.d.ts +1 -1
  219. package/lib/src/config-provider/config-provider.d.ts +3 -0
  220. package/lib/src/config-provider/hooks/use-global-config.d.ts +1 -0
  221. package/lib/src/config-provider/index.d.ts +6 -0
  222. package/lib/src/editable-table/form-item.vue.js +1 -1
  223. package/lib/src/editable-table/index.vue.js +1 -1
  224. package/lib/src/full-screen/index.vue.js +1 -1
  225. package/lib/src/locale/lang/en.js +1 -1
  226. package/lib/src/locale/lang/zh-cn.js +1 -1
  227. package/lib/src/mask/index.vue.js +1 -1
  228. package/lib/src/portal/index.vue.js +1 -1
  229. package/lib/src/scroll-bar/internal.vue.js +1 -1
  230. package/lib/src/scroll-view/index.vue.js +1 -1
  231. package/lib/src/skeleton/components/desc/index.vue2.js +1 -1
  232. package/lib/src/skeleton/components/desc/item-large.vue2.js +1 -1
  233. package/lib/src/skeleton/components/desc/item.vue2.js +1 -1
  234. package/lib/src/skeleton/components/list/index.vue2.js +1 -1
  235. package/lib/src/skeleton/components/list/item.vue2.js +1 -1
  236. package/lib/src/skeleton/components/page-header/index.vue2.js +1 -1
  237. package/lib/src/skeleton/components/search-form/index.vue2.js +1 -1
  238. package/lib/src/skeleton/components/table/index.vue2.js +1 -1
  239. package/lib/src/skeleton/components/table/item.vue2.js +1 -1
  240. package/lib/src/skeleton/descriptions.vue2.js +1 -1
  241. package/lib/src/skeleton/list-page.vue2.js +1 -1
  242. package/lib/src/splitter/Panel.vue2.js +1 -1
  243. package/lib/src/splitter/SplitBar.vue2.js +1 -1
  244. package/lib/src/splitter/Splitter.vue2.js +1 -1
  245. package/lib/src/text/group.vue.js +1 -1
  246. package/lib/src/text/index.vue.js +1 -1
  247. package/lib/src/version.d.ts +1 -1
  248. package/lib/src/version.js +1 -1
  249. package/package.json +3 -3
@@ -1,65 +1,66 @@
1
- import { defineComponent as f, ref as u, createElementBlock as d, openBlock as y, createVNode as t, unref as e, withCtx as l, createTextVNode as r, toDisplayString as m } from "vue";
2
- import { Flex as x, Button as c } from "@aplus-frontend/antdv";
3
- import { ApForm as C } from "../../../../ap-form/index.mjs";
1
+ import { defineComponent as f, ref as u, createElementBlock as d, openBlock as y, createVNode as l, unref as e, withCtx as o, createTextVNode as i, toDisplayString as r } from "vue";
2
+ import { Flex as C, Button as p } from "@aplus-frontend/antdv";
3
+ import { ApForm as b } from "../../../../ap-form/index.mjs";
4
4
  import "../../../../config-provider/index.mjs";
5
- import { useLocale as h } from "../../../../config-provider/hooks/use-locale.mjs";
6
- import { ApFormItemText as b } from "../../../../ap-form/items/text/index.mjs";
7
- const V = /* @__PURE__ */ f({
5
+ import { useLocale as g } from "../../../../config-provider/hooks/use-locale.mjs";
6
+ import { ApFormItemText as h } from "../../../../ap-form/items/text/index.mjs";
7
+ const B = /* @__PURE__ */ f({
8
8
  __name: "edit-form",
9
9
  props: {
10
10
  onConfirm: { type: Function },
11
11
  onCancel: { type: Function },
12
- initialValues: {}
12
+ initialValues: {},
13
+ isEdit: { type: Boolean }
13
14
  },
14
- setup(o) {
15
- const p = o, { t: a } = h(), n = u();
16
- async function s() {
17
- const i = await n.value?.validateFields();
18
- p.onConfirm(i?.label);
15
+ setup(m) {
16
+ const s = m, { t } = g(), n = u();
17
+ async function c() {
18
+ const a = await n.value?.validateFields();
19
+ s.onConfirm(a?.label);
19
20
  }
20
- return (i, g) => (y(), d("div", null, [
21
- t(e(C), {
21
+ return (a, T) => (y(), d("div", null, [
22
+ l(e(b), {
22
23
  ref_key: "formRef",
23
24
  ref: n,
24
25
  colon: !1,
25
26
  "label-col": { span: 24 },
26
- "initial-values": o.initialValues
27
+ "initial-values": a.initialValues
27
28
  }, {
28
- default: l(() => [
29
- t(e(b), {
29
+ default: o(() => [
30
+ l(e(h), {
30
31
  rules: [
31
32
  {
32
33
  required: !0,
33
- message: e(a)("ap.apTable.setting.templateNamePlaceholder")
34
+ message: e(t)("ap.apTable.setting.templateNamePlaceholder")
34
35
  }
35
36
  ],
36
37
  name: "label",
37
- label: e(a)("ap.apTable.setting.templateName")
38
+ label: a.isEdit ? e(t)("ap.apTable.setting.templateName") : e(t)("ap.apTable.setting.newTemplateName")
38
39
  }, null, 8, ["rules", "label"])
39
40
  ]),
40
41
  _: 1
41
42
  }, 8, ["initial-values"]),
42
- t(e(x), {
43
+ l(e(C), {
43
44
  justify: "end",
44
45
  gap: 8
45
46
  }, {
46
- default: l(() => [
47
- t(e(c), {
47
+ default: o(() => [
48
+ l(e(p), {
48
49
  style: { height: "24px" },
49
- onClick: o.onCancel
50
+ onClick: a.onCancel
50
51
  }, {
51
- default: l(() => [
52
- r(m(e(a)("ap.common.cancelText")), 1)
52
+ default: o(() => [
53
+ i(r(e(t)("ap.common.cancelText")), 1)
53
54
  ]),
54
55
  _: 1
55
56
  }, 8, ["onClick"]),
56
- t(e(c), {
57
+ l(e(p), {
57
58
  style: { height: "24px" },
58
59
  type: "primary",
59
- onClick: s
60
+ onClick: c
60
61
  }, {
61
- default: l(() => [
62
- r(m(e(a)("ap.common.save")), 1)
62
+ default: o(() => [
63
+ i(r(e(t)("ap.common.save")), 1)
63
64
  ]),
64
65
  _: 1
65
66
  })
@@ -70,5 +71,5 @@ const V = /* @__PURE__ */ f({
70
71
  }
71
72
  });
72
73
  export {
73
- V as default
74
+ B as default
74
75
  };
@@ -1,44 +1,44 @@
1
- import { defineComponent as d, createBlock as r, openBlock as a, unref as e, normalizeClass as l, withCtx as f, createElementVNode as c, createVNode as y, toDisplayString as g, createElementBlock as k, Fragment as h, renderList as C } from "vue";
2
- import { Flex as _, Divider as x } from "@aplus-frontend/antdv";
1
+ import { defineComponent as v, createBlock as l, openBlock as a, unref as e, normalizeClass as s, withCtx as d, createElementVNode as r, createVNode as f, toDisplayString as y, createElementBlock as g, Fragment as k, renderList as _ } from "vue";
2
+ import { Flex as h, Divider as C } from "@aplus-frontend/antdv";
3
3
  import "../../../../config-provider/index.mjs";
4
4
  import { useInjectApColumnSetting as L } from "../context.mjs";
5
5
  import "./item.vue.mjs";
6
- import { useLocale as z } from "../../../../config-provider/hooks/use-locale.mjs";
7
- import { useNamespace as A } from "../../../../config-provider/hooks/use-namespace.mjs";
8
- import B from "./item.vue2.mjs";
9
- const j = /* @__PURE__ */ d({
6
+ import { useLocale as x } from "../../../../config-provider/hooks/use-locale.mjs";
7
+ import { useNamespace as z } from "../../../../config-provider/hooks/use-namespace.mjs";
8
+ import A from "./item.vue2.mjs";
9
+ const j = /* @__PURE__ */ v({
10
10
  __name: "index",
11
11
  props: {
12
12
  customizeTemplateList: {},
13
13
  persistenceKey: {},
14
14
  onActiveChange: { type: Function }
15
15
  },
16
- setup(s, { expose: m }) {
17
- const { t: p } = z(), { b: n } = A("ap-column-setting-template-list"), { activeKey: o } = L();
18
- function u(t) {
19
- o.value = t;
16
+ setup(B, { expose: c }) {
17
+ const { t: m } = x(), { b: o } = z("ap-column-setting-template-list"), { activeKey: n } = L();
18
+ function p(t) {
19
+ n.value = t;
20
20
  }
21
- function v(t) {
22
- o.value = t;
21
+ function u(t) {
22
+ n.value = t;
23
23
  }
24
- return m({ updateActiveKey: v }), (t, F) => (a(), r(e(_), {
24
+ return c({ updateActiveKey: u }), (t, F) => (a(), l(e(h), {
25
25
  vertical: "",
26
- class: l(e(n)())
26
+ class: s(e(o)())
27
27
  }, {
28
- default: f(() => [
29
- c("div", {
30
- class: l(e(n)("title"))
31
- }, g(e(p)("ap.apTable.setting.templateSetting")), 3),
32
- y(e(x), { style: { margin: "0" } }),
33
- c("div", {
34
- class: l(e(n)("content"))
28
+ default: d(() => [
29
+ r("div", {
30
+ class: s(e(o)("title"))
31
+ }, y(e(m)("ap.apTable.setting.templateSetting")), 3),
32
+ f(e(C), { style: { margin: "0" } }),
33
+ r("div", {
34
+ class: s(e(o)("content"))
35
35
  }, [
36
- (a(!0), k(h, null, C(s.customizeTemplateList, (i) => (a(), r(B, {
36
+ (a(!0), g(k, null, _(t.customizeTemplateList, (i) => (a(), l(A, {
37
37
  key: i.key,
38
38
  value: i,
39
- "is-active": e(o) === i.key,
40
- "should-remove": s.customizeTemplateList.length > 1,
41
- onClick: () => u(i.key)
39
+ "is-active": e(n) === i.key,
40
+ "should-remove": t.customizeTemplateList.length > 1,
41
+ onClick: () => p(i.key)
42
42
  }, null, 8, ["value", "is-active", "should-remove", "onClick"]))), 128))
43
43
  ], 2)
44
44
  ]),
@@ -1,12 +1,12 @@
1
- import { defineComponent as b, ref as g, createElementBlock as p, openBlock as r, normalizeClass as n, unref as e, createElementVNode as f, createBlock as w, createCommentVNode as v, toDisplayString as B, withCtx as m, createVNode as s, withModifiers as d } from "vue";
2
- import { EditOutlined as x, DeleteOutlined as N } from "@ant-design/icons-vue";
3
- import { Flex as A, Popover as D } from "@aplus-frontend/antdv";
1
+ import { defineComponent as b, ref as g, createElementBlock as u, openBlock as s, normalizeClass as n, unref as e, createElementVNode as c, createBlock as w, createCommentVNode as f, toDisplayString as B, withCtx as r, createVNode as i, withModifiers as v } from "vue";
2
+ import { EditOutlined as N, DeleteOutlined as A } from "@ant-design/icons-vue";
3
+ import { Flex as D, Popover as E } from "@aplus-frontend/antdv";
4
4
  import "../../../../config-provider/index.mjs";
5
- import { useInjectApColumnSetting as E } from "../context.mjs";
5
+ import { useInjectApColumnSetting as V } from "../context.mjs";
6
6
  import "./edit-form.vue.mjs";
7
- import { useNamespace as V } from "../../../../config-provider/hooks/use-namespace.mjs";
8
- import F from "./edit-form.vue2.mjs";
9
- const K = /* @__PURE__ */ b({
7
+ import { useNamespace as F } from "../../../../config-provider/hooks/use-namespace.mjs";
8
+ import O from "./edit-form.vue2.mjs";
9
+ const M = /* @__PURE__ */ b({
10
10
  __name: "item",
11
11
  props: {
12
12
  value: {},
@@ -14,65 +14,66 @@ const K = /* @__PURE__ */ b({
14
14
  onClick: { type: Function },
15
15
  shouldRemove: { type: Boolean }
16
16
  },
17
- setup(l) {
18
- const c = l, { b: o } = V("ap-column-setting-template-item"), a = g(!1), { deleteTemplate: C, cacheConfig: k } = E();
19
- function y(i) {
20
- if (!i || i === c.value.label)
17
+ setup(d) {
18
+ const p = d, { b: l } = F("ap-column-setting-template-item"), a = g(!1), { deleteTemplate: C, cacheConfig: k } = V();
19
+ function y(t) {
20
+ if (!t || t === p.value.label)
21
21
  return;
22
- const t = c.value;
23
- t.label = i, a.value = !1;
22
+ const o = p.value;
23
+ o.label = t, a.value = !1;
24
24
  }
25
- return (i, t) => (r(), p("div", {
26
- class: n([e(o)(), { [e(o)("active")]: l.isActive }]),
27
- onClick: t[3] || (t[3] = //@ts-ignore
28
- (...u) => l.onClick && l.onClick(...u))
25
+ return (t, o) => (s(), u("div", {
26
+ class: n([e(l)(), { [e(l)("active")]: t.isActive }]),
27
+ onClick: o[3] || (o[3] = //@ts-ignore
28
+ (...m) => t.onClick && t.onClick(...m))
29
29
  }, [
30
- f("span", {
31
- class: n(e(o)("label"))
32
- }, B(l.value.label), 3),
33
- e(k).persistenceKey ? (r(), w(e(A), {
30
+ c("span", {
31
+ class: n(e(l)("label"))
32
+ }, B(t.value.label), 3),
33
+ e(k).persistenceKey ? (s(), w(e(D), {
34
34
  key: 0,
35
35
  gap: 8,
36
- class: n(e(o)("action-wrapper"))
36
+ class: n(e(l)("action-wrapper"))
37
37
  }, {
38
- default: m(() => [
39
- s(e(D), {
38
+ default: r(() => [
39
+ i(e(E), {
40
40
  open: a.value,
41
41
  trigger: "click",
42
42
  arrow: !1,
43
43
  placement: "bottom",
44
44
  "destroy-tooltip-on-hide": ""
45
45
  }, {
46
- content: m(() => [
47
- s(F, {
48
- "initial-values": { label: l.value.label },
46
+ content: r(() => [
47
+ i(O, {
48
+ "is-edit": "",
49
+ "initial-values": { label: t.value.label },
49
50
  onConfirm: y,
50
- onCancel: t[1] || (t[1] = () => a.value = !1)
51
+ onCancel: o[1] || (o[1] = () => a.value = !1)
51
52
  }, null, 8, ["initial-values"])
52
53
  ]),
53
- default: m(() => [
54
- f("span", {
55
- class: n(e(o)("icon-wrapper")),
56
- onClick: t[0] || (t[0] = d((u) => a.value = !0, ["stop"]))
54
+ default: r(() => [
55
+ c("span", {
56
+ class: n(e(l)("icon-wrapper")),
57
+ onClick: o[0] || (o[0] = v((m) => a.value = !0, ["stop"]))
57
58
  }, [
58
- s(e(x))
59
+ i(e(N))
59
60
  ], 2)
60
61
  ]),
61
62
  _: 1
62
63
  }, 8, ["open"]),
63
- l.shouldRemove ? (r(), p("span", {
64
+ t.shouldRemove ? (s(), u("span", {
64
65
  key: 0,
65
- class: n(e(o)("icon-wrapper")),
66
- onClick: t[2] || (t[2] = d(() => e(C)(l.value.key), ["stop"]))
66
+ class: n(e(l)("icon-wrapper")),
67
+ onClick: o[2] || (o[2] = v(() => e(C)(t.value.key), ["stop"]))
67
68
  }, [
68
- s(e(N))
69
- ], 2)) : v("", !0)
69
+ i(e(A))
70
+ ], 2)) : f("", !0)
70
71
  ]),
71
72
  _: 1
72
- }, 8, ["class"])) : v("", !0)
73
+ }, 8, ["class"])) : f("", !0)
73
74
  ], 2));
74
75
  }
75
76
  });
76
77
  export {
77
- K as default
78
+ M as default
78
79
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as v, computed as w, unref as r, createElementBlock as u, createCommentVNode as b, openBlock as o, createVNode as c, withCtx as l, Fragment as m, renderList as x, createBlock as d, mergeProps as B, resolveDynamicComponent as V } from "vue";
2
- import { Row as N, Col as h, Checkbox as I } from "@aplus-frontend/antdv";
1
+ import { defineComponent as v, computed as w, unref as r, createElementBlock as u, createCommentVNode as b, openBlock as o, createVNode as c, withCtx as l, Fragment as f, renderList as x, createBlock as d, mergeProps as B, resolveDynamicComponent as V } from "vue";
2
+ import { Row as N, Col as m, Checkbox as I } from "@aplus-frontend/antdv";
3
3
  import { useInjectApTable as L } from "../../../context.mjs";
4
4
  import "../select-group/index.vue.mjs";
5
5
  import { getLabelNode as P } from "../utils.mjs";
@@ -9,41 +9,41 @@ const U = { key: 0 }, T = /* @__PURE__ */ v({
9
9
  props: {
10
10
  value: {}
11
11
  },
12
- setup(s) {
13
- const i = s, { columnsBackup: p, renderConfig: k } = L(), g = w(() => [...r(p) || []].sort((e, t) => e.children?.length && !t.children?.length ? 1 : !e.children?.length && t.children?.length ? -1 : 0));
14
- function f(n) {
15
- return i.value.find((e) => e.key === n.key);
12
+ setup(h) {
13
+ const s = h, { columnsBackup: p, renderConfig: k } = L(), g = w(() => [...r(p) || []].sort((e, t) => e.children?.length && !t.children?.length ? 1 : !e.children?.length && t.children?.length ? -1 : 0));
14
+ function i(n) {
15
+ return s.value.find((e) => e.key === n.key);
16
16
  }
17
17
  function C(n) {
18
- const e = f(n);
18
+ const e = i(n);
19
19
  return {
20
20
  checked: e?.show,
21
21
  disabled: e?.disabled
22
22
  };
23
23
  }
24
24
  function _(n, e) {
25
- const a = i.value?.find((y) => y.key === n);
25
+ const a = s.value?.find((y) => y.key === n);
26
26
  a && (a.show = e);
27
27
  }
28
- return (n, e) => s.value?.length ? (o(), u("div", U, [
28
+ return (n, e) => n.value?.length ? (o(), u("div", U, [
29
29
  c(r(N), { gutter: [24, 12] }, {
30
30
  default: l(() => [
31
- (o(!0), u(m, null, x(g.value, (t) => (o(), u(m, {
31
+ (o(!0), u(f, null, x(g.value, (t) => (o(), u(f, {
32
32
  key: t.key
33
33
  }, [
34
- t.children?.length ? (o(), d(r(h), {
34
+ t.children?.length ? (o(), d(r(m), {
35
35
  key: 1,
36
36
  span: 24
37
37
  }, {
38
38
  default: l(() => [
39
39
  c(S, {
40
- value: f(t)
40
+ value: i(t)
41
41
  }, null, 8, ["value"])
42
42
  ]),
43
43
  _: 2
44
- }, 1024)) : (o(), d(r(h), {
44
+ }, 1024)) : (o(), d(r(m), {
45
45
  key: 0,
46
- span: 8
46
+ span: 12
47
47
  }, {
48
48
  default: l(() => [
49
49
  c(r(I), B({ ref_for: !0 }, C(t), {
@@ -1,12 +1,28 @@
1
1
  import { Recordable } from '../../type';
2
2
  import { ApColumnType } from '../interface';
3
3
  import { Ref } from 'vue';
4
- export declare const useTableSortedAndFiltered: () => {
4
+ export type DefaultSortOrderType = {
5
+ colKey: string | number;
6
+ field: string;
7
+ order: 'descend' | 'ascend';
8
+ [key: string]: any;
9
+ };
10
+ export declare const useTableSortedAndFiltered: (defaultSorterInfo?: DefaultSortOrderType) => {
5
11
  getColumnSFConfig: (column: ApColumnType, append?: boolean) => Recordable;
6
12
  setSF: (filters: any, sorter: any) => void;
7
13
  clearSorter: () => void;
8
14
  clearFilters: () => void;
9
15
  clearAll: () => void;
10
- sortedInfo: Ref<any, any>;
16
+ sortedInfo: Ref<{
17
+ [x: string]: any;
18
+ colKey: string | number;
19
+ field: string;
20
+ order: "descend" | "ascend";
21
+ } | null | undefined, DefaultSortOrderType | {
22
+ [x: string]: any;
23
+ colKey: string | number;
24
+ field: string;
25
+ order: "descend" | "ascend";
26
+ } | null | undefined>;
11
27
  filteredInfo: Ref<any, any>;
12
28
  };
@@ -1,11 +1,13 @@
1
1
  import { ref as i, unref as s } from "vue";
2
- const S = () => {
3
- const r = i(), t = i();
4
- function c(e, n = !1) {
5
- const v = s(t) || {}, u = s(r) || {}, l = n ? e : {};
6
- return e.filters && (l.filteredValue = v[e.key] || null), e.sorter && (l.sortOrder = u.columnKey === e.key ? u.order : null), l;
2
+ const p = (c) => {
3
+ const r = i(
4
+ c
5
+ ), t = i();
6
+ function a(e, n = !1) {
7
+ const F = s(t) || {}, u = s(r) || {}, l = n ? e : {};
8
+ return e.filters && (l.filteredValue = F[e.key] || null), e.sorter && (l.sortOrder = u.columnKey === e.key ? u.order : null), l;
7
9
  }
8
- function a(e, n) {
10
+ function d(e, n) {
9
11
  t.value = e, r.value = n;
10
12
  }
11
13
  function o() {
@@ -14,19 +16,19 @@ const S = () => {
14
16
  function f() {
15
17
  t.value = null;
16
18
  }
17
- function d() {
19
+ function v() {
18
20
  o(), f();
19
21
  }
20
22
  return {
21
- getColumnSFConfig: c,
22
- setSF: a,
23
+ getColumnSFConfig: a,
24
+ setSF: d,
23
25
  clearSorter: o,
24
26
  clearFilters: f,
25
- clearAll: d,
27
+ clearAll: v,
26
28
  sortedInfo: r,
27
29
  filteredInfo: t
28
30
  };
29
31
  };
30
32
  export {
31
- S as useTableSortedAndFiltered
33
+ p as useTableSortedAndFiltered
32
34
  };
@@ -3,6 +3,7 @@ import { Ref, ComputedRef } from 'vue';
3
3
  import { ApFormSearchFormExpose } from '../../ap-form';
4
4
  import { Recordable } from '../../type';
5
5
  import { ApTablePaginationConfig, RequestData } from '../interface';
6
+ import { DefaultSortOrderType } from './use-sorted-filtered';
6
7
  import { TablePaginationConfig } from '@aplus-frontend/antdv';
7
8
  import { FilterValue, SorterResult, TableCurrentDataSource } from '@aplus-frontend/antdv/es/table/interface';
8
9
  import { ApColumnType } from '..';
@@ -63,6 +64,10 @@ export type UseTablePagingParams<DataType, ParamsType> = {
63
64
  * @returns
64
65
  */
65
66
  onAfterRequest?: (records: DataType[]) => void;
67
+ /**
68
+ * 默认排序规则(只允许单字段)
69
+ */
70
+ defaultSortOrder?: DefaultSortOrderType;
66
71
  };
67
72
  export type TablePagingRequestOptions = {
68
73
  /**
@@ -86,7 +91,7 @@ type InternalDataType<DataType = Recordable> = {
86
91
  export declare const DEFAULT_CURRENT = 1;
87
92
  export declare const DEFAULT_PAGE_SIZE = 20;
88
93
  export type OptionalOnTableChange<T extends (...args: any[]) => any> = (...args: Partial<Parameters<T>>) => ReturnType<T>;
89
- export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request, params, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, namespace, pagination, onClickReset, onAfterRequest }: UseTablePagingParams<DataType, ParamsType>) => {
94
+ export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request, params, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, namespace, pagination, onClickReset, onAfterRequest, defaultSortOrder }: UseTablePagingParams<DataType, ParamsType>) => {
90
95
  formRef: Ref<ApFormSearchFormExpose | undefined, ApFormSearchFormExpose | undefined>;
91
96
  submit: () => void;
92
97
  reset: () => void;
@@ -114,7 +119,17 @@ export declare const useTablePaging: <DataType = any, ParamsType = Record<string
114
119
  dataSource: ComputedRef<DataType[]>;
115
120
  setDataSource: (dataSource?: DataType[]) => void;
116
121
  getColumnSFConfig: (column: ApColumnType, append?: boolean) => Recordable;
117
- sortedInfo: Ref<any, any>;
122
+ sortedInfo: Ref<{
123
+ [x: string]: any;
124
+ colKey: string | number;
125
+ field: string;
126
+ order: "descend" | "ascend";
127
+ } | null | undefined, DefaultSortOrderType | {
128
+ [x: string]: any;
129
+ colKey: string | number;
130
+ field: string;
131
+ order: "descend" | "ascend";
132
+ } | null | undefined>;
118
133
  filteredInfo: Ref<any, any>;
119
134
  getPaging: () => {
120
135
  current?: number | undefined;