@aplus-frontend/ui 6.34.0 → 6.35.1

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 (65) hide show
  1. package/es/src/ag-grid/components/tooltip/index.vue2.mjs +1 -1
  2. package/es/src/ag-grid/hooks/use-selection-col-def.mjs +28 -22
  3. package/es/src/ag-grid/index.vue.mjs +77 -72
  4. package/es/src/ag-grid/interface.d.ts +5 -1
  5. package/es/src/ap-form/ap-form.vue.d.ts +2 -6
  6. package/es/src/ap-form/ap-form.vue2.mjs +71 -69
  7. package/es/src/ap-form/item/index.vue.mjs +13 -12
  8. package/es/src/ap-grid/editable/form-item.vue.mjs +74 -71
  9. package/es/src/ap-grid/editable/index.vue.mjs +94 -91
  10. package/es/src/ap-grid/index.vue.mjs +74 -69
  11. package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
  12. package/es/src/ap-table/ap-table.vue2.mjs +72 -69
  13. package/es/src/ap-tag/ap-tag-group.vue.mjs +33 -30
  14. package/es/src/ap-upload/components/SingleFile.vue2.mjs +103 -103
  15. package/es/src/business/ap-attachment/ApAttachment.mjs +16 -15
  16. package/es/src/business/ap-copy/ApCopy.mjs +5 -6
  17. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +176 -175
  18. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +4 -4
  19. package/es/src/business/ap-label/ApLabel.d.ts +1 -1
  20. package/es/src/business/ap-label/index.d.ts +3 -3
  21. package/es/src/business/hooks/useKeepAliveFlag.d.ts +3 -0
  22. package/es/src/business/hooks/useKeepAliveFlag.mjs +10 -7
  23. package/es/src/business/hooks/usePageListAgGrid.d.ts +1 -2
  24. package/es/src/business/hooks/usePageListAgGrid.mjs +29 -38
  25. package/es/src/business/hooks/usePageListApTable.mjs +10 -9
  26. package/es/src/editable-table/form-item.vue.mjs +75 -72
  27. package/es/src/editable-table/hooks/use-get-columns.mjs +35 -34
  28. package/es/src/editable-table/index.vue.mjs +68 -65
  29. package/es/src/utils/warning.d.ts +25 -0
  30. package/es/src/utils/warning.mjs +74 -0
  31. package/es/src/version.d.ts +1 -1
  32. package/es/src/version.mjs +1 -1
  33. package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
  34. package/lib/src/ag-grid/hooks/use-selection-col-def.js +1 -1
  35. package/lib/src/ag-grid/index.vue.js +1 -1
  36. package/lib/src/ag-grid/interface.d.ts +5 -1
  37. package/lib/src/ap-form/ap-form.vue.d.ts +2 -6
  38. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  39. package/lib/src/ap-form/item/index.vue.js +1 -1
  40. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  41. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  42. package/lib/src/ap-grid/index.vue.js +1 -1
  43. package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
  44. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  45. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  46. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  47. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  48. package/lib/src/business/ap-copy/ApCopy.js +1 -1
  49. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  50. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -1
  51. package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
  52. package/lib/src/business/ap-label/index.d.ts +3 -3
  53. package/lib/src/business/hooks/useKeepAliveFlag.d.ts +3 -0
  54. package/lib/src/business/hooks/useKeepAliveFlag.js +1 -1
  55. package/lib/src/business/hooks/usePageListAgGrid.d.ts +1 -2
  56. package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
  57. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  58. package/lib/src/editable-table/form-item.vue.js +1 -1
  59. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  60. package/lib/src/editable-table/index.vue.js +1 -1
  61. package/lib/src/utils/warning.d.ts +25 -0
  62. package/lib/src/utils/warning.js +1 -0
  63. package/lib/src/version.d.ts +1 -1
  64. package/lib/src/version.js +1 -1
  65. package/package.json +3 -3
@@ -1,260 +1,261 @@
1
- import { defineComponent as ae, ref as T, computed as G, useTemplateRef as ne, watch as le, toRaw as se, onMounted as ie, onUnmounted as ue, createBlock as ce, openBlock as F, unref as L, withCtx as de, createElementVNode as ge, normalizeStyle as z, normalizeClass as U, createElementBlock as V, Fragment as fe, renderList as me, renderSlot as pe } from "vue";
1
+ import { defineComponent as le, ref as A, computed as x, useTemplateRef as se, watch as ie, toRaw as ue, onMounted as de, onUnmounted as ce, createBlock as fe, openBlock as R, unref as L, withCtx as ge, createElementVNode as me, normalizeStyle as U, normalizeClass as V, createElementBlock as j, Fragment as pe, renderList as ve, renderSlot as he } from "vue";
2
2
  import { ApDraggableGridProps as we } from "./constans.mjs";
3
- import { Spin as ve } from "@aplus-frontend/antdv";
3
+ import { Spin as ye } from "@aplus-frontend/antdv";
4
4
  import "../../config-provider/index.mjs";
5
5
  import { sortItemsByRowAndCol as D } from "./utils/sortItemsByRowAndCol.mjs";
6
- import { useNamespace as he } from "../../config-provider/hooks/use-namespace.mjs";
7
- const ye = ["data-span", "data-index", "data-row", "data-col", "data-height", "data-module", "draggable"], Te = /* @__PURE__ */ ae({
6
+ import { warning as K, note as w } from "../../utils/warning.mjs";
7
+ import { useNamespace as be } from "../../config-provider/hooks/use-namespace.mjs";
8
+ const $e = ["data-span", "data-index", "data-row", "data-col", "data-height", "data-module", "draggable"], Ce = /* @__PURE__ */ le({
8
9
  __name: "ApDraggableGrid",
9
10
  props: we(),
10
11
  emits: ["onGridListChange"],
11
- setup(j, { expose: K, emit: Q }) {
12
- const c = j, { b: R, e: A, m: X } = he("ap-draggable-grid"), C = T(!1), O = T(!1), P = G(() => A("item")), W = G(() => A("dragging")), x = G(() => A("overlay")), Y = G(() => c.customWrapper ? `.${c.customWrapper} .${P.value}:not(.${W.value})` : `.${P.value}:not(.${W.value})`), Z = Q, f = ne("gridContainer"), E = T([]);
13
- le(
14
- () => c.gridList,
12
+ setup(Q, { expose: X, emit: Y }) {
13
+ const d = Q, { b: O, e: C, m: Z } = be("ap-draggable-grid"), G = A(!1), P = A(!1), W = x(() => C("item")), k = x(() => C("dragging")), H = x(() => C("overlay")), ee = x(() => d.customWrapper ? `.${d.customWrapper} .${W.value}:not(.${k.value})` : `.${W.value}:not(.${k.value})`), re = Y, f = se("gridContainer"), E = A([]);
14
+ ie(
15
+ () => d.gridList,
15
16
  (e) => {
16
- Array.isArray(e) && i(e);
17
+ Array.isArray(e) && s(e);
17
18
  },
18
19
  { deep: !0, immediate: !0 }
19
20
  );
20
- function i(e) {
21
- const t = [...e].sort((o, u) => o.row - u.row);
22
- E.value = t.map((o) => ({
23
- ...o
24
- })), Z(
21
+ function s(e) {
22
+ const a = [...e].sort((r, i) => r.row - i.row);
23
+ E.value = a.map((r) => ({
24
+ ...r
25
+ })), re(
25
26
  "onGridListChange",
26
27
  JSON.parse(JSON.stringify(E.value))
27
28
  );
28
29
  }
29
- const ee = (e) => ({
30
+ const te = (e) => ({
30
31
  gridColumn: `${e.col} / span ${e.span}`,
31
32
  gridRow: e.row,
32
- minHeight: e.showHeight ? e.showHeight + "px" : `${c.gridItemHeight}px`,
33
- height: e.showHeight ? e.showHeight + "px" : `${c.gridItemHeight}px`,
34
- boxShadow: c.gridItemShadow ? c.gridItemShadow : "none"
33
+ minHeight: e.showHeight ? e.showHeight + "px" : `${d.gridItemHeight}px`,
34
+ height: e.showHeight ? e.showHeight + "px" : `${d.gridItemHeight}px`,
35
+ boxShadow: d.gridItemShadow ? d.gridItemShadow : "none"
35
36
  });
36
- async function k() {
37
- if (i([]), typeof c.request == "function")
37
+ async function J() {
38
+ if (s([]), typeof d.request == "function")
38
39
  try {
39
- C.value = !0;
40
- const e = await c.request();
41
- Array.isArray(e) ? (console.log("ApDraggableGrid: 请求到的布局数据:", e), i(e)) : console.warn(
40
+ G.value = !0;
41
+ const e = await d.request();
42
+ Array.isArray(e) && s(e), K(
43
+ Array.isArray(e),
42
44
  "ApDraggableGrid: 请求函数必须返回一个符合 ApDraggableGridItemBase 数组的格式"
43
45
  );
44
46
  } catch (e) {
45
- console.error("ApDraggableGrid: 请求错误:", e);
47
+ K(!1, `ApDraggableGrid: 请求错误: ${e}`);
46
48
  } finally {
47
- C.value = !1;
49
+ G.value = !1;
48
50
  }
49
51
  }
50
- let $ = T(null), N = T(null), w = null, H = !1, h = null;
51
- const J = (e) => {
52
- if (!H && (H = !0, e.dataTransfer && e.target instanceof HTMLElement)) {
53
- const t = e.target.dataset;
54
- e.dataTransfer.setData("text/plain", t.module), e.dataTransfer.effectAllowed = "move", $.value = {
55
- span: Number(t.span),
56
- col: Number(t.col),
57
- row: Number(t.row),
58
- module: t.module,
59
- height: Number(t.height),
60
- index: Number(t.index)
61
- }, w = e.target, w.style.opacity = "0";
52
+ let N = A(null), S = A(null), v = null, M = !1, y = null;
53
+ const q = (e) => {
54
+ if (!M && (M = !0, e.dataTransfer && e.target instanceof HTMLElement)) {
55
+ const a = e.target.dataset;
56
+ e.dataTransfer.setData("text/plain", a.module), e.dataTransfer.effectAllowed = "move", N.value = {
57
+ span: Number(a.span),
58
+ col: Number(a.col),
59
+ row: Number(a.row),
60
+ module: a.module,
61
+ height: Number(a.height),
62
+ index: Number(a.index)
63
+ }, v = e.target, v.style.opacity = "0";
62
64
  }
63
- }, q = (e) => {
64
- if (e.preventDefault(), h && clearTimeout(h), h = window.setTimeout(() => {
65
- H = !1, h = null;
65
+ }, B = (e) => {
66
+ if (e.preventDefault(), y && clearTimeout(y), y = window.setTimeout(() => {
67
+ M = !1, y = null;
66
68
  }, 300), e.dataTransfer && e.target instanceof HTMLElement) {
67
- const t = e.target.closest(
68
- Y.value
69
+ const a = e.target.closest(
70
+ ee.value
69
71
  );
70
- if (!t) return;
71
- const o = t.dataset;
72
+ if (!a) return;
73
+ const r = a.dataset;
72
74
  document.querySelectorAll(
73
- `.${c.customWrapper} div[data-row="${o.row}"]`
74
- ).forEach((s) => {
75
- s.classList.add(x.value);
76
- }), N.value = {
77
- span: Number(o.span),
78
- col: Number(o.col),
79
- row: Number(o.row),
80
- module: o.module,
81
- height: Number(o.height),
82
- index: Number(o.index)
75
+ `.${d.customWrapper} div[data-row="${r.row}"]`
76
+ ).forEach((l) => {
77
+ l.classList.add(H.value);
78
+ }), S.value = {
79
+ span: Number(r.span),
80
+ col: Number(r.col),
81
+ row: Number(r.row),
82
+ module: r.module,
83
+ height: Number(r.height),
84
+ index: Number(r.index)
83
85
  };
84
86
  }
85
- }, B = (e) => {
86
- e.preventDefault(), w && (w.style.opacity = "1", w = null), oe($, N) && re($, N), document.querySelectorAll(`.${x.value}`).forEach((t) => {
87
- t.classList.remove(x.value);
88
- }), $.value = null, N.value = null, O.value = !1;
89
- }, _ = () => {
90
- w && (w.style.opacity = "1", w = null), $.value = null, N.value = null, O.value = !1;
91
- }, oe = (e, t) => {
92
- const { span: o, module: u } = e.value, { span: s, module: d } = t.value;
93
- return u === d && o === s ? (console.log("如果自己放在自己之上不能交换数据"), !1) : !0;
94
- }, re = (e, t) => {
95
- if (!e.value || !t.value) return;
87
+ }, _ = (e) => {
88
+ e.preventDefault(), v && (v.style.opacity = "1", v = null), ae(N, S) && oe(N, S), document.querySelectorAll(`.${H.value}`).forEach((a) => {
89
+ a.classList.remove(H.value);
90
+ }), N.value = null, S.value = null, P.value = !1;
91
+ }, z = () => {
92
+ v && (v.style.opacity = "1", v = null), N.value = null, S.value = null, P.value = !1;
93
+ }, ae = (e, a) => {
94
+ const { span: r, module: i } = e.value, { span: l, module: c } = a.value;
95
+ return !(i === c && r === l);
96
+ }, oe = (e, a) => {
97
+ if (!e.value || !a.value) return;
96
98
  const {
97
- span: o,
98
- col: u,
99
- row: s,
100
- module: d,
101
- height: S,
102
- index: n
99
+ span: r,
100
+ col: i,
101
+ row: l,
102
+ module: c,
103
+ height: I,
104
+ index: u
103
105
  } = e.value, {
104
- span: b,
105
- col: v,
106
+ span: $,
107
+ col: h,
106
108
  row: m,
107
- module: te,
108
- height: M,
109
+ module: ne,
110
+ height: F,
109
111
  index: g
110
- } = t.value;
111
- if (s === m && u === v && o === b && S === M && d === te) {
112
- console.log("从同一位置拖拽到同一位置,不做任何操作");
112
+ } = a.value;
113
+ if (l === m && i === h && r === $ && I === F && c === ne)
113
114
  return;
114
- }
115
- let r = [...se(E.value)];
116
- const I = JSON.parse(JSON.stringify(r));
117
- if (s === m)
118
- if (n > g) {
119
- console.log("", "从右向左拖拽"), console.log(n, g), console.log(n - g), n - g === 1 ? (r[g].col = o + v, r[n].col = v) : (r.forEach((p, a) => {
120
- a < n && a >= g && (p.col += b);
121
- }), r[n].col = v);
122
- const l = D(r);
123
- if (!y(l)) {
124
- console.warn("交换后的布局无效,恢复原始布局");
115
+ let t = [...ue(E.value)];
116
+ const T = JSON.parse(JSON.stringify(t));
117
+ if (l === m)
118
+ if (u > g) {
119
+ u - g === 1 ? (t[g].col = r + h, t[u].col = h) : (t.forEach((p, o) => {
120
+ o < u && o >= g && (p.col += $);
121
+ }), t[u].col = h);
122
+ const n = D(t);
123
+ if (!b(n)) {
124
+ w(!1, "交换后的布局无效,恢复原始布局");
125
125
  return;
126
126
  }
127
- i(l);
127
+ s(n);
128
128
  return;
129
129
  } else {
130
- console.log(n, g), console.log("", "从左向右拖拽"), g - n === 1 ? (r[n].col = b + 1, r[g].col = u) : (r.forEach((p, a) => {
131
- a > n && a <= g && (p.col -= b);
132
- }), r[n].col = v);
133
- const l = D(r);
134
- if (console.log("交换后的布局:", l), !y(l)) {
135
- console.warn("交换后的布局无效,恢复原始布局"), i(I);
130
+ g - u === 1 ? (t[u].col = $ + 1, t[g].col = i) : (t.forEach((p, o) => {
131
+ o > u && o <= g && (p.col -= $);
132
+ }), t[u].col = h);
133
+ const n = D(t);
134
+ if (!b(n)) {
135
+ s(T);
136
136
  return;
137
137
  }
138
- i(l);
138
+ s(n);
139
139
  return;
140
140
  }
141
- else if (m < s) {
142
- if (console.log("从下向上拖拽"), o === 24) {
143
- const l = [];
144
- for (let a = m; a < s; a++)
145
- l.push(a);
146
- r.forEach((a) => {
147
- l.includes(a.row) && (a.row += 1);
148
- }), r[n].row = m;
149
- const p = D(r);
150
- if (!y(p)) {
151
- console.warn("交换后的布局无效,恢复原始布局"), i(I);
141
+ else if (m < l) {
142
+ if (r === 24) {
143
+ const n = [];
144
+ for (let o = m; o < l; o++)
145
+ n.push(o);
146
+ t.forEach((o) => {
147
+ n.includes(o.row) && (o.row += 1);
148
+ }), t[u].row = m;
149
+ const p = D(t);
150
+ if (!b(p)) {
151
+ w(!1, "交换后的布局无效,恢复原始布局"), s(T);
152
152
  return;
153
153
  }
154
- i(p);
154
+ s(p);
155
155
  return;
156
156
  }
157
- if (o === b && S === M) {
158
- r[n].row = m, r[n].col = v, r[g].row = s, r[g].col = u;
159
- const l = D(r);
160
- if (!y(l)) {
161
- console.warn("交换后的布局无效,恢复原始布局"), i(I);
157
+ if (r === $ && I === F) {
158
+ t[u].row = m, t[u].col = h, t[g].row = l, t[g].col = i;
159
+ const n = D(t);
160
+ if (!b(n)) {
161
+ w(!1, "交换后的布局无效,恢复原始布局"), s(T);
162
162
  return;
163
163
  }
164
- i(l);
164
+ s(n);
165
165
  return;
166
166
  }
167
167
  } else {
168
- if (console.log("从上向下拖拽"), o === 24) {
169
- console.log("如果拖拽元素跨度为24", "从上向下拖拽");
170
- const l = [];
171
- for (let a = s + 1; a <= m; a++)
172
- l.push(a);
173
- r.forEach((a) => {
174
- l.includes(a.row) && (a.row -= 1);
175
- }), r[n].row = m;
176
- const p = D(r);
177
- if (!y(p)) {
178
- console.warn("交换后的布局无效,恢复原始布局"), i(I);
168
+ if (r === 24) {
169
+ const n = [];
170
+ for (let o = l + 1; o <= m; o++)
171
+ n.push(o);
172
+ t.forEach((o) => {
173
+ n.includes(o.row) && (o.row -= 1);
174
+ }), t[u].row = m;
175
+ const p = D(t);
176
+ if (!b(p)) {
177
+ w(!1, "交换后的布局无效,恢复原始布局"), s(T);
179
178
  return;
180
179
  }
181
- i(p);
180
+ s(p);
182
181
  return;
183
182
  }
184
- if (o === b && S === M) {
185
- r[n].row = m, r[n].col = v, r[g].row = s, r[g].col = u;
186
- const l = D(r);
187
- if (!y(l)) {
188
- console.warn("交换后的布局无效,恢复原始布局"), i(I);
183
+ if (r === $ && I === F) {
184
+ t[u].row = m, t[u].col = h, t[g].row = l, t[g].col = i;
185
+ const n = D(t);
186
+ if (!b(n)) {
187
+ w(!1, "交换后的布局无效,恢复原始布局"), s(T);
189
188
  return;
190
189
  }
191
- i(l);
190
+ s(n);
192
191
  return;
193
192
  }
194
193
  }
195
- }, y = (e) => {
196
- const t = {};
197
- e.forEach((o) => {
198
- t[o.row] || (t[o.row] = []), t[o.row].push(o);
194
+ }, b = (e) => {
195
+ const a = {};
196
+ e.forEach((r) => {
197
+ a[r.row] || (a[r.row] = []), a[r.row].push(r);
199
198
  });
200
- for (const o in t) {
201
- const u = t[o].sort((d, S) => d.col - S.col);
202
- let s = 1;
203
- for (const d of u) {
204
- if (d.col < s)
205
- return console.warn(
206
- `行 ${o} 中的元素重叠: 元素 ${d.module} 在列 ${d.col}, 但当前列已经是 ${s}`
199
+ for (const r in a) {
200
+ const i = a[r].sort((c, I) => c.col - I.col);
201
+ let l = 1;
202
+ for (const c of i) {
203
+ if (c.col < l)
204
+ return w(
205
+ !1,
206
+ `行 ${r} 中的元素重叠: 元素 ${c.module} 在列 ${c.col}, 但当前列已经是 ${l}`
207
207
  ), !1;
208
- if (s = d.col + d.span, s > 25)
209
- return console.warn(
210
- `行 ${o} 中的元素超出界限: 元素 ${d.module} 在列 ${d.col} 跨度 ${d.span}`
208
+ if (l = c.col + c.span, l > 25)
209
+ return w(
210
+ !1,
211
+ `行 ${r} 中的元素超出界限: 元素 ${c.module} 在列 ${c.col} 跨度 ${c.span}`
211
212
  ), !1;
212
213
  }
213
214
  }
214
215
  return !0;
215
216
  };
216
- return ie(async () => {
217
- await k(), !c.disableDrag && f.value && (f.value.addEventListener("dragstart", J), f.value.addEventListener("dragover", q), f.value.addEventListener("drop", B), f.value.addEventListener("dragend", _));
218
- }), ue(() => {
219
- f.value && (f.value.removeEventListener("dragstart", J), f.value.removeEventListener("dragover", q), f.value.removeEventListener("drop", B), f.value.removeEventListener("dragend", _), h && clearTimeout(h));
220
- }), K({
217
+ return de(async () => {
218
+ await J(), !d.disableDrag && f.value && (f.value.addEventListener("dragstart", q), f.value.addEventListener("dragover", B), f.value.addEventListener("drop", _), f.value.addEventListener("dragend", z));
219
+ }), ce(() => {
220
+ f.value && (f.value.removeEventListener("dragstart", q), f.value.removeEventListener("dragover", B), f.value.removeEventListener("drop", _), f.value.removeEventListener("dragend", z), y && clearTimeout(y));
221
+ }), X({
221
222
  setGridItems: (e) => {
222
- i(e);
223
+ s(e);
223
224
  },
224
225
  getGridItems: () => JSON.parse(JSON.stringify(E.value)),
225
226
  refreshGrid: () => {
226
227
  (async () => {
227
- await k();
228
+ await J();
228
229
  })();
229
230
  }
230
- }), (e, t) => (F(), ce(L(ve), { spinning: C.value }, {
231
- default: de(() => [
232
- ge("div", {
231
+ }), (e, a) => (R(), fe(L(ye), { spinning: G.value }, {
232
+ default: ge(() => [
233
+ me("div", {
233
234
  ref_key: "gridContainer",
234
235
  ref: f,
235
- class: U([C.value ? L(R)("loading") : L(R)(), c.customWrapper]),
236
- style: z({
236
+ class: V([G.value ? L(O)("loading") : L(O)(), d.customWrapper]),
237
+ style: U({
237
238
  width: typeof e.gridWidth == "number" ? `${e.gridWidth}px` : e.gridWidth,
238
239
  gap: `${e.gapWidth}px`
239
240
  })
240
241
  }, [
241
- (F(!0), V(fe, null, me(E.value, (o, u) => (F(), V("div", {
242
- key: u,
243
- class: U([L(A)("item"), c.disableDrag ? "" : L(X)("canDrag")]),
244
- "data-span": o.span,
245
- "data-index": u,
246
- "data-row": o.row,
247
- "data-col": o.col,
248
- "data-height": o.height,
249
- "data-module": o.module,
250
- style: z([ee(o)]),
251
- draggable: !c.disableDrag
242
+ (R(!0), j(pe, null, ve(E.value, (r, i) => (R(), j("div", {
243
+ key: i,
244
+ class: V([L(C)("item"), d.disableDrag ? "" : L(Z)("canDrag")]),
245
+ "data-span": r.span,
246
+ "data-index": i,
247
+ "data-row": r.row,
248
+ "data-col": r.col,
249
+ "data-height": r.height,
250
+ "data-module": r.module,
251
+ style: U([te(r)]),
252
+ draggable: !d.disableDrag
252
253
  }, [
253
- pe(e.$slots, "item", {
254
- item: o,
255
- index: u
254
+ he(e.$slots, "item", {
255
+ item: r,
256
+ index: i
256
257
  })
257
- ], 14, ye))), 128))
258
+ ], 14, $e))), 128))
258
259
  ], 6)
259
260
  ]),
260
261
  _: 3
@@ -262,5 +263,5 @@ const ye = ["data-span", "data-index", "data-row", "data-col", "data-height", "d
262
263
  }
263
264
  });
264
265
  export {
265
- Te as default
266
+ Ce as default
266
267
  };
@@ -1,9 +1,9 @@
1
1
  const a = {
2
- get(t) {
2
+ get(e) {
3
3
  },
4
- set(t, s) {
5
- const e = t.component?.exposed;
6
- console.log("[ apViewInstance ] >", e), e && e.setFirstDefaultSystemView(!0);
4
+ set(e, s) {
5
+ const t = e.component?.exposed;
6
+ t && t.setFirstDefaultSystemView(!0);
7
7
  }
8
8
  };
9
9
  export {
@@ -129,7 +129,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
129
129
  show: boolean;
130
130
  dot: boolean;
131
131
  count: any;
132
- iconType: "ellipsis" | "success" | "warning" | "question" | "line-warning" | undefined;
132
+ iconType: "ellipsis" | "warning" | "success" | "question" | "line-warning" | undefined;
133
133
  showZero: boolean;
134
134
  overflowCount: number;
135
135
  numberStyle: CSSProperties;
@@ -71,7 +71,7 @@ declare const ApLabel: {
71
71
  show: boolean;
72
72
  dot: boolean;
73
73
  count: any;
74
- iconType: "ellipsis" | "success" | "warning" | "question" | "line-warning" | undefined;
74
+ iconType: "ellipsis" | "warning" | "success" | "question" | "line-warning" | undefined;
75
75
  showZero: boolean;
76
76
  overflowCount: number;
77
77
  numberStyle: CSSProperties;
@@ -153,7 +153,7 @@ declare const ApLabel: {
153
153
  show: boolean;
154
154
  dot: boolean;
155
155
  count: any;
156
- iconType: "ellipsis" | "success" | "warning" | "question" | "line-warning" | undefined;
156
+ iconType: "ellipsis" | "warning" | "success" | "question" | "line-warning" | undefined;
157
157
  showZero: boolean;
158
158
  overflowCount: number;
159
159
  numberStyle: CSSProperties;
@@ -232,7 +232,7 @@ declare const ApLabel: {
232
232
  show: boolean;
233
233
  dot: boolean;
234
234
  count: any;
235
- iconType: "ellipsis" | "success" | "warning" | "question" | "line-warning" | undefined;
235
+ iconType: "ellipsis" | "warning" | "success" | "question" | "line-warning" | undefined;
236
236
  showZero: boolean;
237
237
  overflowCount: number;
238
238
  numberStyle: CSSProperties;
@@ -1,6 +1,8 @@
1
1
  interface UseKeepAliveFlagOptions {
2
2
  /** 状态切换到deactivated时触发 */
3
3
  afterDeactivated?: () => void;
4
+ /** 状态切换到activated时触发 */
5
+ afterActivated?: () => void;
4
6
  }
5
7
  /**
6
8
  * 获取keepAliveFlag
@@ -10,5 +12,6 @@ export declare function useKeepAliveFlag(options?: UseKeepAliveFlagOptions): {
10
12
  isDeactivated: () => boolean;
11
13
  isActivated: () => boolean;
12
14
  registerAfterDeactivated: (fn: UseKeepAliveFlagOptions["afterDeactivated"]) => void;
15
+ registerAfterActivated: (fn: UseKeepAliveFlagOptions["afterActivated"]) => void;
13
16
  };
14
17
  export {};
@@ -1,18 +1,21 @@
1
1
  import { onActivated as v, onDeactivated as c } from "vue";
2
- function o(a) {
3
- let e = "notKeepAlive", t = a?.afterDeactivated;
2
+ function s(i) {
3
+ let e = "notKeepAlive", r = i?.afterDeactivated, t = i?.afterActivated;
4
4
  return v(() => {
5
- e = "activated";
5
+ t && e === "deactivated" && Promise.resolve().then(t), e = "activated";
6
6
  }), c(() => {
7
- e = "deactivated", t?.();
7
+ e = "deactivated", r?.();
8
8
  }), {
9
9
  isDeactivated: () => e === "deactivated",
10
10
  isActivated: () => e === "activated",
11
- registerAfterDeactivated: (i) => {
12
- t = i;
11
+ registerAfterDeactivated: (a) => {
12
+ r = a;
13
+ },
14
+ registerAfterActivated: (a) => {
15
+ t = a;
13
16
  }
14
17
  };
15
18
  }
16
19
  export {
17
- o as useKeepAliveFlag
20
+ s as useKeepAliveFlag
18
21
  };
@@ -1,4 +1,3 @@
1
- import { UseTableRefreshOption } from '..';
2
1
  import { AgGridExpose, AgGridProps } from '../../ag-grid';
3
2
  export interface UsePageListAgGrid extends AgGridProps {
4
3
  /** 是否显示默认的行选择配置
@@ -18,7 +17,7 @@ export interface UsePageListAgGrid extends AgGridProps {
18
17
  /**
19
18
  * 表格刷新相关
20
19
  */
21
- tableRefresh?: boolean | Omit<UseTableRefreshOption, 'apTableRef'>;
20
+ tableRefresh?: boolean | (() => boolean);
22
21
  /** 是否需要在deactivated的时候清空数据
23
22
  * @default true
24
23
  */