@aplus-frontend/ui 0.0.17 → 0.0.19
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/index.mjs +18 -14
- package/es/src/ap-field/date/helper.d.ts +7 -0
- package/es/src/ap-field/date/helper.mjs +17 -7
- package/es/src/ap-field/date/index.vue.d.ts +3 -1
- package/es/src/ap-field/date/index.vue.mjs +46 -39
- package/es/src/ap-field/date-range/index.vue.d.ts +3 -3
- package/es/src/ap-field/date-range/index.vue.mjs +64 -62
- package/es/src/ap-field/interface.d.ts +10 -1
- package/es/src/ap-form/ap-form-item.vue.mjs +61 -57
- package/es/src/ap-form/search-form/index.vue.mjs +1 -1
- package/es/src/ap-form/style/ap-form-item.css +11 -0
- package/es/src/ap-modal/index.d.ts +9 -0
- package/es/src/ap-modal/index.mjs +10 -0
- package/es/src/ap-modal/type.d.ts +13 -0
- package/es/src/ap-modal/type.mjs +1 -0
- package/es/src/ap-modal/utils/createModal.d.ts +3 -0
- package/es/src/ap-modal/utils/createModal.mjs +74 -0
- package/es/src/ap-modal/utils/index.d.ts +1 -0
- package/es/src/ap-modal/utils/index.mjs +4 -0
- package/es/src/ap-table/ap-table.vue.mjs +151 -141
- package/es/src/ap-table/constants.d.ts +41 -15
- package/es/src/ap-table/interface.d.ts +22 -4
- package/es/src/ap-table/style/ap-table.css +1 -0
- package/es/src/ap-table/utils.d.ts +6831 -845
- package/es/src/business/ap-label/ApLabel.vue.d.ts +38 -0
- package/es/src/business/ap-label/ApLabel.vue.mjs +4 -0
- package/es/src/business/ap-label/ApLabel.vue2.mjs +52 -0
- package/es/src/business/ap-label/index.d.ts +4 -0
- package/es/src/business/ap-label/interface.d.ts +8 -0
- package/es/src/business/ap-label/style.css +4 -0
- package/es/src/business/expandAlert/ApExpandAlert.vue.d.ts +81 -0
- package/es/src/business/expandAlert/ApExpandAlert.vue.mjs +4 -0
- package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +113 -0
- package/es/src/business/expandAlert/interface.d.ts +26 -0
- package/es/src/business/expandAlert/style.css +42 -0
- package/es/src/business/index.d.ts +416 -1
- package/es/src/business/index.mjs +10 -4
- package/es/src/editable-table/interface.d.ts +1 -1
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +192 -188
- package/es/src/theme/ap-expand-alert/ap-expand-alert.css +42 -0
- package/es/src/theme/ap-form/ap-form-item.css +11 -0
- package/es/src/theme/ap-label/ap-label.css +4 -0
- package/es/src/theme/ap-table/ap-table.css +1 -0
- package/es/src/type.d.ts +3 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/date/helper.d.ts +7 -0
- package/lib/src/ap-field/date/helper.js +1 -1
- package/lib/src/ap-field/date/index.vue.d.ts +3 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +3 -3
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +10 -1
- package/lib/src/ap-form/ap-form-item.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-form/style/ap-form-item.css +11 -0
- package/lib/src/ap-modal/index.d.ts +9 -0
- package/lib/src/ap-modal/index.js +1 -0
- package/lib/src/ap-modal/type.d.ts +13 -0
- package/lib/src/ap-modal/type.js +1 -0
- package/lib/src/ap-modal/utils/createModal.d.ts +3 -0
- package/lib/src/ap-modal/utils/createModal.js +1 -0
- package/lib/src/ap-modal/utils/index.d.ts +1 -0
- package/lib/src/ap-modal/utils/index.js +1 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +41 -15
- package/lib/src/ap-table/interface.d.ts +22 -4
- package/lib/src/ap-table/style/ap-table.css +1 -0
- package/lib/src/ap-table/utils.d.ts +6831 -845
- package/lib/src/business/ap-label/ApLabel.vue.d.ts +38 -0
- package/lib/src/business/ap-label/ApLabel.vue.js +1 -0
- package/lib/src/business/ap-label/ApLabel.vue2.js +1 -0
- package/lib/src/business/ap-label/index.d.ts +4 -0
- package/lib/src/business/ap-label/interface.d.ts +8 -0
- package/lib/src/business/ap-label/style.css +4 -0
- package/lib/src/business/expandAlert/ApExpandAlert.vue.d.ts +81 -0
- package/lib/src/business/expandAlert/ApExpandAlert.vue.js +1 -0
- package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -0
- package/lib/src/business/expandAlert/interface.d.ts +26 -0
- package/lib/src/business/expandAlert/style.css +42 -0
- package/lib/src/business/index.d.ts +416 -1
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/interface.d.ts +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/theme/ap-expand-alert/ap-expand-alert.css +42 -0
- package/lib/src/theme/ap-form/ap-form-item.css +11 -0
- package/lib/src/theme/ap-label/ap-label.css +4 -0
- package/lib/src/theme/ap-table/ap-table.css +1 -0
- package/lib/src/type.d.ts +3 -1
- package/package.json +3 -3
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { useToken as
|
|
4
|
-
import { ApForm as
|
|
5
|
-
import { apTableRenderItemMap as
|
|
1
|
+
import { defineComponent as Z, useSlots as ee, computed as d, createVNode as s, mergeProps as m, unref as r, watch as ae, openBlock as i, createElementBlock as f, normalizeClass as F, normalizeStyle as x, createSlots as E, withCtx as p, Fragment as te, renderList as O, createBlock as oe, resolveDynamicComponent as re, renderSlot as R, createCommentVNode as L, createElementVNode as z, toDisplayString as ne, normalizeProps as le, guardReactiveProps as de } from "vue";
|
|
2
|
+
import { Typography as se, Table as ue, Tooltip as ie } from "ant-design-vue";
|
|
3
|
+
import { useToken as pe } from "ant-design-vue/es/theme/internal";
|
|
4
|
+
import { ApForm as ce } from "../ap-form/index.mjs";
|
|
5
|
+
import { apTableRenderItemMap as me, noRenderAsFormItemValueList as N, apTableFormItemMap as fe } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
|
-
import { useTablePaging as
|
|
8
|
-
import { isUndefined as
|
|
7
|
+
import { useTablePaging as ge } from "./hooks/use-table-paging.mjs";
|
|
8
|
+
import { isUndefined as T, omit as ye } from "lodash-unified";
|
|
9
9
|
import "./style/ap-table.css";
|
|
10
10
|
import { QuestionCircleOutlined as he } from "@ant-design/icons-vue";
|
|
11
|
-
import { apColumnToColumn as be, getTableRenderType as Ce, getTableRenderProps as
|
|
12
|
-
import
|
|
13
|
-
import { useLocale as
|
|
11
|
+
import { apColumnToColumn as be, getTableRenderType as Ce, getTableRenderProps as Se, getColumnOrder as V, updateFormProps as Fe, getFieldProps as xe, getPlaceholder as Re } from "./utils.mjs";
|
|
12
|
+
import Te from "./hooks/use-table-content-height.mjs";
|
|
13
|
+
import { useLocale as we } from "../config-provider/hooks/use-locale.mjs";
|
|
14
14
|
import { useNamespace as Be } from "../config-provider/hooks/use-namespace.mjs";
|
|
15
|
-
import { useGlobalConfig as
|
|
16
|
-
const
|
|
15
|
+
import { useGlobalConfig as Pe } from "../config-provider/hooks/use-global-config.mjs";
|
|
16
|
+
const ve = {
|
|
17
17
|
key: 0
|
|
18
|
-
}, He = /* @__PURE__ */
|
|
18
|
+
}, He = /* @__PURE__ */ Z({
|
|
19
19
|
name: "ApTable",
|
|
20
20
|
__name: "ap-table",
|
|
21
21
|
props: {
|
|
@@ -104,6 +104,7 @@ const Pe = {
|
|
|
104
104
|
request: {},
|
|
105
105
|
onLoad: {},
|
|
106
106
|
defaultData: {},
|
|
107
|
+
dataSource: {},
|
|
107
108
|
onLoadingChange: {},
|
|
108
109
|
searchForm: {
|
|
109
110
|
type: [Boolean, Object],
|
|
@@ -128,183 +129,192 @@ const Pe = {
|
|
|
128
129
|
default: !1
|
|
129
130
|
}
|
|
130
131
|
},
|
|
131
|
-
setup(
|
|
132
|
-
expose:
|
|
132
|
+
setup(D, {
|
|
133
|
+
expose: W
|
|
133
134
|
}) {
|
|
134
|
-
const
|
|
135
|
-
t:
|
|
136
|
-
} =
|
|
137
|
-
e:
|
|
135
|
+
const t = D, w = ee(), [, j] = pe(), {
|
|
136
|
+
t: _
|
|
137
|
+
} = we(), {
|
|
138
|
+
e: g,
|
|
138
139
|
b: u
|
|
139
|
-
} = Be("ap-table"),
|
|
140
|
-
height:
|
|
141
|
-
contentRef:
|
|
142
|
-
} =
|
|
143
|
-
var
|
|
144
|
-
let e = ((
|
|
140
|
+
} = Be("ap-table"), A = Pe("uiMode", "aplus"), {
|
|
141
|
+
height: M,
|
|
142
|
+
contentRef: q
|
|
143
|
+
} = Te(), y = d(() => {
|
|
144
|
+
var o;
|
|
145
|
+
let e = ((o = t.columns) == null ? void 0 : o.filter((a) => !a.hideInTable)) || [];
|
|
145
146
|
return e = e.map((a) => ({
|
|
146
147
|
...be(a),
|
|
147
148
|
customRender({
|
|
148
|
-
value:
|
|
149
|
-
...
|
|
149
|
+
value: n,
|
|
150
|
+
...l
|
|
150
151
|
}) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
mode: "read"
|
|
165
|
-
}), null);
|
|
166
|
-
}
|
|
167
|
-
return G(a, o, i);
|
|
152
|
+
const C = Ce(a), k = me[C], Y = Se(a, {
|
|
153
|
+
value: n,
|
|
154
|
+
...l
|
|
155
|
+
});
|
|
156
|
+
let S = U(a, n, s(k, m(Y, {
|
|
157
|
+
mode: "read"
|
|
158
|
+
}), null));
|
|
159
|
+
return a.customRender && (S = a.customRender({
|
|
160
|
+
value: n,
|
|
161
|
+
...l,
|
|
162
|
+
column: a,
|
|
163
|
+
originalNode: S
|
|
164
|
+
})), S;
|
|
168
165
|
}
|
|
169
166
|
})), e;
|
|
170
|
-
}),
|
|
171
|
-
var e,
|
|
172
|
-
return ((a = (
|
|
173
|
-
let
|
|
174
|
-
return
|
|
175
|
-
})) == null ? void 0 : a.map((
|
|
176
|
-
const
|
|
167
|
+
}), B = d(() => {
|
|
168
|
+
var e, o, a;
|
|
169
|
+
return ((a = (o = (e = t.columns) == null ? void 0 : e.filter((n) => !n.hideInSearch && n.dataIndex && (n.valueType || n.customRenderFormItem) && !N.includes(n.valueType))) == null ? void 0 : o.sort((n, l) => {
|
|
170
|
+
let C = V(n.order);
|
|
171
|
+
return V(l.order) - C;
|
|
172
|
+
})) == null ? void 0 : a.map((n) => {
|
|
173
|
+
const l = Fe(n, xe(n.fieldProps, {}));
|
|
177
174
|
return {
|
|
178
|
-
...
|
|
175
|
+
...n,
|
|
179
176
|
fieldProps: {
|
|
180
|
-
label:
|
|
181
|
-
name:
|
|
182
|
-
...
|
|
177
|
+
label: n.title,
|
|
178
|
+
name: n.dataIndex,
|
|
179
|
+
...l || {},
|
|
183
180
|
// 格式化placeholder
|
|
184
|
-
placeholder:
|
|
181
|
+
placeholder: Re(_, n.valueType, l == null ? void 0 : l.placeholder)
|
|
185
182
|
}
|
|
186
183
|
};
|
|
187
184
|
})) || [];
|
|
188
|
-
}),
|
|
189
|
-
formRef:
|
|
190
|
-
submit:
|
|
191
|
-
reset:
|
|
192
|
-
tableProps:
|
|
193
|
-
handleTableChange:
|
|
194
|
-
data:
|
|
195
|
-
} =
|
|
185
|
+
}), H = d(() => r(y).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), K = d(() => r(y).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), {
|
|
186
|
+
formRef: h,
|
|
187
|
+
submit: P,
|
|
188
|
+
reset: v,
|
|
189
|
+
tableProps: c,
|
|
190
|
+
handleTableChange: $,
|
|
191
|
+
data: b
|
|
192
|
+
} = ge({
|
|
196
193
|
async request(e) {
|
|
197
|
-
var a,
|
|
198
|
-
const
|
|
199
|
-
return (
|
|
200
|
-
data: (
|
|
201
|
-
total: (
|
|
194
|
+
var a, n;
|
|
195
|
+
const o = await ((a = t.request) == null ? void 0 : a.call(t, e));
|
|
196
|
+
return (n = t.onLoad) == null || n.call(t, (o == null ? void 0 : o.data) || []), {
|
|
197
|
+
data: (o == null ? void 0 : o.data) || [],
|
|
198
|
+
total: (o == null ? void 0 : o.total) || 0
|
|
202
199
|
};
|
|
203
200
|
},
|
|
204
|
-
filterFields:
|
|
205
|
-
sortFields:
|
|
206
|
-
defaultParams:
|
|
207
|
-
defaultData:
|
|
208
|
-
manual:
|
|
209
|
-
defaultCurrent:
|
|
210
|
-
defaultPageSize:
|
|
211
|
-
formatParams:
|
|
212
|
-
}),
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
201
|
+
filterFields: r(K),
|
|
202
|
+
sortFields: r(H),
|
|
203
|
+
defaultParams: t.params,
|
|
204
|
+
defaultData: t.defaultData,
|
|
205
|
+
manual: t.manual,
|
|
206
|
+
defaultCurrent: t.pagination ? t.pagination.defaultCurrent : void 0,
|
|
207
|
+
defaultPageSize: t.pagination ? t.pagination.defaultPageSize : void 0,
|
|
208
|
+
formatParams: t.beforeSearchSubmit
|
|
209
|
+
}), I = d(() => {
|
|
210
|
+
var e;
|
|
211
|
+
return t.scroll ? t.scroll : t.adaptive && (b.value.total > 0 || (e = t.dataSource) != null && e.length) ? {
|
|
212
|
+
y: r(M),
|
|
213
|
+
x: "100%"
|
|
214
|
+
} : {
|
|
215
|
+
x: !0
|
|
216
|
+
};
|
|
217
|
+
}), G = d(() => {
|
|
218
|
+
const e = r(c);
|
|
219
|
+
console.log("xxx", r(I));
|
|
220
|
+
const o = T(t.dataSource) ? e : {
|
|
221
|
+
...e,
|
|
222
|
+
dataSource: t.dataSource,
|
|
223
|
+
onChange: t.onChange
|
|
224
|
+
};
|
|
225
|
+
return {
|
|
226
|
+
...t,
|
|
227
|
+
...o,
|
|
228
|
+
loading: T(t.loading) ? r(c).loading : t.loading,
|
|
229
|
+
pagination: t.pagination === !1 ? !1 : r(c).pagination,
|
|
230
|
+
scroll: r(I)
|
|
231
|
+
};
|
|
232
|
+
}), Q = d(() => [u(), t.card ? null : u("wrapper"), t.adaptive ? u("adaptive") : null].filter(Boolean));
|
|
233
|
+
function U(e, o, a) {
|
|
234
|
+
return N.includes(e.valueType) ? a : e.copyable || e.ellipsis ? s(se.Text, {
|
|
225
235
|
copyable: e.copyable ? {
|
|
226
|
-
text:
|
|
236
|
+
text: o,
|
|
227
237
|
tooltip: !1
|
|
228
238
|
} : !1,
|
|
229
239
|
ellipsis: e.ellipsis ? {
|
|
230
|
-
tooltip:
|
|
240
|
+
tooltip: o
|
|
231
241
|
} : !1,
|
|
232
242
|
content: a
|
|
233
243
|
}, null) : a;
|
|
234
244
|
}
|
|
235
|
-
|
|
236
|
-
var
|
|
237
|
-
(
|
|
245
|
+
ae(() => r(b).loading, (e) => {
|
|
246
|
+
var o;
|
|
247
|
+
(o = t.onLoadingChange) == null || o.call(t, e);
|
|
238
248
|
});
|
|
239
|
-
function
|
|
240
|
-
var
|
|
241
|
-
(
|
|
249
|
+
function J(e) {
|
|
250
|
+
var o, a, n;
|
|
251
|
+
(n = (a = (o = h.value) == null ? void 0 : o.apForm) == null ? void 0 : a.setFieldsValue) == null || n.call(a, e);
|
|
242
252
|
}
|
|
243
|
-
function
|
|
244
|
-
var e,
|
|
245
|
-
return (a = (
|
|
253
|
+
function X() {
|
|
254
|
+
var e, o, a;
|
|
255
|
+
return (a = (o = (e = h.value) == null ? void 0 : e.apForm) == null ? void 0 : o.getFieldsValue) == null ? void 0 : a.call(o, !0);
|
|
246
256
|
}
|
|
247
|
-
return
|
|
248
|
-
submit: () =>
|
|
249
|
-
reset: () =>
|
|
250
|
-
setSearchFormValues:
|
|
251
|
-
getSearchFormValues:
|
|
252
|
-
dataSource: d(() =>
|
|
253
|
-
}), (e,
|
|
254
|
-
class: F(
|
|
255
|
-
}, [e.searchForm !== !1 &&
|
|
257
|
+
return W({
|
|
258
|
+
submit: () => P(),
|
|
259
|
+
reset: () => v(),
|
|
260
|
+
setSearchFormValues: J,
|
|
261
|
+
getSearchFormValues: X,
|
|
262
|
+
dataSource: d(() => r(b).records)
|
|
263
|
+
}), (e, o) => (i(), f("div", {
|
|
264
|
+
class: F(Q.value)
|
|
265
|
+
}, [r(T)(e.dataSource) && e.searchForm !== !1 && B.value.length > 0 ? (i(), f("div", {
|
|
256
266
|
key: 0,
|
|
257
|
-
class: F(e.card ?
|
|
258
|
-
style:
|
|
259
|
-
}, [s(
|
|
267
|
+
class: F(e.card ? r(g)("search-wrapper") : null),
|
|
268
|
+
style: x(e.searchFormWrapperStyle)
|
|
269
|
+
}, [s(r(ce).SearchForm, m(e.searchForm || {}, {
|
|
260
270
|
ref_key: "formRef",
|
|
261
|
-
ref:
|
|
271
|
+
ref: h,
|
|
262
272
|
"custom-reset": "",
|
|
263
|
-
onSubmit:
|
|
264
|
-
onReset:
|
|
265
|
-
"submit-loading":
|
|
266
|
-
}),
|
|
267
|
-
default:
|
|
273
|
+
onSubmit: r(P),
|
|
274
|
+
onReset: r(v),
|
|
275
|
+
"submit-loading": r(c).loading
|
|
276
|
+
}), E({
|
|
277
|
+
default: p(() => [(i(!0), f(te, null, O(B.value, (a) => (i(), oe(re(a.customRenderFormItem ? a.customRenderFormItem(a) : r(fe)[a.valueType || "text"]), m({
|
|
268
278
|
key: a.dataIndex,
|
|
269
279
|
ref_for: !0
|
|
270
280
|
}, a.fieldProps || {}, {
|
|
271
281
|
span: a.span
|
|
272
282
|
}), null, 16, ["span"]))), 128))]),
|
|
273
283
|
_: 2
|
|
274
|
-
}, [
|
|
284
|
+
}, [w.searchFormExtra ? {
|
|
275
285
|
name: "extra",
|
|
276
|
-
fn:
|
|
286
|
+
fn: p(() => [R(e.$slots, "searchFormExtra")]),
|
|
277
287
|
key: "0"
|
|
278
|
-
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) :
|
|
288
|
+
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : L("", !0), z("div", {
|
|
279
289
|
ref_key: "contentRef",
|
|
280
|
-
ref:
|
|
281
|
-
class: F([
|
|
282
|
-
style:
|
|
283
|
-
}, [R(e.$slots, "title"), s(
|
|
284
|
-
class:
|
|
285
|
-
},
|
|
286
|
-
onChange:
|
|
287
|
-
columns:
|
|
288
|
-
}),
|
|
289
|
-
headerCell:
|
|
290
|
+
ref: q,
|
|
291
|
+
class: F([r(g)("table-wrapper"), e.card ? r(g)("table-wrapper-card") : null]),
|
|
292
|
+
style: x(e.tableWrapperStyle)
|
|
293
|
+
}, [R(e.$slots, "title"), s(r(ue), m({
|
|
294
|
+
class: r(A) === "admin" ? r(u)("table-admin") : r(u)("table")
|
|
295
|
+
}, G.value, {
|
|
296
|
+
onChange: r($),
|
|
297
|
+
columns: y.value
|
|
298
|
+
}), E({
|
|
299
|
+
headerCell: p(({
|
|
290
300
|
column: a,
|
|
291
|
-
title:
|
|
292
|
-
}) => [a.tooltip ? (
|
|
301
|
+
title: n
|
|
302
|
+
}) => [a.tooltip ? (i(), f("span", ve, [z("span", null, ne(n), 1), s(r(ie), {
|
|
293
303
|
title: a.tooltip,
|
|
294
304
|
placement: "bottom"
|
|
295
305
|
}, {
|
|
296
|
-
default:
|
|
297
|
-
style:
|
|
306
|
+
default: p(() => [s(r(he), {
|
|
307
|
+
style: x({
|
|
298
308
|
paddingLeft: "4px",
|
|
299
|
-
color:
|
|
309
|
+
color: r(j).colorPrimary
|
|
300
310
|
})
|
|
301
311
|
}, null, 8, ["style"])]),
|
|
302
312
|
_: 2
|
|
303
|
-
}, 1032, ["title"])])) :
|
|
313
|
+
}, 1032, ["title"])])) : L("", !0)]),
|
|
304
314
|
_: 2
|
|
305
|
-
}, [
|
|
306
|
-
name:
|
|
307
|
-
fn:
|
|
315
|
+
}, [O(r(ye)(w, ["title", "searchFormExtra"]), (a, n) => ({
|
|
316
|
+
name: n,
|
|
317
|
+
fn: p((l) => [R(e.$slots, n, le(de(l || {})))])
|
|
308
318
|
}))]), 1040, ["class", "onChange", "columns"])], 6)], 2));
|
|
309
319
|
}
|
|
310
320
|
});
|
|
@@ -9,7 +9,9 @@ import { MouseEventHandler, FocusEventHandler, KeyboardEventHandler, Composition
|
|
|
9
9
|
import { Dayjs } from 'dayjs';
|
|
10
10
|
import { PickerLocale } from 'ant-design-vue/es/date-picker/generatePicker';
|
|
11
11
|
import { AlignType } from 'ant-design-vue/es/vc-align/interface';
|
|
12
|
-
import {
|
|
12
|
+
import { LiteralUnion } from '../type';
|
|
13
|
+
import { ApFormatPresetType } from '../ap-field/date/interface';
|
|
14
|
+
import { PresetDate, PanelMode, RangeValue, OnPanelChange, EventValue, DisabledTimes } from 'ant-design-vue/es/vc-picker/interface';
|
|
13
15
|
import { VueNode, LiteralUnion } from 'ant-design-vue/es/_util/type';
|
|
14
16
|
import { MonthCellRender } from 'ant-design-vue/es/vc-picker/panels/MonthPanel/MonthBody';
|
|
15
17
|
import { SharedTimeProps } from 'ant-design-vue/es/vc-picker/panels/TimePanel';
|
|
@@ -7861,7 +7863,7 @@ export declare const apTableRenderItemMap: {
|
|
|
7861
7863
|
type: PropType<string>;
|
|
7862
7864
|
};
|
|
7863
7865
|
format: {
|
|
7864
|
-
type: PropType<string
|
|
7866
|
+
type: PropType<LiteralUnion<ApFormatPresetType, string>>;
|
|
7865
7867
|
default: string;
|
|
7866
7868
|
};
|
|
7867
7869
|
popupStyle: {
|
|
@@ -7913,6 +7915,9 @@ export declare const apTableRenderItemMap: {
|
|
|
7913
7915
|
type: PropType<string>;
|
|
7914
7916
|
default: string;
|
|
7915
7917
|
};
|
|
7918
|
+
timezone: {
|
|
7919
|
+
type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
|
|
7920
|
+
};
|
|
7916
7921
|
}>> & {
|
|
7917
7922
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
7918
7923
|
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -8063,7 +8068,7 @@ export declare const apTableRenderItemMap: {
|
|
|
8063
8068
|
type: PropType<string>;
|
|
8064
8069
|
};
|
|
8065
8070
|
format: {
|
|
8066
|
-
type: PropType<string
|
|
8071
|
+
type: PropType<LiteralUnion<ApFormatPresetType, string>>;
|
|
8067
8072
|
default: string;
|
|
8068
8073
|
};
|
|
8069
8074
|
popupStyle: {
|
|
@@ -8115,6 +8120,9 @@ export declare const apTableRenderItemMap: {
|
|
|
8115
8120
|
type: PropType<string>;
|
|
8116
8121
|
default: string;
|
|
8117
8122
|
};
|
|
8123
|
+
timezone: {
|
|
8124
|
+
type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
|
|
8125
|
+
};
|
|
8118
8126
|
}>> & {
|
|
8119
8127
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
8120
8128
|
}, {
|
|
@@ -8139,7 +8147,7 @@ export declare const apTableRenderItemMap: {
|
|
|
8139
8147
|
}> | null;
|
|
8140
8148
|
allowClear: boolean;
|
|
8141
8149
|
defaultOpen: boolean;
|
|
8142
|
-
format: string
|
|
8150
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
8143
8151
|
inputReadOnly: boolean;
|
|
8144
8152
|
showToday: boolean;
|
|
8145
8153
|
showTime: boolean | SharedTimeProps<Dayjs>;
|
|
@@ -8297,7 +8305,7 @@ export declare const apTableRenderItemMap: {
|
|
|
8297
8305
|
type: PropType<string>;
|
|
8298
8306
|
};
|
|
8299
8307
|
format: {
|
|
8300
|
-
type: PropType<string
|
|
8308
|
+
type: PropType<LiteralUnion<ApFormatPresetType, string>>;
|
|
8301
8309
|
default: string;
|
|
8302
8310
|
};
|
|
8303
8311
|
popupStyle: {
|
|
@@ -8349,6 +8357,9 @@ export declare const apTableRenderItemMap: {
|
|
|
8349
8357
|
type: PropType<string>;
|
|
8350
8358
|
default: string;
|
|
8351
8359
|
};
|
|
8360
|
+
timezone: {
|
|
8361
|
+
type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
|
|
8362
|
+
};
|
|
8352
8363
|
}>> & {
|
|
8353
8364
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
8354
8365
|
}, {}, {}, {}, {}, {
|
|
@@ -8373,7 +8384,7 @@ export declare const apTableRenderItemMap: {
|
|
|
8373
8384
|
}> | null;
|
|
8374
8385
|
allowClear: boolean;
|
|
8375
8386
|
defaultOpen: boolean;
|
|
8376
|
-
format: string
|
|
8387
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
8377
8388
|
inputReadOnly: boolean;
|
|
8378
8389
|
showToday: boolean;
|
|
8379
8390
|
showTime: boolean | SharedTimeProps<Dayjs>;
|
|
@@ -8528,7 +8539,7 @@ export declare const apTableRenderItemMap: {
|
|
|
8528
8539
|
type: PropType<string>;
|
|
8529
8540
|
};
|
|
8530
8541
|
format: {
|
|
8531
|
-
type: PropType<string
|
|
8542
|
+
type: PropType<LiteralUnion<ApFormatPresetType, string>>;
|
|
8532
8543
|
default: string;
|
|
8533
8544
|
};
|
|
8534
8545
|
popupStyle: {
|
|
@@ -8580,6 +8591,9 @@ export declare const apTableRenderItemMap: {
|
|
|
8580
8591
|
type: PropType<string>;
|
|
8581
8592
|
default: string;
|
|
8582
8593
|
};
|
|
8594
|
+
timezone: {
|
|
8595
|
+
type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
|
|
8596
|
+
};
|
|
8583
8597
|
}>> & {
|
|
8584
8598
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
8585
8599
|
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -8606,7 +8620,7 @@ export declare const apTableRenderItemMap: {
|
|
|
8606
8620
|
}> | null;
|
|
8607
8621
|
allowClear: boolean;
|
|
8608
8622
|
defaultOpen: boolean;
|
|
8609
|
-
format: string
|
|
8623
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
8610
8624
|
inputReadOnly: boolean;
|
|
8611
8625
|
showToday: boolean;
|
|
8612
8626
|
showTime: boolean | SharedTimeProps<Dayjs>;
|
|
@@ -8792,7 +8806,7 @@ export declare const apTableRenderItemMap: {
|
|
|
8792
8806
|
type: PropType<string>;
|
|
8793
8807
|
};
|
|
8794
8808
|
format: {
|
|
8795
|
-
type: PropType<
|
|
8809
|
+
type: PropType<LiteralUnion<ApFormatPresetType, string>>;
|
|
8796
8810
|
default: string;
|
|
8797
8811
|
};
|
|
8798
8812
|
popupStyle: {
|
|
@@ -8845,6 +8859,9 @@ export declare const apTableRenderItemMap: {
|
|
|
8845
8859
|
type: PropType<string>;
|
|
8846
8860
|
default: string;
|
|
8847
8861
|
};
|
|
8862
|
+
timezone: {
|
|
8863
|
+
type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
|
|
8864
|
+
};
|
|
8848
8865
|
}>> & {
|
|
8849
8866
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
8850
8867
|
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -9002,7 +9019,7 @@ export declare const apTableRenderItemMap: {
|
|
|
9002
9019
|
type: PropType<string>;
|
|
9003
9020
|
};
|
|
9004
9021
|
format: {
|
|
9005
|
-
type: PropType<
|
|
9022
|
+
type: PropType<LiteralUnion<ApFormatPresetType, string>>;
|
|
9006
9023
|
default: string;
|
|
9007
9024
|
};
|
|
9008
9025
|
popupStyle: {
|
|
@@ -9055,6 +9072,9 @@ export declare const apTableRenderItemMap: {
|
|
|
9055
9072
|
type: PropType<string>;
|
|
9056
9073
|
default: string;
|
|
9057
9074
|
};
|
|
9075
|
+
timezone: {
|
|
9076
|
+
type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
|
|
9077
|
+
};
|
|
9058
9078
|
}>> & {
|
|
9059
9079
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
9060
9080
|
}, {
|
|
@@ -9086,7 +9106,7 @@ export declare const apTableRenderItemMap: {
|
|
|
9086
9106
|
}> | null | undefined)[] | VNode<RendererNode, RendererElement, {
|
|
9087
9107
|
[key: string]: any;
|
|
9088
9108
|
}> | null;
|
|
9089
|
-
format:
|
|
9109
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
9090
9110
|
inputReadOnly: boolean;
|
|
9091
9111
|
emptyText: string;
|
|
9092
9112
|
}, true, {}, {}, {
|
|
@@ -9249,7 +9269,7 @@ export declare const apTableRenderItemMap: {
|
|
|
9249
9269
|
type: PropType<string>;
|
|
9250
9270
|
};
|
|
9251
9271
|
format: {
|
|
9252
|
-
type: PropType<
|
|
9272
|
+
type: PropType<LiteralUnion<ApFormatPresetType, string>>;
|
|
9253
9273
|
default: string;
|
|
9254
9274
|
};
|
|
9255
9275
|
popupStyle: {
|
|
@@ -9302,6 +9322,9 @@ export declare const apTableRenderItemMap: {
|
|
|
9302
9322
|
type: PropType<string>;
|
|
9303
9323
|
default: string;
|
|
9304
9324
|
};
|
|
9325
|
+
timezone: {
|
|
9326
|
+
type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
|
|
9327
|
+
};
|
|
9305
9328
|
}>> & {
|
|
9306
9329
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
9307
9330
|
}, {}, {}, {}, {}, {
|
|
@@ -9333,7 +9356,7 @@ export declare const apTableRenderItemMap: {
|
|
|
9333
9356
|
}> | null | undefined)[] | VNode<RendererNode, RendererElement, {
|
|
9334
9357
|
[key: string]: any;
|
|
9335
9358
|
}> | null;
|
|
9336
|
-
format:
|
|
9359
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
9337
9360
|
inputReadOnly: boolean;
|
|
9338
9361
|
emptyText: string;
|
|
9339
9362
|
}>;
|
|
@@ -9493,7 +9516,7 @@ export declare const apTableRenderItemMap: {
|
|
|
9493
9516
|
type: PropType<string>;
|
|
9494
9517
|
};
|
|
9495
9518
|
format: {
|
|
9496
|
-
type: PropType<
|
|
9519
|
+
type: PropType<LiteralUnion<ApFormatPresetType, string>>;
|
|
9497
9520
|
default: string;
|
|
9498
9521
|
};
|
|
9499
9522
|
popupStyle: {
|
|
@@ -9546,6 +9569,9 @@ export declare const apTableRenderItemMap: {
|
|
|
9546
9569
|
type: PropType<string>;
|
|
9547
9570
|
default: string;
|
|
9548
9571
|
};
|
|
9572
|
+
timezone: {
|
|
9573
|
+
type: PropType<"LD" | "PR" | "MS" | "DB" | "SH" | "SU" | "LA" | "NY">;
|
|
9574
|
+
};
|
|
9549
9575
|
}>> & {
|
|
9550
9576
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
9551
9577
|
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
@@ -9579,7 +9605,7 @@ export declare const apTableRenderItemMap: {
|
|
|
9579
9605
|
}> | null | undefined)[] | VNode<RendererNode, RendererElement, {
|
|
9580
9606
|
[key: string]: any;
|
|
9581
9607
|
}> | null;
|
|
9582
|
-
format:
|
|
9608
|
+
format: LiteralUnion<ApFormatPresetType, string>;
|
|
9583
9609
|
inputReadOnly: boolean;
|
|
9584
9610
|
emptyText: string;
|
|
9585
9611
|
}, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
@@ -3,7 +3,7 @@ import { CompareFn, SortOrder } from 'ant-design-vue/es/table/interface';
|
|
|
3
3
|
import { ApFormSearchFormProps } from '../ap-form';
|
|
4
4
|
import { ApFormItemCheckboxProps, ApFormItemDateProps, ApFormItemDateRangeProps, ApFormItemNumberProps, ApFormItemRadioProps, ApFormItemSelectProps, ApFormItemSwitchProps, ApFormItemTextAreaProps, ApFormItemTextPasswordProps, ApFormItemTextProps } from '../ap-form/items/interface';
|
|
5
5
|
import { Recordable } from '../type';
|
|
6
|
-
import { ComputedRef, CSSProperties } from 'vue';
|
|
6
|
+
import { ComputedRef, CSSProperties, VNode } from 'vue';
|
|
7
7
|
import { ApActionGroupProps } from '../ap-action';
|
|
8
8
|
import { ApTableIndexProps } from './components/interface';
|
|
9
9
|
|
|
@@ -56,7 +56,7 @@ export type ApTableValueFields = {
|
|
|
56
56
|
};
|
|
57
57
|
export type ApTableValueTypes = keyof ApTableValueFields;
|
|
58
58
|
export type ValueEnum = Record<string, ValueEnumType>;
|
|
59
|
-
export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters'> & {
|
|
59
|
+
export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters' | 'customRender'> & {
|
|
60
60
|
sorter?: string | boolean | CompareFn<T> | {
|
|
61
61
|
compare?: CompareFn<T>;
|
|
62
62
|
/** Config multiple sorter order priority */
|
|
@@ -100,14 +100,14 @@ export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes =
|
|
|
100
100
|
/**
|
|
101
101
|
* 值类型额外配置的参数(用于查询表单渲染)
|
|
102
102
|
*/
|
|
103
|
-
fieldProps?: ApTableValueFields[ValueType] | ((opt
|
|
103
|
+
fieldProps?: ApTableValueFields[ValueType] | ((opt: Partial<{
|
|
104
104
|
value: any;
|
|
105
105
|
text: any;
|
|
106
106
|
record: RecordType;
|
|
107
107
|
index: number;
|
|
108
108
|
renderIndex: number;
|
|
109
109
|
column: ApColumnType<RecordType, ValueType>;
|
|
110
|
-
}) => ApTableValueFields[ValueType]);
|
|
110
|
+
}>) => ApTableValueFields[ValueType]);
|
|
111
111
|
/**
|
|
112
112
|
* 用于表单项排序的字段
|
|
113
113
|
* @description 值越大,越排在前面,请设置正整数,设置为0或负数将会无效
|
|
@@ -117,6 +117,20 @@ export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes =
|
|
|
117
117
|
* 表头的菜单筛选项,设置为true后会尝试使用valueEnum生成filters
|
|
118
118
|
*/
|
|
119
119
|
filters?: ColumnType<RecordType>['filters'] | true;
|
|
120
|
+
/**
|
|
121
|
+
* 自定义渲染,添加了`editable`以及`originalNode`
|
|
122
|
+
* @param opt
|
|
123
|
+
* @returns
|
|
124
|
+
*/
|
|
125
|
+
customRender?: (opt: {
|
|
126
|
+
value: any;
|
|
127
|
+
text: any;
|
|
128
|
+
record: RecordType;
|
|
129
|
+
index: number;
|
|
130
|
+
renderIndex: number;
|
|
131
|
+
column: ApColumnType<RecordType>;
|
|
132
|
+
originalNode?: VNode;
|
|
133
|
+
}) => any;
|
|
120
134
|
} : never;
|
|
121
135
|
export type RequestData<T> = {
|
|
122
136
|
data: T[] | undefined;
|
|
@@ -161,6 +175,10 @@ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<R
|
|
|
161
175
|
* 表格的默认数据源,这些数据源将会在第一次请求后被替换
|
|
162
176
|
*/
|
|
163
177
|
defaultData?: RecordType[];
|
|
178
|
+
/**
|
|
179
|
+
* 表格的最终数据源(设置后request和defaultData都不会生效),离线表格的效果
|
|
180
|
+
*/
|
|
181
|
+
dataSource?: RecordType[];
|
|
164
182
|
/**
|
|
165
183
|
* 表格loading状态变更后触发
|
|
166
184
|
* @param loading
|