@aplus-frontend/ui 0.6.0-beta.7 → 0.6.0-beta.9

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