@aplus-frontend/ui 0.5.0-beta.1 → 0.5.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.
- package/es/src/ap-form/hooks/use-watch.d.ts +4 -1
- package/es/src/ap-form/hooks/use-watch.mjs +31 -29
- package/es/src/ap-form/index.mjs +1 -1
- package/es/src/ap-form/search-form/index.vue.mjs +14 -15
- package/es/src/ap-grid/index.vue.mjs +191 -166
- package/es/src/ap-grid/interface.d.ts +0 -1
- package/es/src/ap-grid/utils/table.mjs +12 -12
- package/es/src/ap-modal/enums/modalMessage.d.ts +6 -0
- package/es/src/ap-modal/enums/modalMessage.mjs +4 -0
- package/es/src/ap-modal/index.d.ts +2 -1
- package/es/src/ap-modal/index.mjs +2 -0
- package/es/src/ap-modal/interface.d.ts +126 -1
- package/es/src/ap-modal/utils/createModalStream.d.ts +2 -0
- package/es/src/ap-modal/utils/createModalStream.mjs +99 -0
- package/es/src/ap-modal/utils/index.d.ts +1 -0
- package/es/src/ap-modal/utils/index.mjs +4 -2
- package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +4 -7
- package/es/src/ap-table/utils.d.ts +1 -4
- package/es/src/ap-table/utils.mjs +43 -41
- package/es/src/business/ap-attachment/ApAttachment.mjs +13 -13
- package/es/src/business/ap-batch-action-group/MenuItemGroup.vue2.mjs +13 -13
- package/lib/src/ap-form/hooks/use-watch.d.ts +4 -1
- package/lib/src/ap-form/hooks/use-watch.js +1 -1
- package/lib/src/ap-form/index.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +0 -1
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-modal/enums/modalMessage.d.ts +6 -0
- package/lib/src/ap-modal/enums/modalMessage.js +1 -0
- package/lib/src/ap-modal/index.d.ts +2 -1
- package/lib/src/ap-modal/index.js +1 -1
- package/lib/src/ap-modal/interface.d.ts +126 -1
- package/lib/src/ap-modal/utils/createModalStream.d.ts +2 -0
- package/lib/src/ap-modal/utils/createModalStream.js +1 -0
- package/lib/src/ap-modal/utils/index.d.ts +1 -0
- package/lib/src/ap-modal/utils/index.js +1 -1
- package/lib/src/ap-table/components/dynamic-component/index.vue2.js +1 -1
- package/lib/src/ap-table/utils.d.ts +1 -4
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-batch-action-group/MenuItemGroup.vue2.js +1 -1
- package/package.json +4 -4
- package/theme/ap-grid/index.css +31 -0
- package/theme/ap-grid/index.less +41 -0
- package/theme/index.css +31 -0
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ve, getCurrentInstance as Se, useSlots as we, ref as b, computed as n, unref as a, watchEffect as be, watch as H, createElementBlock as R, openBlock as s, normalizeClass as f, createCommentVNode as h, createElementVNode as x, normalizeStyle as q, createVNode as Re, mergeProps as m, createSlots as U, withCtx as C, Fragment as M, renderList as E, createBlock as c, resolveDynamicComponent as N, renderSlot as z, normalizeProps as xe, guardReactiveProps as ke } from "vue";
|
|
2
2
|
import { VxeTable as Fe, VxeColumn as G } from "vxe-table";
|
|
3
|
-
import
|
|
3
|
+
import Be from "vxe-pc-ui";
|
|
4
4
|
import "vxe-table/lib/style.css";
|
|
5
5
|
import "vxe-pc-ui/lib/style.css";
|
|
6
|
-
import { isUndefined as
|
|
7
|
-
import { ApForm as
|
|
6
|
+
import { isUndefined as k, omit as Ie } from "lodash-unified";
|
|
7
|
+
import { ApForm as Pe } from "../ap-form/index.mjs";
|
|
8
8
|
import "../config-provider/index.mjs";
|
|
9
|
-
import { noRenderAsFormItemValueList as
|
|
10
|
-
import { getColumnOrder as X, updateFormProps as
|
|
9
|
+
import { noRenderAsFormItemValueList as Ee } from "../ap-table/constants.mjs";
|
|
10
|
+
import { getColumnOrder as X, updateFormProps as Ne, getFieldProps as ze, getSearchFormItemRenderNode as _e, recursionApColumns as J } from "../ap-table/utils.mjs";
|
|
11
11
|
import { useTablePaging as Te } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
12
12
|
import { Pagination as Ve } from "@aplus-frontend/antdv";
|
|
13
|
-
import { useInnerParams as
|
|
14
|
-
import { toVxeProps as
|
|
15
|
-
import
|
|
16
|
-
import { useProvideApTable as
|
|
13
|
+
import { useInnerParams as Ae } from "./hooks/use-inner-params.mjs";
|
|
14
|
+
import { toVxeProps as Oe, getRowExpandProps as Le, getRowSelectionProps as De } from "./utils/table.mjs";
|
|
15
|
+
import Ke from "../ap-table/hooks/use-table-row-selection.mjs";
|
|
16
|
+
import { useProvideApTable as $e } from "../ap-table/context.mjs";
|
|
17
17
|
import { sizeReverseMap as je, sizeMap as We } from "./constants.mjs";
|
|
18
|
-
import { useRenderColumns as
|
|
19
|
-
import { useToken as
|
|
18
|
+
import { useRenderColumns as He } from "./hooks/use-render-columns.mjs";
|
|
19
|
+
import { useToken as qe } from "@aplus-frontend/antdv/es/theme/internal";
|
|
20
|
+
import "../scroll-bar/index.mjs";
|
|
20
21
|
import { useNamespace as Ue } from "../config-provider/hooks/use-namespace.mjs";
|
|
21
|
-
import { useGlobalConfig as
|
|
22
|
-
|
|
22
|
+
import { useGlobalConfig as Me } from "../config-provider/hooks/use-global-config.mjs";
|
|
23
|
+
import Ge from "../scroll-bar/index.vue.mjs";
|
|
24
|
+
const va = /* @__PURE__ */ ve({
|
|
23
25
|
name: "ApGrid",
|
|
24
26
|
__name: "index",
|
|
25
27
|
props: {
|
|
@@ -58,7 +60,7 @@ const ga = /* @__PURE__ */ ye({
|
|
|
58
60
|
expandedRowClassName: {},
|
|
59
61
|
childrenColumnName: { default: "children" },
|
|
60
62
|
rowExpandable: {},
|
|
61
|
-
sticky: { type: [Boolean, Object] },
|
|
63
|
+
sticky: { type: [Boolean, Object], default: !1 },
|
|
62
64
|
transformCellText: {},
|
|
63
65
|
rowClassName: {},
|
|
64
66
|
stripe: { type: Boolean },
|
|
@@ -103,254 +105,277 @@ const ga = /* @__PURE__ */ ye({
|
|
|
103
105
|
},
|
|
104
106
|
setup(Q, { expose: Y }) {
|
|
105
107
|
var W;
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
const
|
|
108
|
+
const y = (W = Se()) == null ? void 0 : W.appContext.app;
|
|
109
|
+
y && !y.__VXE_PC_UI_INSTALLED__ && (y.use(Be), y.__VXE_PC_UI_INSTALLED__ = !0);
|
|
110
|
+
const _ = we(), o = Q, { e: F, b: i, be: Z } = Ue("ap-grid"), ee = Me("valueTypeMap"), d = b([]), T = b([]), p = b(), B = b(o.size), [, ae] = qe(), { renderConfig: oe, updateSignal: re } = He(d);
|
|
109
111
|
let V = 0;
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
)
|
|
122
|
-
|
|
112
|
+
const te = n(() => {
|
|
113
|
+
if (p.value)
|
|
114
|
+
return p.value.$el.querySelector(
|
|
115
|
+
".vxe-table--header-inner-wrapper"
|
|
116
|
+
);
|
|
117
|
+
}), A = n(() => {
|
|
118
|
+
var e, l, t;
|
|
119
|
+
return V++, ((t = (l = (e = o.columns) == null ? void 0 : e.filter(
|
|
120
|
+
(r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !Ee.includes(r.valueType)
|
|
121
|
+
)) == null ? void 0 : l.sort((r, u) => {
|
|
122
|
+
let g = X(r.order);
|
|
123
|
+
return X(u.order) - g;
|
|
124
|
+
})) == null ? void 0 : t.map((r) => {
|
|
125
|
+
const u = Ne(
|
|
126
|
+
r,
|
|
127
|
+
ze(r.fieldProps, {})
|
|
128
|
+
), g = {
|
|
129
|
+
...r,
|
|
123
130
|
fieldProps: {
|
|
124
|
-
label:
|
|
125
|
-
name:
|
|
126
|
-
...
|
|
131
|
+
label: r.title,
|
|
132
|
+
name: r.dataIndex,
|
|
133
|
+
...u || {},
|
|
127
134
|
_signal: V
|
|
128
135
|
},
|
|
129
136
|
renderNode: void 0
|
|
130
137
|
};
|
|
131
|
-
return
|
|
132
|
-
|
|
138
|
+
return g.renderNode = _e(
|
|
139
|
+
g,
|
|
133
140
|
a(ee)
|
|
134
|
-
),
|
|
141
|
+
), g;
|
|
135
142
|
})) || [];
|
|
136
|
-
}),
|
|
143
|
+
}), le = n(() => [
|
|
144
|
+
i(),
|
|
145
|
+
o.card ? null : i("wrapper"),
|
|
146
|
+
o.adaptive ? i("adaptive") : null,
|
|
147
|
+
o.sticky ? i("sticky") : null
|
|
148
|
+
].filter(Boolean)), O = n(() => J(a(d), (e) => {
|
|
137
149
|
if (e.sorter === !0)
|
|
138
150
|
return e.key || e.dataIndex;
|
|
139
|
-
}).filter(Boolean)),
|
|
151
|
+
}).filter(Boolean)), L = n(() => J(a(d), (e) => {
|
|
140
152
|
if (e.filters && !e.onFilter)
|
|
141
153
|
return e.key || e.dataIndex;
|
|
142
154
|
}).filter(Boolean)), {
|
|
143
|
-
formRef:
|
|
144
|
-
submit:
|
|
145
|
-
reset:
|
|
146
|
-
refresh:
|
|
147
|
-
data:
|
|
148
|
-
tableProps:
|
|
149
|
-
setDataSource:
|
|
150
|
-
handleTableChange:
|
|
155
|
+
formRef: I,
|
|
156
|
+
submit: D,
|
|
157
|
+
reset: K,
|
|
158
|
+
refresh: ne,
|
|
159
|
+
data: v,
|
|
160
|
+
tableProps: se,
|
|
161
|
+
setDataSource: de,
|
|
162
|
+
handleTableChange: ie
|
|
151
163
|
} = Te({
|
|
152
164
|
async request(e) {
|
|
153
|
-
var
|
|
154
|
-
if (!
|
|
155
|
-
const
|
|
165
|
+
var t;
|
|
166
|
+
if (!w.value.preserveSelectedRowKeys && k(o.dataSource) && P(), !k(o.dataSource)) {
|
|
167
|
+
const r = e.pageSize * (e.current - 1);
|
|
156
168
|
return {
|
|
157
|
-
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(
|
|
169
|
+
data: (o.pagination === !1 ? o.dataSource : o.dataSource.slice(r, r + e.pageSize)) || [],
|
|
158
170
|
total: o.dataSource.length || 0
|
|
159
171
|
};
|
|
160
172
|
}
|
|
161
|
-
const l = await ((
|
|
173
|
+
const l = await ((t = o.request) == null ? void 0 : t.call(o, e));
|
|
162
174
|
return {
|
|
163
175
|
data: (l == null ? void 0 : l.data) || [],
|
|
164
176
|
total: (l == null ? void 0 : l.total) || 0
|
|
165
177
|
};
|
|
166
178
|
},
|
|
167
179
|
namespace: "ap-grid",
|
|
168
|
-
filterFields:
|
|
169
|
-
sortFields:
|
|
180
|
+
filterFields: L,
|
|
181
|
+
sortFields: O,
|
|
170
182
|
defaultParams: o.params,
|
|
171
183
|
defaultData: o.defaultData,
|
|
172
184
|
manual: o.manual,
|
|
173
185
|
formatParams: o.beforeSearchSubmit,
|
|
174
186
|
pagination: o.pagination
|
|
175
|
-
}), { sortChangeEvent:
|
|
176
|
-
|
|
187
|
+
}), { sortChangeEvent: ue, filterChangeEvent: ce, paginationChangeEvent: pe } = Ae(ie);
|
|
188
|
+
$e({
|
|
177
189
|
columns: n(() => d.value),
|
|
178
190
|
columnsBackup: n(() => T.value),
|
|
179
|
-
size: n(() => We[
|
|
191
|
+
size: n(() => We[B.value]),
|
|
180
192
|
updateColumns(e) {
|
|
181
193
|
d.value = e;
|
|
182
194
|
},
|
|
183
195
|
updateSize(e) {
|
|
184
|
-
|
|
196
|
+
B.value = je[e];
|
|
185
197
|
},
|
|
186
198
|
renderConfig: n(() => ({
|
|
187
199
|
className: Z("table-header", "title"),
|
|
188
200
|
color: ae.value.colorPrimary
|
|
189
201
|
}))
|
|
190
202
|
});
|
|
191
|
-
const
|
|
203
|
+
const $ = n(
|
|
192
204
|
() => d.value.some(
|
|
193
205
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
194
206
|
) ? "left" : void 0
|
|
195
|
-
),
|
|
196
|
-
() =>
|
|
197
|
-
), { selectedRows:
|
|
207
|
+
), fe = n(
|
|
208
|
+
() => k(o.dataSource) ? v.records : o.dataSource
|
|
209
|
+
), { selectedRows: S, rowSelection: w, ...me } = Ke({
|
|
198
210
|
...o.rowSelection === !0 ? {} : o.rowSelection,
|
|
199
|
-
dataSource:
|
|
211
|
+
dataSource: fe,
|
|
200
212
|
rowKey: o.rowKey
|
|
201
213
|
}), j = () => {
|
|
202
|
-
const e =
|
|
203
|
-
e && (
|
|
214
|
+
const e = p.value;
|
|
215
|
+
e && (S.value = [
|
|
204
216
|
...e.getCheckboxReserveRecords(),
|
|
205
217
|
...e.getCheckboxRecords()
|
|
206
218
|
]);
|
|
207
|
-
},
|
|
208
|
-
const e =
|
|
209
|
-
e && (
|
|
219
|
+
}, ge = () => {
|
|
220
|
+
const e = p.value;
|
|
221
|
+
e && (S.value = [e.getRadioRecord()]);
|
|
210
222
|
};
|
|
211
|
-
function
|
|
223
|
+
function he() {
|
|
212
224
|
var e;
|
|
213
225
|
return ((e = o.columns) == null ? void 0 : e.filter((l) => !l.hideInTable)) || [];
|
|
214
226
|
}
|
|
215
|
-
function
|
|
216
|
-
var l,
|
|
217
|
-
(
|
|
227
|
+
function Ce(e) {
|
|
228
|
+
var l, t, r;
|
|
229
|
+
(r = (t = (l = I.value) == null ? void 0 : l.apForm) == null ? void 0 : t.setFieldsValue) == null || r.call(t, e);
|
|
218
230
|
}
|
|
219
|
-
function
|
|
220
|
-
var
|
|
231
|
+
function ye(e = !1) {
|
|
232
|
+
var t, r, u;
|
|
221
233
|
const l = e ? "getFieldsValueTransformed" : "getFieldsValue";
|
|
222
|
-
return (
|
|
234
|
+
return (u = (r = (t = I.value) == null ? void 0 : t.apForm) == null ? void 0 : r[l]) == null ? void 0 : u.call(r, !0);
|
|
223
235
|
}
|
|
224
|
-
function
|
|
225
|
-
|
|
226
|
-
const e =
|
|
227
|
-
e && (
|
|
236
|
+
function P() {
|
|
237
|
+
me.clearAll();
|
|
238
|
+
const e = p.value;
|
|
239
|
+
e && (w.value.type === "radio" ? (e.clearRadioRow(), e.clearRadioReserve()) : (e.clearCheckboxRow(), e.clearCheckboxReserve()));
|
|
228
240
|
}
|
|
229
|
-
return
|
|
230
|
-
const e =
|
|
241
|
+
return be(() => {
|
|
242
|
+
const e = he();
|
|
231
243
|
d.value = e, T.value = e;
|
|
232
|
-
}),
|
|
244
|
+
}), H(
|
|
233
245
|
() => o.dataSource,
|
|
234
246
|
(e) => {
|
|
235
|
-
|
|
247
|
+
de(e);
|
|
236
248
|
},
|
|
237
249
|
{ immediate: !0 }
|
|
238
|
-
),
|
|
239
|
-
() => a(
|
|
250
|
+
), H(
|
|
251
|
+
() => a(v).loading,
|
|
240
252
|
(e) => {
|
|
241
253
|
var l;
|
|
242
254
|
(l = o.onLoadingChange) == null || l.call(o, e);
|
|
243
255
|
}
|
|
244
256
|
), Y({
|
|
245
|
-
submit:
|
|
246
|
-
reset:
|
|
247
|
-
refresh:
|
|
248
|
-
setSearchFormValues:
|
|
249
|
-
getSearchFormValues:
|
|
257
|
+
submit: D,
|
|
258
|
+
reset: K,
|
|
259
|
+
refresh: ne,
|
|
260
|
+
setSearchFormValues: Ce,
|
|
261
|
+
getSearchFormValues: ye,
|
|
250
262
|
getShowColumns: () => a(d),
|
|
251
263
|
rowSelection: {
|
|
252
|
-
selectedRows: n(() =>
|
|
253
|
-
clearAll:
|
|
264
|
+
selectedRows: n(() => S.value),
|
|
265
|
+
clearAll: P
|
|
254
266
|
}
|
|
255
|
-
}), (e, l) => (s(),
|
|
256
|
-
class:
|
|
267
|
+
}), (e, l) => (s(), R("div", {
|
|
268
|
+
class: f(le.value)
|
|
257
269
|
}, [
|
|
258
|
-
a(
|
|
270
|
+
a(k)(e.dataSource) && e.searchForm !== !1 && A.value.length > 0 ? (s(), R("div", {
|
|
259
271
|
key: 0,
|
|
260
|
-
class:
|
|
261
|
-
style:
|
|
272
|
+
class: f(e.card ? a(F)("search-wrapper") : null),
|
|
273
|
+
style: q(e.searchFormWrapperStyle)
|
|
262
274
|
}, [
|
|
263
|
-
|
|
275
|
+
Re(a(Pe).SearchForm, m(e.searchForm || {}, {
|
|
264
276
|
ref_key: "formRef",
|
|
265
|
-
ref:
|
|
277
|
+
ref: I,
|
|
266
278
|
"custom-reset": "",
|
|
267
279
|
"submit-loading": !1,
|
|
268
|
-
onSubmit: a(
|
|
269
|
-
onReset: a(
|
|
270
|
-
}),
|
|
271
|
-
default:
|
|
272
|
-
(s(!0),
|
|
273
|
-
key:
|
|
274
|
-
item:
|
|
280
|
+
onSubmit: a(D),
|
|
281
|
+
onReset: a(K)
|
|
282
|
+
}), U({
|
|
283
|
+
default: C(() => [
|
|
284
|
+
(s(!0), R(M, null, E(A.value, (t) => (s(), c(N(t.renderNode.Comp), m({
|
|
285
|
+
key: t.dataIndex,
|
|
286
|
+
item: t,
|
|
275
287
|
ref_for: !0
|
|
276
|
-
},
|
|
277
|
-
span:
|
|
278
|
-
"custom-render":
|
|
288
|
+
}, t.fieldProps || {}, {
|
|
289
|
+
span: t.span,
|
|
290
|
+
"custom-render": t.renderNode.render
|
|
279
291
|
}), null, 16, ["item", "span", "custom-render"]))), 128))
|
|
280
292
|
]),
|
|
281
293
|
_: 2
|
|
282
294
|
}, [
|
|
283
|
-
|
|
295
|
+
_.searchFormExtra ? {
|
|
284
296
|
name: "extra",
|
|
285
|
-
fn:
|
|
286
|
-
|
|
297
|
+
fn: C(() => [
|
|
298
|
+
z(e.$slots, "searchFormExtra")
|
|
287
299
|
]),
|
|
288
300
|
key: "0"
|
|
289
301
|
} : void 0
|
|
290
302
|
]), 1040, ["onSubmit", "onReset"])
|
|
291
|
-
], 6)) :
|
|
292
|
-
|
|
293
|
-
class:
|
|
294
|
-
style:
|
|
303
|
+
], 6)) : h("", !0),
|
|
304
|
+
x("div", {
|
|
305
|
+
class: f([a(F)("table-wrapper"), e.card ? a(F)("table-wrapper-card") : null]),
|
|
306
|
+
style: q(e.tableWrapperStyle)
|
|
295
307
|
}, [
|
|
296
|
-
|
|
297
|
-
class:
|
|
308
|
+
x("div", {
|
|
309
|
+
class: f(a(i)("header-wrapper"))
|
|
298
310
|
}, [
|
|
299
|
-
|
|
300
|
-
selectedRows: a(
|
|
301
|
-
selectedRowKeys: a(
|
|
311
|
+
z(e.$slots, "title", {
|
|
312
|
+
selectedRows: a(S),
|
|
313
|
+
selectedRowKeys: a(w).selectedRowKeys,
|
|
302
314
|
shownColumns: d.value,
|
|
303
|
-
clearAll:
|
|
315
|
+
clearAll: P
|
|
304
316
|
})
|
|
305
317
|
], 2),
|
|
306
|
-
(
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
318
|
+
x("div", {
|
|
319
|
+
class: f(a(i)("vxe-wrapper"))
|
|
320
|
+
}, [
|
|
321
|
+
(s(), c(a(Fe), m(a(Oe)(o), {
|
|
322
|
+
ref_key: "tableRef",
|
|
323
|
+
ref: p,
|
|
324
|
+
key: a(re),
|
|
325
|
+
data: a(v).records,
|
|
326
|
+
"sort-config": { remote: O.value.length > 0 },
|
|
327
|
+
"filter-config": { remote: L.value.length > 0 },
|
|
328
|
+
loading: a(v).loading,
|
|
329
|
+
"row-config": {
|
|
330
|
+
isHover: !0,
|
|
331
|
+
keyField: o.rowKey
|
|
332
|
+
},
|
|
333
|
+
size: B.value,
|
|
334
|
+
onSortChange: a(ue),
|
|
335
|
+
onFilterChange: a(ce),
|
|
336
|
+
onCheckboxChange: j,
|
|
337
|
+
onCheckboxAll: j,
|
|
338
|
+
onRadioChange: ge
|
|
339
|
+
}), U({
|
|
340
|
+
default: C(() => [
|
|
341
|
+
o.expandable ? (s(), c(a(G), m({ key: 0 }, a(Le)(e.expandable), { fixed: $.value }), {
|
|
342
|
+
content: C((t) => [
|
|
343
|
+
(s(), c(N(o.expandable.renderContent(t))))
|
|
344
|
+
]),
|
|
345
|
+
_: 1
|
|
346
|
+
}, 16, ["fixed"])) : h("", !0),
|
|
347
|
+
o.rowSelection ? (s(), c(a(G), m({ key: 1 }, a(De)(a(w)), { fixed: $.value }), null, 16, ["fixed"])) : h("", !0),
|
|
348
|
+
(s(!0), R(M, null, E(a(oe), (t) => (s(), c(N(t), {
|
|
349
|
+
key: t.props.colId
|
|
350
|
+
}))), 128))
|
|
351
|
+
]),
|
|
352
|
+
_: 2
|
|
353
|
+
}, [
|
|
354
|
+
E(a(Ie)(_, ["searchFormExtra"]), (t, r) => ({
|
|
355
|
+
name: r,
|
|
356
|
+
fn: C((u) => [
|
|
357
|
+
z(e.$slots, r, xe(ke(u || {})))
|
|
358
|
+
])
|
|
359
|
+
}))
|
|
360
|
+
]), 1040, ["data", "sort-config", "filter-config", "loading", "row-config", "size", "onSortChange", "onFilterChange"]))
|
|
361
|
+
], 2),
|
|
362
|
+
x("div", {
|
|
363
|
+
class: f(a(i)("pagination-wrapper"))
|
|
338
364
|
}, [
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}, a(ne).pagination, { onChange: a(ce) }), null, 16, ["class", "onChange"])) : R("", !0)
|
|
365
|
+
e.sticky ? (s(), c(a(Ge), {
|
|
366
|
+
key: 0,
|
|
367
|
+
direction: "horizontal",
|
|
368
|
+
"scroll-container": te.value
|
|
369
|
+
}, null, 8, ["scroll-container"])) : h("", !0),
|
|
370
|
+
e.pagination !== !1 ? (s(), c(a(Ve), m({
|
|
371
|
+
key: 1,
|
|
372
|
+
class: a(i)("pagination")
|
|
373
|
+
}, a(se).pagination, { onChange: a(pe) }), null, 16, ["class", "onChange"])) : h("", !0)
|
|
374
|
+
], 2)
|
|
350
375
|
], 6)
|
|
351
376
|
], 2));
|
|
352
377
|
}
|
|
353
378
|
});
|
|
354
379
|
export {
|
|
355
|
-
|
|
380
|
+
va as default
|
|
356
381
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { omit as u, isUndefined as d, isFunction as c, isNumber as f } from "lodash-unified";
|
|
2
2
|
const h = 30, b = 50;
|
|
3
|
-
function
|
|
3
|
+
function R(e) {
|
|
4
4
|
var i, l, n;
|
|
5
5
|
const t = {
|
|
6
|
-
...e
|
|
6
|
+
...u(e, ["columns", "request", "searchForm", "dataSource"])
|
|
7
7
|
};
|
|
8
|
-
if (e.columnResizable && (t.columnConfig ? t.columnConfig.resizable = !0 : t.columnConfig = {
|
|
8
|
+
if (e.adaptive && (t.autoResize = !0, t.height = "100%"), e.columnResizable && (t.columnConfig ? t.columnConfig.resizable = !0 : t.columnConfig = {
|
|
9
9
|
resizable: !0
|
|
10
10
|
}), e.rowSelection) {
|
|
11
11
|
const o = e.rowSelection === !0 ? {} : e.rowSelection;
|
|
@@ -25,7 +25,7 @@ function y(e) {
|
|
|
25
25
|
reserve: d(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
return t.border = e.bordered, e.expandable && (t.expandConfig =
|
|
28
|
+
return t.border = e.bordered, e.expandable && (t.expandConfig = u(e.expandable, [
|
|
29
29
|
"renderContent",
|
|
30
30
|
"width",
|
|
31
31
|
"title"
|
|
@@ -33,23 +33,23 @@ function y(e) {
|
|
|
33
33
|
enabled: !1
|
|
34
34
|
}, t.virtualYConfig = {
|
|
35
35
|
enabled: !1
|
|
36
|
-
}) : (
|
|
36
|
+
}) : (a(t, "X", (l = e.virtual) == null ? void 0 : l.x), a(t, "Y", (n = e.virtual) == null ? void 0 : n.y)), t;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function a(e, t, i) {
|
|
39
39
|
const l = t === "X", n = l ? "virtualXConfig" : "virtualYConfig", o = i !== !1, r = l ? h : b, s = f(i) && i >= 0 ? i : r;
|
|
40
40
|
e[n] = {
|
|
41
41
|
enabled: o,
|
|
42
42
|
gt: s
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function v(e) {
|
|
46
46
|
const t = e === !0 || !e.type ? "checkbox" : e.type, i = e === !0 ? 60 : e.columnWidth || 60;
|
|
47
47
|
return {
|
|
48
48
|
type: t,
|
|
49
49
|
width: i
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function y(e) {
|
|
53
53
|
const t = (e == null ? void 0 : e.width) || "auto";
|
|
54
54
|
return {
|
|
55
55
|
type: "expand",
|
|
@@ -58,7 +58,7 @@ function R(e) {
|
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
y as getRowExpandProps,
|
|
62
|
+
v as getRowSelectionProps,
|
|
63
|
+
R as toVxeProps
|
|
64
64
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Modal as _Modal } from '@aplus-frontend/antdv';
|
|
2
|
-
import { CreateModalFunc } from './interface';
|
|
2
|
+
import { CreateModalFunc, CreateModalStreamFunc } from './interface';
|
|
3
3
|
export * from './interface';
|
|
4
4
|
type ApModalMixedProps = typeof _Modal & {
|
|
5
5
|
createModal: CreateModalFunc;
|
|
6
|
+
createModalStream: CreateModalStreamFunc;
|
|
6
7
|
};
|
|
7
8
|
declare const ApModal: ApModalMixedProps;
|
|
8
9
|
export { ApModal };
|
|
@@ -2,8 +2,10 @@ import { Modal as r } from "@aplus-frontend/antdv";
|
|
|
2
2
|
import "./utils/index.mjs";
|
|
3
3
|
import "./interface.mjs";
|
|
4
4
|
import { createModal as a } from "./utils/createModal.mjs";
|
|
5
|
+
import { createModalStream as t } from "./utils/createModalStream.mjs";
|
|
5
6
|
const o = r;
|
|
6
7
|
o.createModal = a;
|
|
8
|
+
o.createModalStream = t;
|
|
7
9
|
o.name = "ApModal";
|
|
8
10
|
export {
|
|
9
11
|
o as ApModal
|