@aplus-frontend/ui 0.0.37 → 0.0.39
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-download/ap-download.vue.mjs +26 -35
- package/es/src/ap-download/hooks/index.d.ts +1 -6
- package/es/src/ap-download/hooks/index.mjs +12 -12
- package/es/src/ap-download/interface.d.ts +3 -13
- package/es/src/ap-download/style/ap-download.css +12 -12
- package/es/src/ap-form/ap-form-item-group/index.vue.mjs +28 -27
- package/es/src/ap-form/search-form/index.vue.mjs +107 -102
- package/es/src/ap-table/ap-table.vue.d.ts +10 -4
- package/es/src/ap-table/ap-table.vue.mjs +58 -57
- package/es/src/ap-table/constants.d.ts +8 -8
- package/es/src/ap-table/hooks/use-table-row-selection.d.ts +1 -1
- package/es/src/ap-table/interface.d.ts +6 -2
- package/es/src/business/ap-label/ApLabel.vue.d.ts +13 -2
- package/es/src/business/ap-label/ApLabel.vue2.mjs +43 -25
- package/es/src/business/ap-label/interface.d.ts +6 -3
- package/es/src/business/ap-label/style.css +2 -1
- package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +1 -1
- package/es/src/business/expandAlert/interface.d.ts +1 -1
- package/es/src/business/index.d.ts +53 -9
- package/es/src/theme/ap-download/ap-download.css +12 -12
- package/es/src/theme/ap-label/ap-label.css +2 -1
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/hooks/index.d.ts +1 -6
- package/lib/src/ap-download/hooks/index.js +1 -1
- package/lib/src/ap-download/interface.d.ts +3 -13
- package/lib/src/ap-download/style/ap-download.css +12 -12
- package/lib/src/ap-form/ap-form-item-group/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +10 -4
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +8 -8
- package/lib/src/ap-table/hooks/use-table-row-selection.d.ts +1 -1
- package/lib/src/ap-table/interface.d.ts +6 -2
- package/lib/src/business/ap-label/ApLabel.vue.d.ts +13 -2
- package/lib/src/business/ap-label/ApLabel.vue2.js +1 -1
- package/lib/src/business/ap-label/interface.d.ts +6 -3
- package/lib/src/business/ap-label/style.css +2 -1
- package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/expandAlert/interface.d.ts +1 -1
- package/lib/src/business/index.d.ts +53 -9
- package/lib/src/theme/ap-download/ap-download.css +12 -12
- package/lib/src/theme/ap-label/ap-label.css +2 -1
- package/package.json +4 -4
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as ne, useSlots as se, computed as s, createVNode as d, mergeProps as p, unref as
|
|
1
|
+
import { defineComponent as ne, useSlots as se, computed as s, createVNode as d, mergeProps as p, unref as l, watch as de, openBlock as c, createElementBlock as y, normalizeClass as F, normalizeStyle as T, createSlots as V, withCtx as f, Fragment as ue, renderList as z, createBlock as ie, resolveDynamicComponent as pe, renderSlot as x, createCommentVNode as D, createElementVNode as K, toDisplayString as ce, normalizeProps as fe, guardReactiveProps as me } from "vue";
|
|
2
2
|
import { Typography as ge, Table as ye, Tooltip as be } from "ant-design-vue";
|
|
3
3
|
import { useToken as Se } from "ant-design-vue/es/theme/internal";
|
|
4
4
|
import { ApForm as he } from "../ap-form/index.mjs";
|
|
5
5
|
import { apTableRenderItemMap as we, noRenderAsFormItemValueList as N, apTableFormItemMap as Ce } from "./constants.mjs";
|
|
6
6
|
import "../config-provider/index.mjs";
|
|
7
7
|
import { useTablePaging as Re } from "./hooks/use-table-paging.mjs";
|
|
8
|
-
import { omit as
|
|
8
|
+
import { omit as j, isUndefined as u, isBoolean as Fe } from "lodash-unified";
|
|
9
9
|
import "./style/ap-table.css";
|
|
10
10
|
import { QuestionCircleOutlined as Te } from "@ant-design/icons-vue";
|
|
11
|
-
import { apColumnToColumn as xe, getTableRenderType as ve, getTableRenderProps as Be, getColumnOrder as
|
|
11
|
+
import { apColumnToColumn as xe, getTableRenderType as ve, getTableRenderProps as Be, getColumnOrder as W, updateFormProps as Pe, getFieldProps as Ie, getPlaceholder as ke } from "./utils.mjs";
|
|
12
12
|
import Le from "./hooks/use-table-content-height.mjs";
|
|
13
13
|
import { getRawDisplayValue as Ee } from "../editable-table/utils.mjs";
|
|
14
14
|
import Oe from "./hooks/use-table-row-selection.mjs";
|
|
@@ -97,7 +97,7 @@ const Ke = {
|
|
|
97
97
|
transformCellText: {},
|
|
98
98
|
columns: {},
|
|
99
99
|
rowSelection: {
|
|
100
|
-
type: Boolean
|
|
100
|
+
type: [Boolean, Object]
|
|
101
101
|
},
|
|
102
102
|
card: {
|
|
103
103
|
type: Boolean,
|
|
@@ -133,10 +133,10 @@ const Ke = {
|
|
|
133
133
|
default: !1
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
|
-
setup(
|
|
136
|
+
setup(_, {
|
|
137
137
|
expose: A
|
|
138
138
|
}) {
|
|
139
|
-
const a =
|
|
139
|
+
const a = _;
|
|
140
140
|
let v = 0;
|
|
141
141
|
const B = se(), [, M] = Se(), {
|
|
142
142
|
t: q
|
|
@@ -150,20 +150,20 @@ const Ke = {
|
|
|
150
150
|
var t;
|
|
151
151
|
let e = ((t = a.columns) == null ? void 0 : t.filter((o) => !o.hideInTable)) || [];
|
|
152
152
|
return e = e.map((o) => ({
|
|
153
|
-
...
|
|
153
|
+
...j(xe(o), ["ellipsis"]),
|
|
154
154
|
customRender({
|
|
155
|
-
value:
|
|
155
|
+
value: r,
|
|
156
156
|
...n
|
|
157
157
|
}) {
|
|
158
158
|
const C = ve(o), O = we[C], le = Be(o, {
|
|
159
|
-
value:
|
|
159
|
+
value: r,
|
|
160
160
|
...n
|
|
161
161
|
});
|
|
162
|
-
let R = oe(o,
|
|
162
|
+
let R = oe(o, r, d(O, p(le, {
|
|
163
163
|
mode: "read"
|
|
164
164
|
}), null));
|
|
165
165
|
return o.customRender && (R = o.customRender({
|
|
166
|
-
value:
|
|
166
|
+
value: r,
|
|
167
167
|
...n,
|
|
168
168
|
column: o,
|
|
169
169
|
originalNode: R
|
|
@@ -172,24 +172,24 @@ const Ke = {
|
|
|
172
172
|
})), e;
|
|
173
173
|
}), P = s(() => {
|
|
174
174
|
var e, t, o;
|
|
175
|
-
return v++, ((o = (t = (e = a.columns) == null ? void 0 : e.filter((
|
|
176
|
-
let C =
|
|
177
|
-
return
|
|
178
|
-
})) == null ? void 0 : o.map((
|
|
179
|
-
const n = Pe(
|
|
175
|
+
return v++, ((o = (t = (e = a.columns) == null ? void 0 : e.filter((r) => !r.hideInSearch && r.dataIndex && (r.valueType || r.customRenderFormItem) && !N.includes(r.valueType))) == null ? void 0 : t.sort((r, n) => {
|
|
176
|
+
let C = W(r.order);
|
|
177
|
+
return W(n.order) - C;
|
|
178
|
+
})) == null ? void 0 : o.map((r) => {
|
|
179
|
+
const n = Pe(r, Ie(r.fieldProps, {}));
|
|
180
180
|
return {
|
|
181
|
-
...
|
|
181
|
+
...r,
|
|
182
182
|
fieldProps: {
|
|
183
|
-
label:
|
|
184
|
-
name:
|
|
183
|
+
label: r.title,
|
|
184
|
+
name: r.dataIndex,
|
|
185
185
|
...n || {},
|
|
186
186
|
// 格式化placeholder
|
|
187
|
-
placeholder: ke(q,
|
|
187
|
+
placeholder: ke(q, r.valueType, n == null ? void 0 : n.placeholder),
|
|
188
188
|
_signal: v
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
})) || [];
|
|
192
|
-
}), Q = s(() =>
|
|
192
|
+
}), Q = s(() => l(S).filter((e) => e.sorter === !0).map((e) => e.dataIndex)), U = s(() => l(S).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex)), J = s(() => u(a.dataSource) ? g.value.records : a.dataSource), {
|
|
193
193
|
rowSelection: I,
|
|
194
194
|
selectedRows: k,
|
|
195
195
|
...h
|
|
@@ -206,16 +206,16 @@ const Ke = {
|
|
|
206
206
|
data: g
|
|
207
207
|
} = Re({
|
|
208
208
|
async request(e) {
|
|
209
|
-
var o,
|
|
209
|
+
var o, r;
|
|
210
210
|
!I.value.preserveSelectedRowKeys && u(a.dataSource) && h.clearAll();
|
|
211
211
|
const t = await ((o = a.request) == null ? void 0 : o.call(a, e));
|
|
212
|
-
return (
|
|
212
|
+
return (r = a.onLoad) == null || r.call(a, (t == null ? void 0 : t.data) || []), {
|
|
213
213
|
data: (t == null ? void 0 : t.data) || [],
|
|
214
214
|
total: (t == null ? void 0 : t.total) || 0
|
|
215
215
|
};
|
|
216
216
|
},
|
|
217
|
-
filterFields:
|
|
218
|
-
sortFields:
|
|
217
|
+
filterFields: l(U),
|
|
218
|
+
sortFields: l(Q),
|
|
219
219
|
defaultParams: a.params,
|
|
220
220
|
defaultData: a.defaultData,
|
|
221
221
|
manual: a.manual,
|
|
@@ -225,7 +225,7 @@ const Ke = {
|
|
|
225
225
|
}), Y = s(() => {
|
|
226
226
|
var e;
|
|
227
227
|
return a.scroll ? a.scroll : a.adaptive && (g.value.total > 0 || (e = a.dataSource) != null && e.length) ? {
|
|
228
|
-
y:
|
|
228
|
+
y: l($),
|
|
229
229
|
x: "100%"
|
|
230
230
|
} : {
|
|
231
231
|
x: !0
|
|
@@ -237,22 +237,23 @@ const Ke = {
|
|
|
237
237
|
if ((e = a.columns) != null && e.some((t) => t.ellipsis))
|
|
238
238
|
return "fixed";
|
|
239
239
|
}), ee = s(() => {
|
|
240
|
-
|
|
240
|
+
var r;
|
|
241
|
+
const e = l(m), t = u(a.dataSource) ? e : {
|
|
241
242
|
...e,
|
|
242
243
|
dataSource: a.dataSource,
|
|
243
244
|
onChange: a.onChange
|
|
244
|
-
}, o =
|
|
245
|
+
}, o = l(I);
|
|
245
246
|
return {
|
|
246
247
|
...a,
|
|
247
248
|
...t,
|
|
248
|
-
rowSelection: a.rowSelection ? {
|
|
249
|
+
rowSelection: a.rowSelection === !0 || ((r = a.rowSelection) == null ? void 0 : r.mode) === "internal" ? {
|
|
249
250
|
...o,
|
|
250
251
|
// tips 如果是前端分页,则默认会走缓存
|
|
251
252
|
preserveSelectedRowKeys: u(a.dataSource) ? o.preserveSelectedRowKeys : !0
|
|
252
|
-
} :
|
|
253
|
-
loading: u(a.loading) ?
|
|
254
|
-
pagination: a.pagination === !1 ? !1 :
|
|
255
|
-
scroll:
|
|
253
|
+
} : a.rowSelection,
|
|
254
|
+
loading: u(a.loading) ? l(m).loading : a.loading,
|
|
255
|
+
pagination: a.pagination === !1 ? !1 : l(m).pagination,
|
|
256
|
+
scroll: l(Y)
|
|
256
257
|
};
|
|
257
258
|
}), ae = s(() => [i(), a.card ? null : i("wrapper"), a.adaptive ? i("adaptive") : null].filter(Boolean));
|
|
258
259
|
function oe(e, t, o) {
|
|
@@ -270,13 +271,13 @@ const Ke = {
|
|
|
270
271
|
content: e.ellipsis ? Ee(e, t) : o
|
|
271
272
|
}, null) : o;
|
|
272
273
|
}
|
|
273
|
-
de(() =>
|
|
274
|
+
de(() => l(g).loading, (e) => {
|
|
274
275
|
var t;
|
|
275
276
|
(t = a.onLoadingChange) == null || t.call(a, e);
|
|
276
277
|
});
|
|
277
278
|
function te(e) {
|
|
278
|
-
var t, o,
|
|
279
|
-
(
|
|
279
|
+
var t, o, r;
|
|
280
|
+
(r = (o = (t = w.value) == null ? void 0 : t.apForm) == null ? void 0 : o.setFieldsValue) == null || r.call(o, e);
|
|
280
281
|
}
|
|
281
282
|
function re() {
|
|
282
283
|
var e, t, o;
|
|
@@ -287,26 +288,26 @@ const Ke = {
|
|
|
287
288
|
reset: () => E(),
|
|
288
289
|
setSearchFormValues: te,
|
|
289
290
|
getSearchFormValues: re,
|
|
290
|
-
dataSource: s(() =>
|
|
291
|
+
dataSource: s(() => l(g).records),
|
|
291
292
|
rowSelection: {
|
|
292
|
-
selectedRows: s(() =>
|
|
293
|
+
selectedRows: s(() => l(k)),
|
|
293
294
|
...h
|
|
294
295
|
}
|
|
295
296
|
}), (e, t) => (c(), y("div", {
|
|
296
297
|
class: F(ae.value)
|
|
297
|
-
}, [
|
|
298
|
+
}, [l(u)(e.dataSource) && e.searchForm !== !1 && P.value.length > 0 ? (c(), y("div", {
|
|
298
299
|
key: 0,
|
|
299
|
-
class: F(e.card ?
|
|
300
|
+
class: F(e.card ? l(b)("search-wrapper") : null),
|
|
300
301
|
style: T(e.searchFormWrapperStyle)
|
|
301
|
-
}, [d(
|
|
302
|
+
}, [d(l(he).SearchForm, p(e.searchForm || {}, {
|
|
302
303
|
ref_key: "formRef",
|
|
303
304
|
ref: w,
|
|
304
305
|
"custom-reset": "",
|
|
305
|
-
onSubmit:
|
|
306
|
-
onReset:
|
|
307
|
-
"submit-loading":
|
|
306
|
+
onSubmit: l(L),
|
|
307
|
+
onReset: l(E),
|
|
308
|
+
"submit-loading": l(m).loading
|
|
308
309
|
}), V({
|
|
309
|
-
default: f(() => [(c(!0), y(ue, null, z(P.value, (o) => (c(), ie(pe(o.customRenderFormItem ? o.customRenderFormItem(o) :
|
|
310
|
+
default: f(() => [(c(!0), y(ue, null, z(P.value, (o) => (c(), ie(pe(o.customRenderFormItem ? o.customRenderFormItem(o) : l(Ce)[o.valueType || "text"]), p({
|
|
310
311
|
key: o.dataIndex,
|
|
311
312
|
ref_for: !0
|
|
312
313
|
}, o.fieldProps || {}, {
|
|
@@ -320,36 +321,36 @@ const Ke = {
|
|
|
320
321
|
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : D("", !0), K("div", {
|
|
321
322
|
ref_key: "contentRef",
|
|
322
323
|
ref: G,
|
|
323
|
-
class: F([
|
|
324
|
+
class: F([l(b)("table-wrapper"), e.card ? l(b)("table-wrapper-card") : null]),
|
|
324
325
|
style: T(e.tableWrapperStyle)
|
|
325
326
|
}, [x(e.$slots, "title", p({
|
|
326
|
-
selectedRows:
|
|
327
|
-
}, h)), d(
|
|
328
|
-
class:
|
|
327
|
+
selectedRows: l(k)
|
|
328
|
+
}, h)), d(l(ye), p({
|
|
329
|
+
class: l(H) === "admin" ? l(i)("table-admin") : l(i)("table")
|
|
329
330
|
}, ee.value, {
|
|
330
331
|
"table-layout": Z.value,
|
|
331
|
-
onChange:
|
|
332
|
+
onChange: l(X),
|
|
332
333
|
columns: S.value
|
|
333
334
|
}), V({
|
|
334
335
|
headerCell: f(({
|
|
335
336
|
column: o,
|
|
336
|
-
title:
|
|
337
|
-
}) => [o.tooltip ? (c(), y("span", Ke, [K("span", null, ce(
|
|
337
|
+
title: r
|
|
338
|
+
}) => [o.tooltip ? (c(), y("span", Ke, [K("span", null, ce(r), 1), d(l(be), {
|
|
338
339
|
title: o.tooltip,
|
|
339
340
|
placement: "bottom"
|
|
340
341
|
}, {
|
|
341
|
-
default: f(() => [d(
|
|
342
|
+
default: f(() => [d(l(Te), {
|
|
342
343
|
style: T({
|
|
343
344
|
paddingLeft: "4px",
|
|
344
|
-
color:
|
|
345
|
+
color: l(M).colorPrimary
|
|
345
346
|
})
|
|
346
347
|
}, null, 8, ["style"])]),
|
|
347
348
|
_: 2
|
|
348
349
|
}, 1032, ["title"])])) : D("", !0)]),
|
|
349
350
|
_: 2
|
|
350
|
-
}, [z(
|
|
351
|
-
name:
|
|
352
|
-
fn: f((n) => [x(e.$slots,
|
|
351
|
+
}, [z(l(j)(B, ["title", "searchFormExtra"]), (o, r) => ({
|
|
352
|
+
name: r,
|
|
353
|
+
fn: f((n) => [x(e.$slots, r, fe(me(n || {})))])
|
|
353
354
|
}))]), 1040, ["class", "table-layout", "onChange", "columns"])], 6)], 2));
|
|
354
355
|
}
|
|
355
356
|
});
|
|
@@ -9419,7 +9419,7 @@ export declare const apTableRenderItemMap: {
|
|
|
9419
9419
|
default: string;
|
|
9420
9420
|
};
|
|
9421
9421
|
timezone: {
|
|
9422
|
-
type: PropType<"
|
|
9422
|
+
type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
|
|
9423
9423
|
};
|
|
9424
9424
|
}>> & {
|
|
9425
9425
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -9624,7 +9624,7 @@ export declare const apTableRenderItemMap: {
|
|
|
9624
9624
|
default: string;
|
|
9625
9625
|
};
|
|
9626
9626
|
timezone: {
|
|
9627
|
-
type: PropType<"
|
|
9627
|
+
type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
|
|
9628
9628
|
};
|
|
9629
9629
|
}>> & {
|
|
9630
9630
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -9861,7 +9861,7 @@ export declare const apTableRenderItemMap: {
|
|
|
9861
9861
|
default: string;
|
|
9862
9862
|
};
|
|
9863
9863
|
timezone: {
|
|
9864
|
-
type: PropType<"
|
|
9864
|
+
type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
|
|
9865
9865
|
};
|
|
9866
9866
|
}>> & {
|
|
9867
9867
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -10095,7 +10095,7 @@ export declare const apTableRenderItemMap: {
|
|
|
10095
10095
|
default: string;
|
|
10096
10096
|
};
|
|
10097
10097
|
timezone: {
|
|
10098
|
-
type: PropType<"
|
|
10098
|
+
type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
|
|
10099
10099
|
};
|
|
10100
10100
|
}>> & {
|
|
10101
10101
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -10363,7 +10363,7 @@ export declare const apTableRenderItemMap: {
|
|
|
10363
10363
|
default: string;
|
|
10364
10364
|
};
|
|
10365
10365
|
timezone: {
|
|
10366
|
-
type: PropType<"
|
|
10366
|
+
type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
|
|
10367
10367
|
};
|
|
10368
10368
|
}>> & {
|
|
10369
10369
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -10576,7 +10576,7 @@ export declare const apTableRenderItemMap: {
|
|
|
10576
10576
|
default: string;
|
|
10577
10577
|
};
|
|
10578
10578
|
timezone: {
|
|
10579
|
-
type: PropType<"
|
|
10579
|
+
type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
|
|
10580
10580
|
};
|
|
10581
10581
|
}>> & {
|
|
10582
10582
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -10826,7 +10826,7 @@ export declare const apTableRenderItemMap: {
|
|
|
10826
10826
|
default: string;
|
|
10827
10827
|
};
|
|
10828
10828
|
timezone: {
|
|
10829
|
-
type: PropType<"
|
|
10829
|
+
type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
|
|
10830
10830
|
};
|
|
10831
10831
|
}>> & {
|
|
10832
10832
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -11073,7 +11073,7 @@ export declare const apTableRenderItemMap: {
|
|
|
11073
11073
|
default: string;
|
|
11074
11074
|
};
|
|
11075
11075
|
timezone: {
|
|
11076
|
-
type: PropType<"
|
|
11076
|
+
type: PropType<"RJ" | "PR" | "VD" | "CP" | "BS" | "MS" | "SP" | "DB" | "NY" | "KR" | "CG" | "TM" | "DV" | "SU" | "LA" | "SH" | "ALS">;
|
|
11077
11077
|
};
|
|
11078
11078
|
}>> & {
|
|
11079
11079
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
@@ -46,7 +46,7 @@ export interface RowSelectionReturnType<RecordType = any> {
|
|
|
46
46
|
*/
|
|
47
47
|
toggleSelect: (item: RecordType) => void;
|
|
48
48
|
}
|
|
49
|
-
type RowSelectionParams<T> = ApTableRowSelection<T> & {
|
|
49
|
+
type RowSelectionParams<T> = Omit<ApTableRowSelection<T>, 'mode'> & {
|
|
50
50
|
/**
|
|
51
51
|
* 数据源(如果是后端分页,则表示当页数据,否则是全量数据)
|
|
52
52
|
*/
|
|
@@ -65,7 +65,9 @@ export type ExtraProColumnType<T> = Omit<ColumnType<T>, 'children' | 'filters' |
|
|
|
65
65
|
multiple?: number;
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
-
export type ApTableRowSelection<RecordType = any> = Omit<TableRowSelection<RecordType>, 'selectedRowKeys' | 'onChange' | 'onSelect' | 'onSelectAll' | 'onSelectInvert' | 'onSelectNone'
|
|
68
|
+
export type ApTableRowSelection<RecordType = any> = Omit<TableRowSelection<RecordType>, 'selectedRowKeys' | 'onChange' | 'onSelect' | 'onSelectAll' | 'onSelectInvert' | 'onSelectNone'> & {
|
|
69
|
+
mode: 'internal';
|
|
70
|
+
};
|
|
69
71
|
export type ApColumnType<RecordType = any, ValueType extends ApTableValueTypes = ApTableValueTypes> = ValueType extends ApTableValueTypes ? ExtraProColumnType<RecordType> & {
|
|
70
72
|
children?: ApColumnType<RecordType, ValueType>[];
|
|
71
73
|
/**
|
|
@@ -151,7 +153,9 @@ export type ApTableProps<RecordType = any, ParamsType = any> = Omit<TableProps<R
|
|
|
151
153
|
/**
|
|
152
154
|
* 行选中配置
|
|
153
155
|
*/
|
|
154
|
-
rowSelection?: true | ApTableRowSelection<RecordType
|
|
156
|
+
rowSelection?: true | ApTableRowSelection<RecordType> | (TableRowSelection<RecordType> & {
|
|
157
|
+
mode?: 'base';
|
|
158
|
+
});
|
|
155
159
|
/**
|
|
156
160
|
* 是否启用卡片样式
|
|
157
161
|
*/
|
|
@@ -2,22 +2,28 @@ import { ApLabelProps } from './interface';
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
3
|
import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
|
|
4
4
|
|
|
5
|
-
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApLabelProps>, {
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApLabelProps>, {
|
|
6
6
|
status: string;
|
|
7
7
|
placement: string;
|
|
8
8
|
iconColor: string;
|
|
9
|
+
iconType: string;
|
|
10
|
+
iconSize: number;
|
|
9
11
|
text: string;
|
|
10
12
|
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApLabelProps>, {
|
|
11
13
|
status: string;
|
|
12
14
|
placement: string;
|
|
13
15
|
iconColor: string;
|
|
16
|
+
iconType: string;
|
|
17
|
+
iconSize: number;
|
|
14
18
|
text: string;
|
|
15
19
|
}>>>, {
|
|
16
20
|
text: any;
|
|
17
21
|
placement: TooltipPlacement;
|
|
22
|
+
iconType: "ellipsis" | "warning" | "question";
|
|
18
23
|
status: "success" | "error" | "default" | "warning" | "processing";
|
|
24
|
+
iconSize: number;
|
|
19
25
|
iconColor: string;
|
|
20
|
-
}, {}
|
|
26
|
+
}, {}>, Partial<Record<string, (_: {}) => any>>>;
|
|
21
27
|
export default _default;
|
|
22
28
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
23
29
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -36,3 +42,8 @@ type __VLS_WithDefaults<P, D> = {
|
|
|
36
42
|
type __VLS_Prettify<T> = {
|
|
37
43
|
[K in keyof T]: T[K];
|
|
38
44
|
} & {};
|
|
45
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Badge as
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as m, computed as u, openBlock as o, createElementBlock as s, normalizeClass as f, unref as t, createVNode as d, normalizeProps as y, guardReactiveProps as A, renderSlot as C, Fragment as g, createBlock as l, withCtx as k, normalizeStyle as r, createCommentVNode as n } from "vue";
|
|
2
|
+
import { Badge as x, Tooltip as b } from "ant-design-vue";
|
|
3
|
+
import { IconApAdLineAnnotation as h, IconApAdFillWarn as z, IconApAdFillExecution as N } from "@aplus-frontend/icon";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { omit as
|
|
5
|
+
import { omit as v } from "lodash-unified";
|
|
6
6
|
import "./style.css";
|
|
7
|
-
import { useNamespace as
|
|
8
|
-
const
|
|
7
|
+
import { useNamespace as B } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
const P = /* @__PURE__ */ m({
|
|
9
9
|
name: "ApLabel",
|
|
10
10
|
__name: "ApLabel",
|
|
11
11
|
props: {
|
|
@@ -24,29 +24,47 @@ const F = /* @__PURE__ */ n({
|
|
|
24
24
|
title: {},
|
|
25
25
|
helpMessage: {},
|
|
26
26
|
placement: { default: "top" },
|
|
27
|
-
iconColor: { default: "#FF4D4F" }
|
|
27
|
+
iconColor: { default: "#FF4D4F" },
|
|
28
|
+
iconType: { default: "question" },
|
|
29
|
+
iconSize: { default: 16 },
|
|
30
|
+
slotName: {}
|
|
28
31
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
setup(p) {
|
|
33
|
+
const a = u(() => ({
|
|
34
|
+
color: e.iconColor,
|
|
35
|
+
"font-size": e.iconSize + "px",
|
|
36
|
+
"margin-left": "6px"
|
|
37
|
+
})), e = p, { b: i } = B("ap-label");
|
|
38
|
+
return (c, F) => (o(), s("div", {
|
|
39
|
+
class: f([t(i)()])
|
|
33
40
|
}, [
|
|
34
|
-
|
|
35
|
-
e.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
d(t(x), y(A(t(v)(e, ["helpMessage", "placement", "iconColor"]))), null, 16),
|
|
42
|
+
e.slotName ? C(c.$slots, e.slotName, { key: 0 }) : (o(), s(g, { key: 1 }, [
|
|
43
|
+
e.helpMessage ? (o(), l(t(b), {
|
|
44
|
+
key: 0,
|
|
45
|
+
placement: e.placement,
|
|
46
|
+
title: e.helpMessage
|
|
47
|
+
}, {
|
|
48
|
+
default: k(() => [
|
|
49
|
+
e.iconType === "question" ? (o(), l(t(h), {
|
|
50
|
+
key: 0,
|
|
51
|
+
style: r(a.value)
|
|
52
|
+
}, null, 8, ["style"])) : n("", !0),
|
|
53
|
+
e.iconType === "warning" ? (o(), l(t(z), {
|
|
54
|
+
key: 1,
|
|
55
|
+
style: r(a.value)
|
|
56
|
+
}, null, 8, ["style"])) : n("", !0),
|
|
57
|
+
e.iconType === "ellipsis" ? (o(), l(t(N), {
|
|
58
|
+
key: 2,
|
|
59
|
+
style: r(a.value)
|
|
60
|
+
}, null, 8, ["style"])) : n("", !0)
|
|
61
|
+
]),
|
|
62
|
+
_: 1
|
|
63
|
+
}, 8, ["placement", "title"])) : n("", !0)
|
|
64
|
+
], 64))
|
|
47
65
|
], 2));
|
|
48
66
|
}
|
|
49
67
|
});
|
|
50
68
|
export {
|
|
51
|
-
|
|
69
|
+
P as default
|
|
52
70
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { BadgeProps } from 'ant-design-vue';
|
|
2
2
|
import { TooltipPlacement } from 'ant-design-vue/es/Tooltip';
|
|
3
3
|
|
|
4
|
-
export type ApLabelProps = BadgeProps & {
|
|
5
|
-
helpMessage
|
|
4
|
+
export type ApLabelProps = BadgeProps & Partial<{
|
|
5
|
+
helpMessage: string;
|
|
6
6
|
placement: TooltipPlacement;
|
|
7
7
|
iconColor: string;
|
|
8
|
-
|
|
8
|
+
iconType: 'question' | 'warning' | 'ellipsis';
|
|
9
|
+
iconSize: number;
|
|
10
|
+
slotName: string;
|
|
11
|
+
}>;
|
|
@@ -15,7 +15,7 @@ const K = { key: 0 }, P = ["onClick"], le = /* @__PURE__ */ z({
|
|
|
15
15
|
tipTitle: { default: "查看详情" },
|
|
16
16
|
mapLabel: {},
|
|
17
17
|
separator: { default: "|" },
|
|
18
|
-
rows: { default:
|
|
18
|
+
rows: { default: 2 }
|
|
19
19
|
},
|
|
20
20
|
emits: ["choose", "expand"],
|
|
21
21
|
setup(g, { expose: b, emit: C }) {
|