@aplus-frontend/ui 0.2.0-beta.2 → 0.2.0-beta.3
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 +59 -52
- package/es/src/ap-field/interface.d.ts +6 -0
- package/es/src/ap-field/select/index.vue.mjs +14 -13
- package/es/src/ap-form/item/index.vue.mjs +58 -58
- package/es/src/ap-table/ap-table.vue.d.ts +2 -0
- package/es/src/ap-table/ap-table.vue.mjs +28 -27
- package/es/src/ap-table/constants.d.ts +18 -30
- package/es/src/ap-table/utils.d.ts +33 -3
- package/es/src/ap-table/utils.mjs +69 -69
- package/es/src/business/ap-summary/ap-summary.vue.d.ts +30 -0
- package/es/src/business/ap-summary/ap-summary.vue.mjs +4 -0
- package/es/src/business/ap-summary/ap-summary.vue2.mjs +68 -0
- package/es/src/business/ap-summary/index.d.ts +95 -0
- package/es/src/business/ap-summary/index.mjs +13 -0
- package/es/src/business/ap-summary/interface.d.ts +41 -0
- package/es/src/business/ap-summary/interface.mjs +1 -0
- package/es/src/business/ap-summary/style/css.d.ts +0 -0
- package/es/src/business/ap-summary/style/css.js +1 -0
- package/es/src/business/ap-summary/style/index.d.ts +0 -0
- package/es/src/business/ap-summary/style/index.js +1 -0
- package/es/src/business/ap-summary/utils.d.ts +12 -0
- package/es/src/business/ap-summary/utils.mjs +36 -0
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +16 -14
- package/es/src/editable-table/utils.mjs +51 -51
- package/es/src/hooks/useControllableValue.d.ts +8 -3
- package/es/src/hooks/useControllableValue.mjs +18 -13
- package/es/src/index.mjs +59 -52
- package/es/src/utils/slot.d.ts +9 -1
- package/es/src/utils/slot.mjs +10 -6
- package/lib/index.js +1 -1
- package/lib/src/ap-field/interface.d.ts +6 -0
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +2 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -1
- package/lib/src/ap-table/constants.d.ts +18 -30
- package/lib/src/ap-table/utils.d.ts +33 -3
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-summary/ap-summary.vue.d.ts +30 -0
- package/lib/src/business/ap-summary/ap-summary.vue.js +1 -0
- package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -0
- package/lib/src/business/ap-summary/index.d.ts +95 -0
- package/lib/src/business/ap-summary/index.js +1 -0
- package/lib/src/business/ap-summary/interface.d.ts +41 -0
- package/lib/src/business/ap-summary/interface.js +1 -0
- package/lib/src/business/ap-summary/style/css.d.ts +0 -0
- package/lib/src/business/ap-summary/style/css.js +1 -0
- package/lib/src/business/ap-summary/style/index.d.ts +0 -0
- package/lib/src/business/ap-summary/style/index.js +1 -0
- package/lib/src/business/ap-summary/utils.d.ts +12 -0
- package/lib/src/business/ap-summary/utils.js +1 -0
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/editable-table/utils.js +1 -1
- package/lib/src/hooks/useControllableValue.d.ts +8 -3
- package/lib/src/hooks/useControllableValue.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/utils/slot.d.ts +9 -1
- package/lib/src/utils/slot.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Ce, useSlots as Te, ref as P, computed as s, unref as t, createVNode as f, Fragment as U, watchEffect as Fe, watch as G, openBlock as m, createElementBlock as
|
|
1
|
+
import { defineComponent as Ce, useSlots as Te, ref as P, computed as s, unref as t, createVNode as f, Fragment as U, watchEffect as Fe, watch as G, openBlock as m, createElementBlock as F, normalizeClass as c, normalizeStyle as M, mergeProps as h, createSlots as J, withCtx as w, renderList as Q, createBlock as X, resolveDynamicComponent as xe, renderSlot as S, createCommentVNode as Y, createElementVNode as I, h as Be, normalizeProps as ke, guardReactiveProps as ze } from "vue";
|
|
2
2
|
import { Typography as Pe, Divider as Ie, Button as Ne, Table as Le } from "ant-design-vue";
|
|
3
3
|
import { useToken as Ee } from "ant-design-vue/es/theme/internal";
|
|
4
4
|
import { ApForm as Ke } from "../ap-form/index.mjs";
|
|
@@ -150,22 +150,22 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
150
150
|
const b = Te(), [, te] = Ee(), {
|
|
151
151
|
t: re
|
|
152
152
|
} = ea(), {
|
|
153
|
-
e:
|
|
153
|
+
e: x,
|
|
154
154
|
b: i,
|
|
155
155
|
be: L
|
|
156
156
|
} = aa("ap-table"), E = oa("valueTypeMap"), {
|
|
157
157
|
height: le,
|
|
158
158
|
contentRef: ne
|
|
159
|
-
} = Je(),
|
|
159
|
+
} = Je(), B = P(a.size), u = P([]), K = P([]);
|
|
160
160
|
_e({
|
|
161
161
|
columns: s(() => u.value),
|
|
162
162
|
columnsBackup: s(() => K.value),
|
|
163
|
-
size: s(() =>
|
|
163
|
+
size: s(() => B.value),
|
|
164
164
|
updateColumns(e) {
|
|
165
165
|
u.value = e;
|
|
166
166
|
},
|
|
167
167
|
updateSize(e) {
|
|
168
|
-
|
|
168
|
+
B.value = e;
|
|
169
169
|
}
|
|
170
170
|
});
|
|
171
171
|
const se = () => {
|
|
@@ -233,10 +233,10 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
233
233
|
};
|
|
234
234
|
return n.renderNode = Ge(n, t(E)), n;
|
|
235
235
|
})) || [];
|
|
236
|
-
}), de = s(() => t(u).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), ue = s(() => t(u).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ie = s(() => g(a.dataSource) ?
|
|
236
|
+
}), de = s(() => t(u).filter((e) => e.sorter === !0).map((e) => e.dataIndex).filter(Boolean)), ue = s(() => t(u).filter((e) => e.filters && !e.onFilter).map((e) => e.dataIndex).filter(Boolean)), ie = s(() => g(a.dataSource) ? T.value.records : a.dataSource), {
|
|
237
237
|
rowSelection: R,
|
|
238
|
-
selectedRows:
|
|
239
|
-
...
|
|
238
|
+
selectedRows: v,
|
|
239
|
+
...C
|
|
240
240
|
} = Xe({
|
|
241
241
|
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
242
242
|
rowKey: a.rowKey,
|
|
@@ -247,12 +247,12 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
247
247
|
reset: D,
|
|
248
248
|
tableProps: j,
|
|
249
249
|
refresh: ce,
|
|
250
|
-
data:
|
|
250
|
+
data: T,
|
|
251
251
|
setDataSource: pe
|
|
252
252
|
} = Oe({
|
|
253
253
|
async request(e) {
|
|
254
254
|
var r, l;
|
|
255
|
-
if (!R.value.preserveSelectedRowKeys && g(a.dataSource) &&
|
|
255
|
+
if (!R.value.preserveSelectedRowKeys && g(a.dataSource) && C.clearAll(), !g(a.dataSource))
|
|
256
256
|
return {
|
|
257
257
|
data: a.dataSource || [],
|
|
258
258
|
total: a.dataSource.length || 0
|
|
@@ -275,7 +275,7 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
275
275
|
showTotal: a.pagination ? a.pagination.showTotal : void 0
|
|
276
276
|
}), fe = s(() => {
|
|
277
277
|
var o, r;
|
|
278
|
-
if (a.adaptive && (
|
|
278
|
+
if (a.adaptive && (T.value.total > 0 || ((o = a.dataSource) == null ? void 0 : o.length)))
|
|
279
279
|
return {
|
|
280
280
|
y: t(le),
|
|
281
281
|
x: ((r = a.scroll) == null ? void 0 : r.x) || "100%"
|
|
@@ -322,7 +322,7 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
322
322
|
content: e.ellipsis ? Qe(e, o) : r
|
|
323
323
|
}, null) : r;
|
|
324
324
|
}
|
|
325
|
-
G(() => t(
|
|
325
|
+
G(() => t(T).loading, (e) => {
|
|
326
326
|
var o;
|
|
327
327
|
(o = a.onLoadingChange) == null || o.call(a, e);
|
|
328
328
|
}), G(() => a.dataSource, (e) => {
|
|
@@ -348,16 +348,16 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
348
348
|
setSearchFormValues: he,
|
|
349
349
|
getSearchFormValues: we,
|
|
350
350
|
getShownColumns: Se,
|
|
351
|
-
dataSource: s(() => t(
|
|
351
|
+
dataSource: s(() => t(T).records),
|
|
352
352
|
rowSelection: {
|
|
353
|
-
selectedRows: s(() => t(
|
|
354
|
-
...
|
|
353
|
+
selectedRows: s(() => t(v)),
|
|
354
|
+
...C
|
|
355
355
|
}
|
|
356
|
-
}), (e, o) => (m(),
|
|
356
|
+
}), (e, o) => (m(), F("div", {
|
|
357
357
|
class: c(ge.value)
|
|
358
|
-
}, [t(g)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (m(),
|
|
358
|
+
}, [t(g)(e.dataSource) && e.searchForm !== !1 && O.value.length > 0 ? (m(), F("div", {
|
|
359
359
|
key: 0,
|
|
360
|
-
class: c(e.card ? t(
|
|
360
|
+
class: c(e.card ? t(x)("search-wrapper") : null),
|
|
361
361
|
style: M(e.searchFormWrapperStyle)
|
|
362
362
|
}, [f(t(Ke).SearchForm, h(e.searchForm || {}, {
|
|
363
363
|
ref_key: "formRef",
|
|
@@ -367,7 +367,7 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
367
367
|
onReset: t(D),
|
|
368
368
|
"submit-loading": t(j).loading
|
|
369
369
|
}), J({
|
|
370
|
-
default: w(() => [(m(!0),
|
|
370
|
+
default: w(() => [(m(!0), F(U, null, Q(O.value, (r) => (m(), X(xe(r.renderNode), h({
|
|
371
371
|
key: r.dataIndex,
|
|
372
372
|
ref_for: !0
|
|
373
373
|
}, r.fieldProps || {}, {
|
|
@@ -381,20 +381,20 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
381
381
|
} : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : Y("", !0), I("div", {
|
|
382
382
|
ref_key: "contentRef",
|
|
383
383
|
ref: ne,
|
|
384
|
-
class: c([t(
|
|
384
|
+
class: c([t(x)("table-wrapper"), e.card ? t(x)("table-wrapper-card") : null]),
|
|
385
385
|
style: M(e.tableWrapperStyle)
|
|
386
386
|
}, [I("div", {
|
|
387
387
|
class: c(t(i)("header-wrapper"))
|
|
388
|
-
}, [e.settings ? (m(),
|
|
388
|
+
}, [e.settings ? (m(), F("div", {
|
|
389
389
|
key: 0,
|
|
390
390
|
class: c(t(i)("header"))
|
|
391
391
|
}, [I("div", {
|
|
392
392
|
class: c(t(L)("header", "title"))
|
|
393
393
|
}, [S(e.$slots, "title", h({
|
|
394
|
-
selectedRows: t(
|
|
394
|
+
selectedRows: t(v),
|
|
395
395
|
selectedRowKeys: t(R).selectedRowKeys,
|
|
396
396
|
shownColumns: u.value
|
|
397
|
-
},
|
|
397
|
+
}, C))], 2), b.title ? (m(), X(t(Ie), {
|
|
398
398
|
key: 0,
|
|
399
399
|
type: "vertical"
|
|
400
400
|
})) : Y("", !0), f(ta, {
|
|
@@ -407,20 +407,21 @@ const Ta = /* @__PURE__ */ Ce({
|
|
|
407
407
|
_: 1
|
|
408
408
|
}, 8, ["config"])], 2)) : S(e.$slots, "title", h({
|
|
409
409
|
key: 1,
|
|
410
|
-
selectedRows: t(
|
|
410
|
+
selectedRows: t(v),
|
|
411
411
|
selectedRowKeys: t(R).selectedRowKeys,
|
|
412
412
|
shownColumns: u.value
|
|
413
|
-
},
|
|
413
|
+
}, C))], 2), f(t(Le), h({
|
|
414
414
|
class: t(i)("table")
|
|
415
415
|
}, A.value, {
|
|
416
|
-
size:
|
|
416
|
+
size: B.value,
|
|
417
417
|
"table-layout": me.value,
|
|
418
418
|
columns: u.value,
|
|
419
419
|
onResizeColumn: o[0] || (o[0] = (r, l) => l.width = r)
|
|
420
420
|
}), J({
|
|
421
421
|
summary: w(() => [S(e.$slots, "summary", {
|
|
422
422
|
columns: u.value,
|
|
423
|
-
records: A.value.dataSource
|
|
423
|
+
records: A.value.dataSource,
|
|
424
|
+
selectedRows: t(v)
|
|
424
425
|
})]),
|
|
425
426
|
_: 2
|
|
426
427
|
}, [Q(t(_)(b, ["title", "searchFormExtra", "headerCell", "summary"]), (r, l) => ({
|
|
@@ -5317,11 +5317,7 @@ export declare const apTableFormItemMap: {
|
|
|
5317
5317
|
focus: (options?: InputFocusOptions) => void;
|
|
5318
5318
|
blur: () => void;
|
|
5319
5319
|
input: any;
|
|
5320
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5321
|
-
/**
|
|
5322
|
-
* 不需要渲染到Form表单的valueType字段
|
|
5323
|
-
*/
|
|
5324
|
-
?: "forward" | "backward" | "none") => void;
|
|
5320
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
5325
5321
|
select: () => void;
|
|
5326
5322
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{
|
|
5327
5323
|
label: {
|
|
@@ -5738,11 +5734,7 @@ export declare const apTableFormItemMap: {
|
|
|
5738
5734
|
focus: (options?: InputFocusOptions) => void;
|
|
5739
5735
|
blur: () => void;
|
|
5740
5736
|
input: any;
|
|
5741
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5742
|
-
/**
|
|
5743
|
-
* 不需要渲染到Form表单的valueType字段
|
|
5744
|
-
*/
|
|
5745
|
-
?: "forward" | "backward" | "none") => void;
|
|
5737
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
5746
5738
|
select: () => void;
|
|
5747
5739
|
}, {}, {}, {}, {
|
|
5748
5740
|
disabled: boolean;
|
|
@@ -5958,11 +5950,7 @@ export declare const apTableFormItemMap: {
|
|
|
5958
5950
|
focus: (options?: InputFocusOptions) => void;
|
|
5959
5951
|
blur: () => void;
|
|
5960
5952
|
input: any;
|
|
5961
|
-
setSelectionRange: (start: number, end: number, direction
|
|
5962
|
-
/**
|
|
5963
|
-
* 不需要渲染到Form表单的valueType字段
|
|
5964
|
-
*/
|
|
5965
|
-
?: "forward" | "backward" | "none") => void;
|
|
5953
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
5966
5954
|
select: () => void;
|
|
5967
5955
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
|
|
5968
5956
|
disabled: boolean;
|
|
@@ -11451,6 +11439,9 @@ export declare const apTableRenderItemMap: {
|
|
|
11451
11439
|
type: PropType<boolean>;
|
|
11452
11440
|
default: boolean;
|
|
11453
11441
|
};
|
|
11442
|
+
onBeforeSelect: {
|
|
11443
|
+
type: PropType<(newVal: SelectValue) => boolean | Promise<boolean>>;
|
|
11444
|
+
};
|
|
11454
11445
|
}>> & {
|
|
11455
11446
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
11456
11447
|
}, {
|
|
@@ -11725,6 +11716,9 @@ export declare const apTableRenderItemMap: {
|
|
|
11725
11716
|
type: PropType<boolean>;
|
|
11726
11717
|
default: boolean;
|
|
11727
11718
|
};
|
|
11719
|
+
onBeforeSelect: {
|
|
11720
|
+
type: PropType<(newVal: SelectValue) => boolean | Promise<boolean>>;
|
|
11721
|
+
};
|
|
11728
11722
|
}>> & {
|
|
11729
11723
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
11730
11724
|
}, {
|
|
@@ -12020,6 +12014,9 @@ export declare const apTableRenderItemMap: {
|
|
|
12020
12014
|
type: PropType<boolean>;
|
|
12021
12015
|
default: boolean;
|
|
12022
12016
|
};
|
|
12017
|
+
onBeforeSelect: {
|
|
12018
|
+
type: PropType<(newVal: SelectValue) => boolean | Promise<boolean>>;
|
|
12019
|
+
};
|
|
12023
12020
|
}>> & {
|
|
12024
12021
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
12025
12022
|
}, {
|
|
@@ -12316,6 +12313,9 @@ export declare const apTableRenderItemMap: {
|
|
|
12316
12313
|
type: PropType<boolean>;
|
|
12317
12314
|
default: boolean;
|
|
12318
12315
|
};
|
|
12316
|
+
onBeforeSelect: {
|
|
12317
|
+
type: PropType<(newVal: SelectValue) => boolean | Promise<boolean>>;
|
|
12318
|
+
};
|
|
12319
12319
|
}>> & {
|
|
12320
12320
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
12321
12321
|
}, {
|
|
@@ -14063,11 +14063,7 @@ export declare const apTableRenderItemMap: {
|
|
|
14063
14063
|
focus: (options?: InputFocusOptions) => void;
|
|
14064
14064
|
blur: () => void;
|
|
14065
14065
|
input: any;
|
|
14066
|
-
setSelectionRange: (start: number, end: number, direction
|
|
14067
|
-
/**
|
|
14068
|
-
* 不需要渲染到Form表单的valueType字段
|
|
14069
|
-
*/
|
|
14070
|
-
?: "forward" | "backward" | "none") => void;
|
|
14066
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
14071
14067
|
select: () => void;
|
|
14072
14068
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
14073
14069
|
"update:value": (...args: any[]) => void;
|
|
@@ -14377,11 +14373,7 @@ export declare const apTableRenderItemMap: {
|
|
|
14377
14373
|
focus: (options?: InputFocusOptions) => void;
|
|
14378
14374
|
blur: () => void;
|
|
14379
14375
|
input: any;
|
|
14380
|
-
setSelectionRange: (start: number, end: number, direction
|
|
14381
|
-
/**
|
|
14382
|
-
* 不需要渲染到Form表单的valueType字段
|
|
14383
|
-
*/
|
|
14384
|
-
?: "forward" | "backward" | "none") => void;
|
|
14376
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
14385
14377
|
select: () => void;
|
|
14386
14378
|
}, {}, {}, {}, {
|
|
14387
14379
|
type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "tel" | "url" | "email" | "image" | "datetime-local" | "file" | "password";
|
|
@@ -14542,11 +14534,7 @@ export declare const apTableRenderItemMap: {
|
|
|
14542
14534
|
focus: (options?: InputFocusOptions) => void;
|
|
14543
14535
|
blur: () => void;
|
|
14544
14536
|
input: any;
|
|
14545
|
-
setSelectionRange: (start: number, end: number, direction
|
|
14546
|
-
/**
|
|
14547
|
-
* 不需要渲染到Form表单的valueType字段
|
|
14548
|
-
*/
|
|
14549
|
-
?: "forward" | "backward" | "none") => void;
|
|
14537
|
+
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
14550
14538
|
select: () => void;
|
|
14551
14539
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
14552
14540
|
"update:value": (...args: any[]) => void;
|
|
@@ -1132,7 +1132,17 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
|
|
|
1132
1132
|
default: () => {};
|
|
1133
1133
|
};
|
|
1134
1134
|
}>>, {
|
|
1135
|
-
focus: (options
|
|
1135
|
+
focus: (options
|
|
1136
|
+
/**
|
|
1137
|
+
* 解析数值
|
|
1138
|
+
* @param t 值类型
|
|
1139
|
+
* @param value 值
|
|
1140
|
+
*/
|
|
1141
|
+
? /**
|
|
1142
|
+
* 解析数值
|
|
1143
|
+
* @param t 值类型
|
|
1144
|
+
* @param value 值
|
|
1145
|
+
*/: InputFocusOptions) => void;
|
|
1136
1146
|
blur: () => void;
|
|
1137
1147
|
input: any;
|
|
1138
1148
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
@@ -1549,7 +1559,17 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
|
|
|
1549
1559
|
default: () => {};
|
|
1550
1560
|
};
|
|
1551
1561
|
}>>, {
|
|
1552
|
-
focus: (options
|
|
1562
|
+
focus: (options
|
|
1563
|
+
/**
|
|
1564
|
+
* 解析数值
|
|
1565
|
+
* @param t 值类型
|
|
1566
|
+
* @param value 值
|
|
1567
|
+
*/
|
|
1568
|
+
? /**
|
|
1569
|
+
* 解析数值
|
|
1570
|
+
* @param t 值类型
|
|
1571
|
+
* @param value 值
|
|
1572
|
+
*/: InputFocusOptions) => void;
|
|
1553
1573
|
blur: () => void;
|
|
1554
1574
|
input: any;
|
|
1555
1575
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
@@ -1765,7 +1785,17 @@ export declare function getSearchFormItemRenderNode(item: any, extraRenderMap?:
|
|
|
1765
1785
|
default: () => {};
|
|
1766
1786
|
};
|
|
1767
1787
|
}>>, {
|
|
1768
|
-
focus: (options
|
|
1788
|
+
focus: (options
|
|
1789
|
+
/**
|
|
1790
|
+
* 解析数值
|
|
1791
|
+
* @param t 值类型
|
|
1792
|
+
* @param value 值
|
|
1793
|
+
*/
|
|
1794
|
+
? /**
|
|
1795
|
+
* 解析数值
|
|
1796
|
+
* @param t 值类型
|
|
1797
|
+
* @param value 值
|
|
1798
|
+
*/: InputFocusOptions) => void;
|
|
1769
1799
|
blur: () => void;
|
|
1770
1800
|
input: any;
|
|
1771
1801
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { isObject as
|
|
3
|
-
import { apTableRenderItemMap as
|
|
4
|
-
import { isType as
|
|
1
|
+
import { isVNode as b, createVNode as s, mergeProps as a, cloneVNode as y, Fragment as g } from "vue";
|
|
2
|
+
import { isObject as f, isArray as p, isUndefined as h, isFunction as d, omit as j, isBoolean as F, isString as O } from "lodash-unified";
|
|
3
|
+
import { apTableRenderItemMap as E, apTableFormItemMap as x } from "./constants.mjs";
|
|
4
|
+
import { isType as N } from "@fruits-chain/utils";
|
|
5
5
|
import "../ap-form/index.mjs";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { QuestionCircleOutlined as
|
|
8
|
-
import
|
|
9
|
-
function
|
|
10
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
6
|
+
import { Tooltip as S } from "ant-design-vue";
|
|
7
|
+
import { QuestionCircleOutlined as I } from "@ant-design/icons-vue";
|
|
8
|
+
import v from "../ap-form/item/index.vue.mjs";
|
|
9
|
+
function P(t) {
|
|
10
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !b(t);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const V = (t, e, n) => {
|
|
13
13
|
let r = {};
|
|
14
|
-
return
|
|
15
|
-
|
|
14
|
+
return f(t) ? Object.keys(t).forEach((o) => {
|
|
15
|
+
f(t[o]) ? r[o] = V(t[o], e[o], n) : r[o] = n(t[o], e);
|
|
16
16
|
}) : r = n(t, e), r;
|
|
17
|
-
},
|
|
17
|
+
}, Q = (t, e) => {
|
|
18
18
|
switch (t) {
|
|
19
19
|
case "dayjs":
|
|
20
20
|
return e.valueOf();
|
|
@@ -26,7 +26,7 @@ const v = (t, e, n) => {
|
|
|
26
26
|
}
|
|
27
27
|
case "multiple":
|
|
28
28
|
case "multipleNumber":
|
|
29
|
-
return
|
|
29
|
+
return p(e) ? e : [e];
|
|
30
30
|
case "boolean":
|
|
31
31
|
return e;
|
|
32
32
|
case "object":
|
|
@@ -35,15 +35,15 @@ const v = (t, e, n) => {
|
|
|
35
35
|
return e;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
function
|
|
39
|
-
return
|
|
38
|
+
function U(t) {
|
|
39
|
+
return p(t) ? t.join(".") : t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function w(t) {
|
|
42
42
|
const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
43
43
|
return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
const e = [], n =
|
|
45
|
+
const A = (t) => w(t) === "map" ? t : new Map(Object.entries(t || {})), m = (t) => {
|
|
46
|
+
const e = [], n = A(t);
|
|
47
47
|
return n.forEach((r, o) => {
|
|
48
48
|
const i = n.get(o) || n.get(`${o}`);
|
|
49
49
|
if (i) {
|
|
@@ -63,7 +63,7 @@ const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
}), e;
|
|
66
|
-
},
|
|
66
|
+
}, z = (t) => h(t) || t < 0 ? 0 : t, G = (t, e, n) => {
|
|
67
67
|
if (n)
|
|
68
68
|
return n;
|
|
69
69
|
const r = ["select", "date"], o = ["text", "textArea", "number"];
|
|
@@ -74,74 +74,74 @@ const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
|
|
|
74
74
|
if (o.includes(e))
|
|
75
75
|
return t("ap.common.inputText");
|
|
76
76
|
};
|
|
77
|
-
function
|
|
78
|
-
return !t || !
|
|
77
|
+
function C(t, e) {
|
|
78
|
+
return !t || !d(t) ? t : t(e);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function K(t) {
|
|
81
81
|
let e = t.valueType || "text";
|
|
82
82
|
return t.valueEnum && (e = "status"), e;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
var
|
|
86
|
-
const o =
|
|
84
|
+
function X(t, e, n, r) {
|
|
85
|
+
var u;
|
|
86
|
+
const o = E[t];
|
|
87
87
|
if (o)
|
|
88
|
-
return
|
|
88
|
+
return s(o, a(e, {
|
|
89
89
|
mode: "read"
|
|
90
90
|
}), null);
|
|
91
91
|
const i = r == null ? void 0 : r[t];
|
|
92
|
-
return ((
|
|
92
|
+
return ((u = i == null ? void 0 : i.render) == null ? void 0 : u.call(i, e.value, n, e)) || e.value;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Y(t, e) {
|
|
95
95
|
if (t.customRenderFormItem)
|
|
96
96
|
return () => {
|
|
97
97
|
const o = t.customRenderFormItem(t);
|
|
98
|
-
return
|
|
98
|
+
return y(o, {
|
|
99
99
|
...t.fieldProps,
|
|
100
100
|
span: t.span,
|
|
101
101
|
...o.props || {}
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
|
-
const n =
|
|
104
|
+
const n = x[t.valueType];
|
|
105
105
|
if (n)
|
|
106
106
|
return n;
|
|
107
107
|
const r = e == null ? void 0 : e[t.valueType];
|
|
108
108
|
return () => {
|
|
109
109
|
var i;
|
|
110
110
|
const o = (i = r == null ? void 0 : r.renderFormItem) == null ? void 0 : i.call(r, t.fieldProps.field);
|
|
111
|
-
return o ?
|
|
111
|
+
return o ? s(v, a(t.fieldProps, {
|
|
112
112
|
span: t.span
|
|
113
|
-
}),
|
|
113
|
+
}), P(o) ? o : {
|
|
114
114
|
default: () => [o]
|
|
115
115
|
}) : null;
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
const n =
|
|
118
|
+
function Z(t, e) {
|
|
119
|
+
const n = C(t.fieldProps, e), r = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", i = t.valueType === "index", u = o ? {
|
|
120
120
|
checked: e.value
|
|
121
121
|
} : {
|
|
122
122
|
value: i ? e.index + 1 : e.value
|
|
123
123
|
};
|
|
124
124
|
return t.valueEnum && (r.valueEnum = t.valueEnum), {
|
|
125
|
-
...
|
|
126
|
-
...
|
|
125
|
+
...j(r, ["request"]),
|
|
126
|
+
...u
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function k(t) {
|
|
130
130
|
const e = {
|
|
131
131
|
...t
|
|
132
132
|
};
|
|
133
|
-
return
|
|
133
|
+
return F(t.filters) && t.filters && t.valueEnum && (e.filters = m(t.valueEnum)), e;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function H(t, e) {
|
|
136
136
|
var r;
|
|
137
137
|
const n = e || {};
|
|
138
138
|
return t.valueEnum && !((r = n.field) != null && r.options) && (n.field = {
|
|
139
139
|
...n.field,
|
|
140
|
-
options:
|
|
140
|
+
options: m(t.valueEnum)
|
|
141
141
|
}), n;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
if (!
|
|
143
|
+
function M(t) {
|
|
144
|
+
if (!N("Object")(t))
|
|
145
145
|
return t;
|
|
146
146
|
try {
|
|
147
147
|
return JSON.stringify(t);
|
|
@@ -149,51 +149,51 @@ function Z(t) {
|
|
|
149
149
|
return t;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function tt(t, e, n, r) {
|
|
153
153
|
const o = n == null ? void 0 : n({
|
|
154
154
|
title: t.title,
|
|
155
155
|
column: t
|
|
156
|
-
});
|
|
157
|
-
if (o &&
|
|
156
|
+
}), i = (o == null ? void 0 : o.filter((T) => T.type !== Symbol.for("v-cmt"))) || [];
|
|
157
|
+
if (o && i.length > 0)
|
|
158
158
|
return o;
|
|
159
|
-
const
|
|
159
|
+
const l = O(t.title) ? s("span", {
|
|
160
160
|
class: e,
|
|
161
161
|
title: t.title
|
|
162
|
-
}, [t.title]) : t.title,
|
|
163
|
-
return
|
|
162
|
+
}, [t.title]) : t.title, c = t.tooltip ? d(t.tooltip) ? t.tooltip(t) : s(g, null, [t.tooltip]) : null;
|
|
163
|
+
return c ? s("span", {
|
|
164
164
|
style: {
|
|
165
165
|
display: "inline-flex",
|
|
166
166
|
alignItems: "center",
|
|
167
167
|
maxWidth: "100%"
|
|
168
168
|
}
|
|
169
|
-
}, [
|
|
170
|
-
title:
|
|
169
|
+
}, [l, s(S, {
|
|
170
|
+
title: c,
|
|
171
171
|
placement: "bottom"
|
|
172
172
|
}, {
|
|
173
|
-
default: () => [
|
|
173
|
+
default: () => [s(I, {
|
|
174
174
|
style: {
|
|
175
175
|
padding: "4px",
|
|
176
176
|
color: r,
|
|
177
177
|
verticalAlign: "middle"
|
|
178
178
|
}
|
|
179
179
|
}, null)]
|
|
180
|
-
})]) :
|
|
180
|
+
})]) : l;
|
|
181
181
|
}
|
|
182
182
|
export {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
183
|
+
k as apColumnToColumn,
|
|
184
|
+
U as dataIndexToStr,
|
|
185
|
+
V as formatParamsValueType,
|
|
186
|
+
z as getColumnOrder,
|
|
187
|
+
C as getFieldProps,
|
|
188
|
+
G as getPlaceholder,
|
|
189
|
+
Y as getSearchFormItemRenderNode,
|
|
190
|
+
X as getTableCellRenderNode,
|
|
191
|
+
Z as getTableRenderProps,
|
|
192
|
+
K as getTableRenderType,
|
|
193
|
+
tt as getTableTitle,
|
|
194
|
+
A as objectToMap,
|
|
195
|
+
M as objectToString,
|
|
196
|
+
Q as parseFieldValue,
|
|
197
|
+
H as updateFormProps,
|
|
198
|
+
m as valueEnumToArray
|
|
199
199
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ApSummaryProps } from './interface';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApSummaryProps>, {
|
|
4
|
+
summaryTitle: string;
|
|
5
|
+
hasSelect: boolean;
|
|
6
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApSummaryProps>, {
|
|
7
|
+
summaryTitle: string;
|
|
8
|
+
hasSelect: boolean;
|
|
9
|
+
}>>>, {
|
|
10
|
+
summaryTitle: string;
|
|
11
|
+
hasSelect: boolean;
|
|
12
|
+
}, {}>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithDefaults<P, D> = {
|
|
15
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
16
|
+
default: D[K];
|
|
17
|
+
}> : P[K];
|
|
18
|
+
};
|
|
19
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
+
type __VLS_TypePropsToOption<T> = {
|
|
21
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
+
} : {
|
|
24
|
+
type: PropType<T[K]>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
type __VLS_PrettifyLocal<T> = {
|
|
29
|
+
[K in keyof T]: T[K];
|
|
30
|
+
} & {};
|