@aplus-frontend/ui 0.6.0-beta.0 → 0.6.0-beta.2

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 (209) hide show
  1. package/es/src/ap-button/ap-button.vue.mjs +1 -1
  2. package/es/src/ap-form/ap-form.vue2.mjs +57 -58
  3. package/es/src/ap-form/interface.d.ts +4 -0
  4. package/es/src/ap-form/item/index.vue.mjs +33 -28
  5. package/es/src/ap-form/items/checkbox/index.vue.mjs +1 -0
  6. package/es/src/ap-form/items/date/index.vue.mjs +8 -7
  7. package/es/src/ap-form/items/date-range/index.vue.mjs +1 -0
  8. package/es/src/ap-form/items/number/index.vue.mjs +9 -8
  9. package/es/src/ap-form/items/radio/index.vue.mjs +1 -0
  10. package/es/src/ap-form/items/select/index.vue.mjs +7 -6
  11. package/es/src/ap-form/items/switch/index.vue.mjs +1 -0
  12. package/es/src/ap-form/items/text/index.vue2.mjs +8 -7
  13. package/es/src/ap-form/items/text/password.vue.mjs +1 -0
  14. package/es/src/ap-form/items/text-area/index.vue.mjs +1 -0
  15. package/es/src/ap-form/items/tree-select/index.vue.mjs +6 -5
  16. package/es/src/ap-form/render/item.vue.mjs +5 -4
  17. package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +10 -10
  18. package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +8 -8
  19. package/es/src/ap-form/search-form/index.vue.mjs +36 -35
  20. package/es/src/ap-grid/editable/form-item.vue.mjs +1 -1
  21. package/es/src/ap-grid/editable/index.vue.mjs +1 -1
  22. package/es/src/ap-grid/index.vue.mjs +149 -140
  23. package/es/src/ap-grid/interface.d.ts +1 -1
  24. package/es/src/ap-table/ap-table.vue2.mjs +206 -199
  25. package/es/src/ap-tag/ap-tag.vue.d.ts +1 -0
  26. package/es/src/ap-tag/ap-tag.vue.mjs +18 -12
  27. package/es/src/ap-tag/interface.d.ts +4 -0
  28. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +11 -12
  29. package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
  30. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +108 -99
  31. package/es/src/business/ap-export-group/index.d.ts +3 -0
  32. package/es/src/business/ap-export-group/interface.d.ts +7 -2
  33. package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
  34. package/es/src/business/ap-view/ap-view.vue2.mjs +120 -114
  35. package/es/src/business/ap-view/components/main-button-content.vue2.mjs +63 -55
  36. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +38 -38
  37. package/es/src/business/ap-view/interface.d.ts +4 -0
  38. package/es/src/business/batch-input-group/form-item.vue.mjs +1 -0
  39. package/es/src/business/hooks/usePageListApGrid.mjs +2 -4
  40. package/es/src/check-card/index.vue2.mjs +1 -1
  41. package/es/src/config-provider/css-var.mjs +2 -2
  42. package/es/src/design-token/index.mjs +9 -3
  43. package/es/src/editable-table/form-item.vue.mjs +1 -1
  44. package/es/src/editable-table/index.vue.mjs +27 -27
  45. package/es/src/locale/lang/en.mjs +1 -1
  46. package/es/src/locale/lang/zh-cn.mjs +1 -1
  47. package/lib/src/ap-button/ap-button.vue.js +1 -1
  48. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  49. package/lib/src/ap-form/interface.d.ts +4 -0
  50. package/lib/src/ap-form/item/index.vue.js +1 -1
  51. package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
  52. package/lib/src/ap-form/items/date/index.vue.js +1 -1
  53. package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
  54. package/lib/src/ap-form/items/number/index.vue.js +1 -1
  55. package/lib/src/ap-form/items/radio/index.vue.js +1 -1
  56. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  57. package/lib/src/ap-form/items/switch/index.vue.js +1 -1
  58. package/lib/src/ap-form/items/text/index.vue2.js +1 -1
  59. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  60. package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
  61. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  62. package/lib/src/ap-form/render/item.vue.js +1 -1
  63. package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
  64. package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.js +1 -1
  65. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  66. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  67. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  68. package/lib/src/ap-grid/index.vue.js +1 -1
  69. package/lib/src/ap-grid/interface.d.ts +1 -1
  70. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  71. package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -0
  72. package/lib/src/ap-tag/ap-tag.vue.js +1 -1
  73. package/lib/src/ap-tag/interface.d.ts +4 -0
  74. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  75. package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
  76. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  77. package/lib/src/business/ap-export-group/index.d.ts +3 -0
  78. package/lib/src/business/ap-export-group/interface.d.ts +7 -2
  79. package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
  80. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  81. package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
  82. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  83. package/lib/src/business/ap-view/interface.d.ts +4 -0
  84. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  85. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  86. package/lib/src/check-card/index.vue2.js +1 -1
  87. package/lib/src/config-provider/css-var.js +1 -1
  88. package/lib/src/design-token/index.js +1 -1
  89. package/lib/src/editable-table/form-item.vue.js +1 -1
  90. package/lib/src/editable-table/index.vue.js +1 -1
  91. package/lib/src/locale/lang/en.js +1 -1
  92. package/lib/src/locale/lang/zh-cn.js +1 -1
  93. package/package.json +1 -1
  94. package/theme/antd-global-overwrite/admin/index.css +5 -8
  95. package/theme/antd-global-overwrite/admin/modal.css +2 -5
  96. package/theme/antd-global-overwrite/admin/modal.less +3 -3
  97. package/theme/antd-global-overwrite/admin/table.css +3 -3
  98. package/theme/antd-global-overwrite/admin/table.less +3 -3
  99. package/theme/antd-global-overwrite/aplus/index.css +5 -8
  100. package/theme/antd-global-overwrite/aplus/modal.css +2 -5
  101. package/theme/antd-global-overwrite/aplus/modal.less +3 -3
  102. package/theme/antd-global-overwrite/aplus/table.css +3 -3
  103. package/theme/antd-global-overwrite/aplus/table.less +3 -3
  104. package/theme/ap-action/item-dropdown.css +5 -5
  105. package/theme/ap-action/item-dropdown.less +1 -1
  106. package/theme/ap-action/item.css +5 -5
  107. package/theme/ap-action/item.less +1 -1
  108. package/theme/ap-appendix/ap-appendix.css +7 -5
  109. package/theme/ap-appendix/ap-appendix.less +4 -2
  110. package/theme/ap-attachment/ap-attachment.css +7 -7
  111. package/theme/ap-attachment/ap-attachment.less +4 -4
  112. package/theme/ap-batch-action/ap-batch-action.css +9 -6
  113. package/theme/ap-batch-action/ap-batch-action.less +6 -3
  114. package/theme/ap-button/ap-button.css +3 -3
  115. package/theme/ap-card/ap-card.css +3 -3
  116. package/theme/ap-descriptions/ap-descriptions.css +6 -8
  117. package/theme/ap-descriptions/ap-descriptions.less +3 -5
  118. package/theme/ap-download/ap-download.css +10 -13
  119. package/theme/ap-download/ap-download.less +8 -11
  120. package/theme/ap-expand-alert/ap-expand-alert.css +4 -4
  121. package/theme/ap-expand-alert/ap-expand-alert.less +3 -4
  122. package/theme/ap-field/checkbox.css +4 -4
  123. package/theme/ap-field/checkbox.less +2 -1
  124. package/theme/ap-field/index.css +5 -5
  125. package/theme/ap-field/number.css +3 -3
  126. package/theme/ap-field/radio.css +4 -4
  127. package/theme/ap-field/radio.less +1 -1
  128. package/theme/ap-field/text-area.css +3 -3
  129. package/theme/ap-form/ap-form-item-group.css +3 -3
  130. package/theme/ap-form/ap-form-item.css +10 -8
  131. package/theme/ap-form/ap-form-item.less +8 -6
  132. package/theme/ap-form/drawer-form.css +3 -3
  133. package/theme/ap-form/index.css +21 -19
  134. package/theme/ap-form/item-text-group.css +3 -3
  135. package/theme/ap-form/item-text.css +3 -3
  136. package/theme/ap-form/modal-form.css +3 -3
  137. package/theme/ap-form/search-form-sorter.css +12 -12
  138. package/theme/ap-form/search-form-sorter.less +7 -7
  139. package/theme/ap-form/search-form.css +21 -19
  140. package/theme/ap-form/search-form.less +5 -5
  141. package/theme/ap-grid/editable.css +5 -5
  142. package/theme/ap-grid/editable.less +3 -2
  143. package/theme/ap-grid/index.css +43 -32
  144. package/theme/ap-grid/index.less +20 -9
  145. package/theme/ap-group-search/ap-extension-select.css +3 -3
  146. package/theme/ap-group-search/ap-group-search.css +3 -3
  147. package/theme/ap-group-search/ap-popover-select.css +3 -3
  148. package/theme/ap-image/ap-image.css +3 -3
  149. package/theme/ap-input-radio/ap-input-radio.css +3 -3
  150. package/theme/ap-label/ap-label.css +3 -3
  151. package/theme/ap-ladder/ap-ladder.css +6 -6
  152. package/theme/ap-ladder/ap-ladder.less +3 -3
  153. package/theme/ap-layout/ap-info-layout.css +3 -3
  154. package/theme/ap-list/index.css +4 -4
  155. package/theme/ap-list/index.less +2 -1
  156. package/theme/ap-product-info/ap-product-info.css +3 -3
  157. package/theme/ap-select-layout/ap-select-layout.css +11 -11
  158. package/theme/ap-select-layout/ap-select-layout.less +8 -8
  159. package/theme/ap-size-input/ap-size-input.css +3 -3
  160. package/theme/ap-status/ap-status.css +5 -6
  161. package/theme/ap-status/ap-status.less +2 -4
  162. package/theme/ap-summary/index.css +6 -6
  163. package/theme/ap-summary/index.less +3 -3
  164. package/theme/ap-table/ap-table-index.css +8 -8
  165. package/theme/ap-table/ap-table-index.less +5 -5
  166. package/theme/ap-table/ap-table-paragraph-ellipsis.css +3 -3
  167. package/theme/ap-table/ap-table-paragraph-ellipsis.less +1 -1
  168. package/theme/ap-table/ap-table.css +46 -42
  169. package/theme/ap-table/ap-table.less +10 -9
  170. package/theme/ap-table/setting/index.css +7 -7
  171. package/theme/ap-table/setting/modal.css +5 -5
  172. package/theme/ap-table/setting/select-group.css +3 -3
  173. package/theme/ap-table/setting/sortable-item-meta.css +3 -3
  174. package/theme/ap-table/setting/sortable-item.css +3 -3
  175. package/theme/ap-table/setting/sorter.css +5 -5
  176. package/theme/ap-table-modal/index.css +46 -42
  177. package/theme/ap-tag/ap-tag-group.css +3 -3
  178. package/theme/ap-tag/ap-tag-group.less +2 -2
  179. package/theme/ap-tag/ap-tag.css +27 -18
  180. package/theme/ap-tag/ap-tag.less +37 -24
  181. package/theme/ap-title/ap-title.css +5 -5
  182. package/theme/ap-title/ap-title.less +2 -2
  183. package/theme/ap-upload/index.css +6 -6
  184. package/theme/ap-upload/multiple-file.css +4 -4
  185. package/theme/ap-upload/multiple-file.less +1 -1
  186. package/theme/ap-upload/picture.css +5 -5
  187. package/theme/ap-upload/picture.less +2 -2
  188. package/theme/ap-upload/single-file.css +3 -3
  189. package/theme/ap-upload/upload.css +3 -3
  190. package/theme/ap-upload-single/index.css +3 -3
  191. package/theme/ap-view/ap-view.css +7 -3
  192. package/theme/ap-view/ap-view.less +4 -0
  193. package/theme/batch-input-group/index.css +5 -5
  194. package/theme/batch-input-group/popover-input.css +3 -3
  195. package/theme/check-card/index.css +22 -22
  196. package/theme/check-card/index.less +17 -15
  197. package/theme/editable-table/index.css +36 -32
  198. package/theme/editable-table/index.less +9 -7
  199. package/theme/full-screen/index.css +3 -3
  200. package/theme/index.css +174 -147
  201. package/theme/mask/index.css +3 -3
  202. package/theme/mixins/config.less +26 -4
  203. package/theme/mixins/mixins.css +3 -3
  204. package/theme/scroll-bar/index.css +3 -3
  205. package/theme/scroll-view/index.css +3 -3
  206. package/theme/splitter/index.css +8 -8
  207. package/theme/text/group.css +3 -3
  208. package/theme/text/index.css +5 -5
  209. package/theme/work-order-modal/index.css +3 -3
@@ -1,4 +1,4 @@
1
- import { defineComponent as M, computed as N, ref as p, createVNode as g, watch as S, onMounted as Y, createBlock as $, openBlock as j, unref as w, normalizeClass as x, withCtx as z, createElementVNode as W } from "vue";
1
+ import { defineComponent as I, computed as _, ref as p, createVNode as g, watch as x, createBlock as S, openBlock as Y, unref as w, mergeProps as j, withCtx as z, createElementVNode as M, normalizeClass as W } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
3
  import q from "./icons/line-down.vue.mjs";
4
4
  import { ApBatchActionGroup as H } from "../ap-batch-action-group/index.mjs";
@@ -7,12 +7,14 @@ import "./components/menu-list-content.vue.mjs";
7
7
  import { useViewProvide as J } from "./hooks/use-view-provide.mjs";
8
8
  import { useInjectApTable as Q } from "../../ap-table/context.mjs";
9
9
  import { SYSTEM_VIEW_KEY as y } from "./utils/enum.mjs";
10
- import { useGlobalConfig as X } from "../../config-provider/hooks/use-global-config.mjs";
11
- import { useNamespace as Z } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { isValid as X } from "@aplus-frontend/utils";
11
+ import { useGlobalConfig as Z } from "../../config-provider/hooks/use-global-config.mjs";
12
+ import { useNamespace as h } from "../../config-provider/hooks/use-namespace.mjs";
12
13
  import { useLocale as U } from "../../config-provider/hooks/use-locale.mjs";
13
- import h from "./components/main-button-content.vue2.mjs";
14
- import R from "./components/menu-list-content.vue2.mjs";
15
- const fe = /* @__PURE__ */ M({
14
+ import R from "./components/main-button-content.vue2.mjs";
15
+ import C from "./components/menu-list-content.vue2.mjs";
16
+ const pe = /* @__PURE__ */ I({
17
+ name: "ApView",
16
18
  __name: "ap-view",
17
19
  props: {
18
20
  tableKey: {},
@@ -22,150 +24,154 @@ const fe = /* @__PURE__ */ M({
22
24
  default: 20
23
25
  }
24
26
  },
25
- setup(E) {
26
- const c = E, L = X("viewCacheOption"), {
27
- b: d
28
- } = Z("ap-view"), {
29
- t: T
30
- } = U(), V = N(() => ({
27
+ setup(A) {
28
+ const f = A, E = Z("viewCacheOption"), {
29
+ b: V
30
+ } = h("ap-view"), {
31
+ t: F
32
+ } = U(), d = _(() => ({
31
33
  viewKey: y,
32
- viewName: T("ap.apView.systemView")
34
+ viewName: F("ap.apView.systemView")
33
35
  })), {
34
- getSearchFormValues: k,
35
- setSearchFormValues: A,
36
- submit: B,
37
- reset: F
38
- } = Q(), G = p(!1), K = p(!1), r = p("system"), P = {
36
+ getSearchFormValues: L,
37
+ setSearchFormValues: P,
38
+ submit: T,
39
+ reset: k
40
+ } = Q(), B = p(!1), K = p(!1), r = p("system"), G = {
39
41
  dropdownType: "dropdown",
40
- content: g(h, {
41
- maxViewNum: c.maxViewNum
42
- }, null)
43
- }, o = p([V.value]), D = N(() => o.value.map((t) => ({
44
- id: t.viewKey,
45
42
  content: g(R, {
46
- view: t
43
+ maxViewNum: f.maxViewNum
44
+ }, null)
45
+ }, s = p([d.value]), $ = _(() => s.value.map((e) => ({
46
+ id: e.viewKey,
47
+ content: g(C, {
48
+ view: e
47
49
  }, null)
48
50
  }))), n = {
49
- getSearchFormValues: k,
50
- setSearchFormValues: A,
51
- submit: B,
52
- reset: F,
53
- ...c.saveDataSource
54
- }, e = {
55
- ...L.value,
56
- ...c.viewCacheOption
57
- }, _ = () => {
58
- const t = o.value.find((s) => s.isDefault);
59
- return (t == null ? void 0 : t.viewKey) ?? y;
60
- }, m = {
61
- getViewList: async (t) => {
62
- var s;
51
+ getSearchFormValues: L,
52
+ setSearchFormValues: P,
53
+ submit: T,
54
+ reset: k,
55
+ ...f.saveDataSource
56
+ }, t = {
57
+ ...E.value,
58
+ ...f.viewCacheOption
59
+ }, N = () => {
60
+ const e = s.value.find((a) => a.isDefault);
61
+ return (e == null ? void 0 : e.viewKey) ?? y;
62
+ }, c = {
63
+ getViewList: async (e) => {
64
+ var a;
63
65
  try {
64
66
  const {
65
- tableKey: a
66
- } = t, l = await ((s = e == null ? void 0 : e.getViewList) == null ? void 0 : s.call(e, {
67
- tableKey: a
67
+ tableKey: o
68
+ } = e, i = await ((a = t == null ? void 0 : t.getViewList) == null ? void 0 : a.call(t, {
69
+ tableKey: o
68
70
  }));
69
- return o.value = [V.value, ...l ?? []], r.value = _(), o.value;
71
+ return s.value = [d.value, ...i ?? []], r.value = N(), s.value;
70
72
  } catch {
71
- return o.value = [V.value], r.value = y, o.value;
73
+ return s.value = [d.value], r.value = y, s.value;
72
74
  }
73
75
  },
74
- addView: async (t) => {
76
+ addView: async (e) => {
75
77
  var u;
76
78
  const {
77
- tableKey: s,
78
- viewKey: a,
79
- viewName: l,
80
- isDefault: i,
81
- viewConfig: f
82
- } = t;
83
- await ((u = e == null ? void 0 : e.addView) == null ? void 0 : u.call(e, {
84
- tableKey: s,
85
- viewKey: a,
86
- viewName: l,
87
- isDefault: i,
88
- viewConfig: f
89
- })), i && (o.value = o.value.map((v) => ({
79
+ tableKey: a,
80
+ viewKey: o,
81
+ viewName: i,
82
+ isDefault: l,
83
+ viewConfig: m
84
+ } = e;
85
+ await ((u = t == null ? void 0 : t.addView) == null ? void 0 : u.call(t, {
86
+ tableKey: a,
87
+ viewKey: o,
88
+ viewName: i,
89
+ isDefault: l,
90
+ viewConfig: m
91
+ })), l && (s.value = s.value.map((v) => ({
90
92
  ...v,
91
93
  isDefault: !1
92
- }))), o.value = [...o.value, {
93
- viewKey: a,
94
- viewName: l,
95
- isDefault: i,
96
- viewConfig: f
97
- }], r.value = a;
94
+ }))), s.value = [...s.value, {
95
+ viewKey: o,
96
+ viewName: i,
97
+ isDefault: l,
98
+ viewConfig: m
99
+ }], r.value = o;
98
100
  },
99
- changeView: async (t) => {
101
+ changeView: async (e) => {
100
102
  var v;
101
103
  const {
102
- tableKey: s,
103
- viewKey: a,
104
- viewName: l,
105
- isDefault: i,
106
- viewConfig: f
107
- } = t;
108
- await ((v = e == null ? void 0 : e.changeView) == null ? void 0 : v.call(e, {
109
- tableKey: s,
110
- viewKey: a,
111
- viewName: l,
112
- isDefault: i,
113
- viewConfig: f
114
- })), i && (o.value = o.value.map((b) => ({
104
+ tableKey: a,
105
+ viewKey: o,
106
+ viewName: i,
107
+ isDefault: l,
108
+ viewConfig: m
109
+ } = e;
110
+ await ((v = t == null ? void 0 : t.changeView) == null ? void 0 : v.call(t, {
111
+ tableKey: a,
112
+ viewKey: o,
113
+ viewName: i,
114
+ isDefault: l,
115
+ viewConfig: m
116
+ })), l && (s.value = s.value.map((b) => ({
115
117
  ...b,
116
118
  isDefault: !1
117
119
  })));
118
- const u = o.value.find((b) => b.viewKey === a);
119
- u && (u.viewName = l, u.isDefault = i, u.viewConfig = f), r.value = a;
120
+ const u = s.value.find((b) => b.viewKey === o);
121
+ u && (u.viewName = i, u.isDefault = l, u.viewConfig = m), r.value = o;
120
122
  },
121
- removeView: async (t) => {
122
- var l;
123
+ removeView: async (e) => {
124
+ var i;
123
125
  const {
124
- tableKey: s,
125
- viewKey: a
126
- } = t;
127
- await ((l = e == null ? void 0 : e.removeView) == null ? void 0 : l.call(e, {
128
- tableKey: s,
129
- viewKey: a
130
- })), o.value = o.value.filter((i) => i.viewKey !== a), a === r.value && (r.value = _());
126
+ tableKey: a,
127
+ viewKey: o
128
+ } = e;
129
+ await ((i = t == null ? void 0 : t.removeView) == null ? void 0 : i.call(t, {
130
+ tableKey: a,
131
+ viewKey: o
132
+ })), s.value = s.value.filter((l) => l.viewKey !== o), o === r.value && (r.value = N());
131
133
  }
132
- }, I = {
133
- tableKey: c.tableKey,
134
+ }, D = {
135
+ tableKey: f.tableKey,
134
136
  currentViewKey: r,
135
- popoverOpen: G,
137
+ popoverOpen: B,
136
138
  menuOpen: K,
137
- viewList: o,
138
- viewListCRUD: m,
139
+ viewList: s,
140
+ viewListCRUD: c,
139
141
  saveDataSource: n
140
142
  };
141
- return S(r, (t) => {
142
- const s = o.value.find((a) => a.viewKey === t);
143
- s && setTimeout(() => {
144
- var a, l, i;
145
- s.viewKey === y ? (a = n.reset) == null || a.call(n) : ((l = n.setSearchFormValues) == null || l.call(n, s.viewConfig ?? {}), (i = n.submit) == null || i.call(n));
146
- });
147
- }), J(I), Y(() => {
148
- var t;
149
- (t = m == null ? void 0 : m.getViewList) == null || t.call(m, {
150
- tableKey: c.tableKey
143
+ return x(r, (e) => {
144
+ const a = s.value.find((o) => o.viewKey === e);
145
+ a && setTimeout(() => {
146
+ var o, i, l, m;
147
+ a.viewKey === y ? (o = n.reset) == null || o.call(n) : ((l = n.setSearchFormValues) == null || l.call(n, ((i = a.viewConfig) == null ? void 0 : i.searchForm) ?? {}), (m = n.submit) == null || m.call(n));
151
148
  });
152
- }), (t, s) => (j(), $(w(H), {
149
+ }), J(D), x(() => f.tableKey, (e) => {
150
+ var a;
151
+ X(e) && ((a = c == null ? void 0 : c.getViewList) == null || a.call(c, {
152
+ tableKey: e
153
+ }));
154
+ }, {
155
+ immediate: !0
156
+ }), (e, a) => (Y(), S(w(H), j({
157
+ ...e.$attrs
158
+ }, {
153
159
  open: K.value,
154
- "onUpdate:open": s[0] || (s[0] = (a) => K.value = a),
155
- class: x([w(d)()]),
156
- "button-props": P,
157
- "menu-list": D.value,
158
- "overlay-class-name": [w(d)("overlay")],
160
+ "onUpdate:open": a[0] || (a[0] = (o) => K.value = o),
161
+ class: [w(V)()],
162
+ "button-props": G,
163
+ "menu-list": $.value,
164
+ "overlay-class-name": [w(V)("overlay")],
159
165
  trigger: "click",
160
166
  placement: "bottom"
161
- }, {
162
- icon: z(() => [W("div", {
163
- class: x([w(d)("icon")])
167
+ }), {
168
+ icon: z(() => [M("div", {
169
+ class: W([w(V)("icon")])
164
170
  }, [g(q)], 2)]),
165
171
  _: 1
166
- }, 8, ["open", "class", "menu-list", "overlay-class-name"]));
172
+ }, 16, ["open", "class", "menu-list", "overlay-class-name"]));
167
173
  }
168
174
  });
169
175
  export {
170
- fe as default
176
+ pe as default
171
177
  };
@@ -1,47 +1,55 @@
1
- import { defineComponent as $, ref as I, computed as T, watch as Y, createBlock as D, openBlock as E, unref as e, withCtx as t, createElementVNode as u, normalizeClass as m, createVNode as a, createSlots as K, toDisplayString as p, createTextVNode as v } from "vue";
2
- import { Popover as j, Tooltip as q, Space as N, Checkbox as B } from "@aplus-frontend/antdv";
1
+ import { defineComponent as T, ref as $, computed as I, watch as Y, createBlock as E, openBlock as K, unref as e, withCtx as t, createElementVNode as c, normalizeClass as r, createVNode as a, createSlots as j, toDisplayString as p, createTextVNode as w } from "vue";
2
+ import { Popover as q, Tooltip as B, Space as x, Checkbox as D } from "@aplus-frontend/antdv";
3
3
  import "../../../config-provider/index.mjs";
4
4
  import L from "../icons/line-eye.vue.mjs";
5
5
  import "../../../ap-form/ap-form.vue.mjs";
6
6
  import { ApField as M } from "../../../ap-field/index.mjs";
7
7
  import "../../../ap-button/index.mjs";
8
8
  import O from "dayjs";
9
- import { useViewInject as S } from "../hooks/use-view-provide.mjs";
10
- import { generateUniqueKey as A } from "../utils/uuid.mjs";
11
- import { useLocale as P } from "../../../config-provider/hooks/use-locale.mjs";
12
- import { useNamespace as R } from "../../../config-provider/hooks/use-namespace.mjs";
13
- import w from "../../../ap-form/ap-form.vue2.mjs";
14
- import h from "../../../ap-button/ap-button.vue.mjs";
15
- const le = /* @__PURE__ */ $({
9
+ import { useViewInject as A } from "../hooks/use-view-provide.mjs";
10
+ import { generateUniqueKey as P } from "../utils/uuid.mjs";
11
+ import { cloneDeep as R } from "lodash-unified";
12
+ import { useLocale as U } from "../../../config-provider/hooks/use-locale.mjs";
13
+ import { useNamespace as G } from "../../../config-provider/hooks/use-namespace.mjs";
14
+ import v from "../../../ap-form/ap-form.vue2.mjs";
15
+ import N from "../../../ap-button/ap-button.vue.mjs";
16
+ const pe = /* @__PURE__ */ T({
16
17
  __name: "main-button-content",
17
18
  props: {
18
19
  maxViewNum: {}
19
20
  },
20
21
  setup(b) {
21
- const c = b, { t: o } = P(), { b: n } = R("ap-view"), _ = I(), { tableKey: k, popoverOpen: r, viewList: f, saveDataSource: s, viewListCRUD: V } = S(), y = T({
22
- get: () => r.value && f.value.length < c.maxViewNum + 1,
23
- set: (l) => {
24
- f.value.length < c.maxViewNum + 1 && (r.value = l);
22
+ const u = b, { t: o } = U(), { b: l } = G("ap-view"), _ = $(), { tableKey: F, popoverOpen: s, viewList: f, saveDataSource: n, viewListCRUD: V } = A(), h = I({
23
+ get: () => s.value && f.value.length < u.maxViewNum + 1,
24
+ set: (m) => {
25
+ f.value.length < u.maxViewNum + 1 && (s.value = m);
25
26
  }
26
27
  });
27
- Y(r, (l) => {
28
+ Y(s, (m) => {
28
29
  var i;
29
- l && ((i = _.value) == null || i.resetFields());
30
+ m && ((i = _.value) == null || i.resetFields());
30
31
  });
31
- const F = async (l) => {
32
- var g, x;
33
- const { viewName: i, isDefault: d } = l, C = A(), z = ((g = s == null ? void 0 : s.getSearchFormValues) == null ? void 0 : g.call(s, !0)) ?? {};
34
- await ((x = V.addView) == null ? void 0 : x.call(V, {
35
- tableKey: k,
32
+ const k = async (m) => {
33
+ var y, g;
34
+ const { viewName: i, isDefault: d } = m, C = P(), z = {
35
+ searchForm: R(
36
+ (y = n == null ? void 0 : n.getSearchFormValues) == null ? void 0 : y.call(
37
+ n,
38
+ !!(n != null && n.searchFormTransform)
39
+ )
40
+ )
41
+ };
42
+ await ((g = V.addView) == null ? void 0 : g.call(V, {
43
+ tableKey: F,
36
44
  viewKey: C,
37
45
  viewName: i,
38
46
  isDefault: d,
39
47
  viewConfig: z
40
- })), r.value = !1;
48
+ })), s.value = !1;
41
49
  };
42
- return (l, i) => (E(), D(e(j), {
43
- open: y.value,
44
- "onUpdate:open": i[1] || (i[1] = (d) => y.value = d),
50
+ return (m, i) => (K(), E(e(q), {
51
+ open: h.value,
52
+ "onUpdate:open": i[1] || (i[1] = (d) => h.value = d),
45
53
  placement: "bottom",
46
54
  trigger: "click",
47
55
  arrow: !1,
@@ -50,10 +58,10 @@ const le = /* @__PURE__ */ $({
50
58
  }
51
59
  }, {
52
60
  content: t(() => [
53
- u("div", {
54
- class: m([e(n)("main-content-popover")])
61
+ c("div", {
62
+ class: r([e(l)("main-content-popover")])
55
63
  }, [
56
- a(w, {
64
+ a(v, {
57
65
  ref_key: "formRef",
58
66
  ref: _,
59
67
  layout: "vertical",
@@ -61,23 +69,23 @@ const le = /* @__PURE__ */ $({
61
69
  isDefault: !0,
62
70
  viewName: `${e(o)("ap.apView.newView")} ${e(O)().format("YYYY-MM-DD").toString()}`
63
71
  },
64
- onFinish: F
72
+ onFinish: k
65
73
  }, {
66
74
  default: t(() => [
67
- u("div", {
68
- class: m([e(n)("main-content-popover-title-content")])
75
+ c("div", {
76
+ class: r([e(l)("main-content-popover-title-content")])
69
77
  }, [
70
- u("div", {
71
- class: m([e(n)("main-content-popover-title-content-title")])
78
+ c("div", {
79
+ class: r([e(l)("main-content-popover-title-content-title")])
72
80
  }, p(e(o)("ap.apView.saveNewView")), 3),
73
- a(w.FormItem, {
81
+ a(v.FormItem, {
74
82
  name: "isDefault",
75
83
  "value-prop-name": "checked"
76
84
  }, {
77
85
  default: t(() => [
78
- a(e(B), null, {
86
+ a(e(D), null, {
79
87
  default: t(() => [
80
- v(p(e(o)("ap.apView.setDefault")), 1)
88
+ w(p(e(o)("ap.apView.setDefault")), 1)
81
89
  ]),
82
90
  _: 1
83
91
  })
@@ -85,7 +93,7 @@ const le = /* @__PURE__ */ $({
85
93
  _: 1
86
94
  })
87
95
  ], 2),
88
- a(w.FormItem, {
96
+ a(v.FormItem, {
89
97
  label: e(o)("ap.apView.viewName"),
90
98
  name: "viewName",
91
99
  rules: [{ required: !0, message: e(o)("ap.apView.notEmpty") }]
@@ -99,28 +107,28 @@ const le = /* @__PURE__ */ $({
99
107
  ]),
100
108
  _: 1
101
109
  }, 8, ["label", "rules"]),
102
- a(w.FormItem, {
103
- class: m([e(n)("main-content-popover-btn")])
110
+ a(v.FormItem, {
111
+ class: r([e(l)("main-content-popover-btn")])
104
112
  }, {
105
113
  default: t(() => [
106
- a(e(N), { size: 8 }, {
114
+ a(e(x), { size: 8 }, {
107
115
  default: t(() => [
108
- a(e(h), {
116
+ a(e(N), {
109
117
  size: "small",
110
- onClick: i[0] || (i[0] = (d) => r.value = !1)
118
+ onClick: i[0] || (i[0] = (d) => s.value = !1)
111
119
  }, {
112
120
  default: t(() => [
113
- v(p(e(o)("ap.apView.cancel")), 1)
121
+ w(p(e(o)("ap.apView.cancel")), 1)
114
122
  ]),
115
123
  _: 1
116
124
  }),
117
- a(e(h), {
125
+ a(e(N), {
118
126
  type: "primary",
119
127
  size: "small",
120
128
  "html-type": "submit"
121
129
  }, {
122
130
  default: t(() => [
123
- v(p(e(o)("ap.apView.save")), 1)
131
+ w(p(e(o)("ap.apView.save")), 1)
124
132
  ]),
125
133
  _: 1
126
134
  })
@@ -136,30 +144,30 @@ const le = /* @__PURE__ */ $({
136
144
  ], 2)
137
145
  ]),
138
146
  default: t(() => [
139
- u("div", {
140
- class: m({
141
- [e(n)("main-content")]: !0,
142
- [e(n)("main-content-disabled")]: e(f).length >= c.maxViewNum + 1
147
+ c("div", {
148
+ class: r({
149
+ [e(l)("main-content")]: !0,
150
+ [e(l)("main-content-disabled")]: e(f).length >= u.maxViewNum + 1
143
151
  })
144
152
  }, [
145
- a(e(q), { placement: "bottom" }, K({
153
+ a(e(B), { placement: "bottom" }, j({
146
154
  default: t(() => [
147
- a(e(N), { size: 4 }, {
155
+ a(e(x), { size: 4 }, {
148
156
  default: t(() => [
149
157
  a(L, {
150
- class: m([e(n)("icon")])
158
+ class: r([e(l)("icon")])
151
159
  }, null, 8, ["class"]),
152
- u("div", null, p(e(o)("ap.apView.saveView")), 1)
160
+ c("div", null, p(e(o)("ap.apView.saveView")), 1)
153
161
  ]),
154
162
  _: 1
155
163
  })
156
164
  ]),
157
165
  _: 2
158
166
  }, [
159
- e(f).length >= c.maxViewNum + 1 ? {
167
+ e(f).length >= u.maxViewNum + 1 ? {
160
168
  name: "title",
161
169
  fn: t(() => [
162
- v(p(e(o)("ap.apView.maxTip")), 1)
170
+ w(p(e(o)("ap.apView.maxTip")), 1)
163
171
  ]),
164
172
  key: "0"
165
173
  } : void 0
@@ -171,5 +179,5 @@ const le = /* @__PURE__ */ $({
171
179
  }
172
180
  });
173
181
  export {
174
- le as default
182
+ pe as default
175
183
  };