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