@aplus-frontend/ui 6.34.0 → 6.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ag-grid/components/tooltip/index.vue2.mjs +1 -1
- package/es/src/ag-grid/hooks/use-selection-col-def.mjs +28 -22
- package/es/src/ag-grid/index.vue.mjs +77 -72
- package/es/src/ag-grid/interface.d.ts +5 -1
- package/es/src/ap-form/ap-form.vue.d.ts +2 -6
- package/es/src/ap-form/ap-form.vue2.mjs +71 -69
- package/es/src/ap-grid/editable/form-item.vue.mjs +74 -71
- package/es/src/ap-grid/editable/index.vue.mjs +94 -91
- package/es/src/ap-grid/index.vue.mjs +74 -69
- package/es/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue2.mjs +72 -69
- package/es/src/ap-tag/ap-tag-group.vue.mjs +33 -30
- package/es/src/ap-upload/components/SingleFile.vue2.mjs +103 -103
- package/es/src/business/ap-attachment/ApAttachment.mjs +16 -15
- package/es/src/business/ap-copy/ApCopy.mjs +5 -6
- package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +176 -175
- package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +4 -4
- package/es/src/business/ap-label/ApLabel.d.ts +1 -1
- package/es/src/business/ap-label/index.d.ts +3 -3
- package/es/src/business/hooks/usePageListApTable.mjs +10 -9
- package/es/src/editable-table/form-item.vue.mjs +75 -72
- package/es/src/editable-table/hooks/use-get-columns.mjs +35 -34
- package/es/src/editable-table/index.vue.mjs +68 -65
- package/es/src/utils/warning.d.ts +25 -0
- package/es/src/utils/warning.mjs +74 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -1
- package/lib/src/ag-grid/hooks/use-selection-col-def.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +5 -1
- package/lib/src/ap-form/ap-form.vue.d.ts +2 -6
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-pro-card/components/statistic/index.vue.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-copy/ApCopy.js +1 -1
- package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
- package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -1
- package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
- package/lib/src/business/ap-label/index.d.ts +3 -3
- package/lib/src/business/hooks/usePageListApTable.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/utils/warning.d.ts +25 -0
- package/lib/src/utils/warning.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,260 +1,261 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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
|
|
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 {
|
|
7
|
-
|
|
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(
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
() =>
|
|
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) &&
|
|
17
|
+
Array.isArray(e) && s(e);
|
|
17
18
|
},
|
|
18
19
|
{ deep: !0, immediate: !0 }
|
|
19
20
|
);
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
E.value =
|
|
23
|
-
...
|
|
24
|
-
})),
|
|
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
|
|
30
|
+
const te = (e) => ({
|
|
30
31
|
gridColumn: `${e.col} / span ${e.span}`,
|
|
31
32
|
gridRow: e.row,
|
|
32
|
-
minHeight: e.showHeight ? e.showHeight + "px" : `${
|
|
33
|
-
height: e.showHeight ? e.showHeight + "px" : `${
|
|
34
|
-
boxShadow:
|
|
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
|
|
37
|
-
if (
|
|
37
|
+
async function J() {
|
|
38
|
+
if (s([]), typeof d.request == "function")
|
|
38
39
|
try {
|
|
39
|
-
|
|
40
|
-
const e = await
|
|
41
|
-
Array.isArray(e)
|
|
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
|
-
|
|
47
|
+
K(!1, `ApDraggableGrid: 请求错误: ${e}`);
|
|
46
48
|
} finally {
|
|
47
|
-
|
|
49
|
+
G.value = !1;
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
|
-
let
|
|
51
|
-
const
|
|
52
|
-
if (!
|
|
53
|
-
const
|
|
54
|
-
e.dataTransfer.setData("text/plain",
|
|
55
|
-
span: Number(
|
|
56
|
-
col: Number(
|
|
57
|
-
row: Number(
|
|
58
|
-
module:
|
|
59
|
-
height: Number(
|
|
60
|
-
index: Number(
|
|
61
|
-
},
|
|
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
|
-
},
|
|
64
|
-
if (e.preventDefault(),
|
|
65
|
-
|
|
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
|
|
68
|
-
|
|
69
|
+
const a = e.target.closest(
|
|
70
|
+
ee.value
|
|
69
71
|
);
|
|
70
|
-
if (!
|
|
71
|
-
const
|
|
72
|
+
if (!a) return;
|
|
73
|
+
const r = a.dataset;
|
|
72
74
|
document.querySelectorAll(
|
|
73
|
-
`.${
|
|
74
|
-
).forEach((
|
|
75
|
-
|
|
76
|
-
}),
|
|
77
|
-
span: Number(
|
|
78
|
-
col: Number(
|
|
79
|
-
row: Number(
|
|
80
|
-
module:
|
|
81
|
-
height: Number(
|
|
82
|
-
index: Number(
|
|
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
|
-
},
|
|
86
|
-
e.preventDefault(),
|
|
87
|
-
|
|
88
|
-
}),
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
const { span:
|
|
93
|
-
return
|
|
94
|
-
},
|
|
95
|
-
if (!e.value || !
|
|
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:
|
|
98
|
-
col:
|
|
99
|
-
row:
|
|
100
|
-
module:
|
|
101
|
-
height:
|
|
102
|
-
index:
|
|
99
|
+
span: r,
|
|
100
|
+
col: i,
|
|
101
|
+
row: l,
|
|
102
|
+
module: c,
|
|
103
|
+
height: I,
|
|
104
|
+
index: u
|
|
103
105
|
} = e.value, {
|
|
104
|
-
span:
|
|
105
|
-
col:
|
|
106
|
+
span: $,
|
|
107
|
+
col: h,
|
|
106
108
|
row: m,
|
|
107
|
-
module:
|
|
108
|
-
height:
|
|
109
|
+
module: ne,
|
|
110
|
+
height: F,
|
|
109
111
|
index: g
|
|
110
|
-
} =
|
|
111
|
-
if (
|
|
112
|
-
console.log("从同一位置拖拽到同一位置,不做任何操作");
|
|
112
|
+
} = a.value;
|
|
113
|
+
if (l === m && i === h && r === $ && I === F && c === ne)
|
|
113
114
|
return;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
|
|
127
|
+
s(n);
|
|
128
128
|
return;
|
|
129
129
|
} else {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}),
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
|
|
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
|
-
|
|
138
|
+
s(n);
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
|
-
else if (m <
|
|
142
|
-
if (
|
|
143
|
-
const
|
|
144
|
-
for (let
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}),
|
|
149
|
-
const p = D(
|
|
150
|
-
if (!
|
|
151
|
-
|
|
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
|
-
|
|
154
|
+
s(p);
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
if (
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
if (!
|
|
161
|
-
|
|
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
|
-
|
|
164
|
+
s(n);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
} else {
|
|
168
|
-
if (
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
|
|
180
|
+
s(p);
|
|
182
181
|
return;
|
|
183
182
|
}
|
|
184
|
-
if (
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
if (!
|
|
188
|
-
|
|
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
|
-
|
|
190
|
+
s(n);
|
|
192
191
|
return;
|
|
193
192
|
}
|
|
194
193
|
}
|
|
195
|
-
},
|
|
196
|
-
const
|
|
197
|
-
e.forEach((
|
|
198
|
-
|
|
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
|
|
201
|
-
const
|
|
202
|
-
let
|
|
203
|
-
for (const
|
|
204
|
-
if (
|
|
205
|
-
return
|
|
206
|
-
|
|
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 (
|
|
209
|
-
return
|
|
210
|
-
|
|
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
|
|
217
|
-
await
|
|
218
|
-
}),
|
|
219
|
-
f.value && (f.value.removeEventListener("dragstart",
|
|
220
|
-
}),
|
|
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
|
-
|
|
223
|
+
s(e);
|
|
223
224
|
},
|
|
224
225
|
getGridItems: () => JSON.parse(JSON.stringify(E.value)),
|
|
225
226
|
refreshGrid: () => {
|
|
226
227
|
(async () => {
|
|
227
|
-
await
|
|
228
|
+
await J();
|
|
228
229
|
})();
|
|
229
230
|
}
|
|
230
|
-
}), (e,
|
|
231
|
-
default:
|
|
232
|
-
|
|
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:
|
|
236
|
-
style:
|
|
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
|
-
(
|
|
242
|
-
key:
|
|
243
|
-
class:
|
|
244
|
-
"data-span":
|
|
245
|
-
"data-index":
|
|
246
|
-
"data-row":
|
|
247
|
-
"data-col":
|
|
248
|
-
"data-height":
|
|
249
|
-
"data-module":
|
|
250
|
-
style:
|
|
251
|
-
draggable: !
|
|
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
|
-
|
|
254
|
-
item:
|
|
255
|
-
index:
|
|
254
|
+
he(e.$slots, "item", {
|
|
255
|
+
item: r,
|
|
256
|
+
index: i
|
|
256
257
|
})
|
|
257
|
-
], 14,
|
|
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
|
-
|
|
266
|
+
Ce as default
|
|
266
267
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const a = {
|
|
2
|
-
get(
|
|
2
|
+
get(e) {
|
|
3
3
|
},
|
|
4
|
-
set(
|
|
5
|
-
const
|
|
6
|
-
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
235
|
+
iconType: "ellipsis" | "warning" | "success" | "question" | "line-warning" | undefined;
|
|
236
236
|
showZero: boolean;
|
|
237
237
|
overflowCount: number;
|
|
238
238
|
numberStyle: CSSProperties;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { merge as
|
|
1
|
+
import { merge as d, cloneDeep as h } from "lodash-unified";
|
|
2
2
|
import { ref as S } from "vue";
|
|
3
3
|
import { useTableRefresh as b } from "./useTableRefresh.mjs";
|
|
4
|
-
|
|
4
|
+
import { warning as g } from "../../utils/warning.mjs";
|
|
5
|
+
function v(o) {
|
|
5
6
|
return o === !0 ? {} : o === !1 ? {
|
|
6
7
|
refreshBefore: () => !1
|
|
7
8
|
} : o;
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
+
function O(o) {
|
|
10
11
|
const r = S(null), {
|
|
11
12
|
isShowRowSelection: u = !0,
|
|
12
13
|
clearSelectionOnRequest: i = !0,
|
|
@@ -20,9 +21,9 @@ function I(o) {
|
|
|
20
21
|
r.value?.rowSelection?.clearAll();
|
|
21
22
|
};
|
|
22
23
|
return b({
|
|
23
|
-
...
|
|
24
|
+
...v(f),
|
|
24
25
|
apTableRef: r
|
|
25
|
-
}), [
|
|
26
|
+
}), [d(
|
|
26
27
|
{
|
|
27
28
|
// scroll,tableLayout,columnResizable设置表格可拖动
|
|
28
29
|
scroll: { x: "100%", y: "100%" },
|
|
@@ -35,13 +36,13 @@ function I(o) {
|
|
|
35
36
|
const t = a ? a(e) : e;
|
|
36
37
|
try {
|
|
37
38
|
if (!s) throw new Error("api is not defined");
|
|
38
|
-
const { records: n, total:
|
|
39
|
+
const { records: n, total: p } = await s(t);
|
|
39
40
|
return i && c(), {
|
|
40
41
|
data: n,
|
|
41
|
-
total:
|
|
42
|
+
total: p
|
|
42
43
|
};
|
|
43
44
|
} catch (n) {
|
|
44
|
-
return
|
|
45
|
+
return g(!1, n), {
|
|
45
46
|
data: [],
|
|
46
47
|
total: 0
|
|
47
48
|
};
|
|
@@ -79,5 +80,5 @@ function I(o) {
|
|
|
79
80
|
}];
|
|
80
81
|
}
|
|
81
82
|
export {
|
|
82
|
-
|
|
83
|
+
O as usePageListApTable
|
|
83
84
|
};
|