vft 0.0.455 → 0.0.457
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/dist/index.css +2 -2
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/loading/index.d.ts +3 -3
- package/es/components/loading/loading.js +1 -1
- package/es/components/loading/types.d.ts +2 -1
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/table/index.d.ts +9 -0
- package/es/components/table/table.vue2.js +123 -107
- package/es/components/table/types.d.ts +2 -0
- package/es/components/table/use/use-data-source.js +45 -46
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/loading/index.d.ts +3 -3
- package/lib/components/loading/loading.cjs +1 -1
- package/lib/components/loading/types.d.ts +2 -1
- package/lib/components/table/index.d.ts +9 -0
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/types.d.ts +2 -0
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/theme-style/base.css +2 -2
- package/theme-style/index.css +2 -2
- package/theme-style/src/common/help.scss +17 -0
- package/theme-style/src/common/transition.scss +10 -0
- package/theme-style/src/common/var.scss +3 -3
- package/theme-style/src/loading.scss +25 -0
- package/theme-style/src/spinner.scss +3 -3
- package/theme-style/src/table.scss +5 -0
- package/theme-style/vft-collapse.css +1 -1
- package/theme-style/vft-date-picker.css +1 -1
- package/theme-style/vft-input.css +1 -1
- package/theme-style/vft-loading.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-spinner.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/theme-style/vft-tabs.css +1 -1
- package/theme-style/vft-time-picker.css +1 -1
- package/theme-style/vft-time-select.css +1 -1
- package/theme-style/vft-tree.css +1 -1
- package/theme-style/vft-var.css +1 -1
- package/web-types.json +1 -1
|
@@ -11,7 +11,7 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
11
11
|
import { useOrderedChildren as ge } from "../../hooks/use-ordered-children/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import {
|
|
14
|
+
import { CAROUSEL_ITEM_NAME as H, carouselContextKey as Se } from "./constants.js";
|
|
15
15
|
const L = 300, ze = (t, O, M) => {
|
|
16
16
|
const {
|
|
17
17
|
children: o,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { keysOf as f } from "@vft/utils";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import { debugWarn as v } from "../../../utils/error.js";
|
|
4
|
-
import {
|
|
4
|
+
import { getCurrentInstance as l, computed as i, unref as p, provide as g, ref as C, inject as x } from "vue";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../../form/index.js";
|
|
7
7
|
import { namespaceContextKey as I, useNamespace as b, defaultNamespace as y } from "../../../hooks/use-namespace/index.js";
|
|
@@ -9,7 +9,7 @@ import "../../../hooks/use-model-toggle/index.js";
|
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import { zIndexContextKey as G, useZIndex as z, defaultInitialZIndex as K } from "../../../hooks/use-z-index/index.js";
|
|
11
11
|
import { configProviderContextKey as m } from "../constants.js";
|
|
12
|
-
const a =
|
|
12
|
+
const a = C();
|
|
13
13
|
function d(o, e = void 0) {
|
|
14
14
|
const n = l() ? x(m, a) : a;
|
|
15
15
|
return o ? i(() => n?.value?.[o] ?? e) : n;
|
|
@@ -27,7 +27,7 @@ function B(o) {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
const S = (o, e, n = !1) => {
|
|
30
|
-
const t = !!l(), r = t ? d() : void 0, u = e?.provide ?? (t ?
|
|
30
|
+
const t = !!l(), r = t ? d() : void 0, u = e?.provide ?? (t ? g : void 0);
|
|
31
31
|
if (!u) {
|
|
32
32
|
v(
|
|
33
33
|
"provideGlobalConfig",
|
|
@@ -13,8 +13,8 @@ import "../../hooks/use-z-index/index.js";
|
|
|
13
13
|
import { UPDATE_MODEL_EVENT as Q } from "@vft/constants";
|
|
14
14
|
import { useAttrs as Ze, useCursor as _e } from "@vft/use";
|
|
15
15
|
import { calcTextareaHeight as he } from "./utils.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { useFormSize as et, useFormDisabled as tt } from "../form/hooks/use-form-common-props.js";
|
|
17
|
+
import { useFormItem as at, useFormItemInputId as nt } from "../form/hooks/use-form-item.js";
|
|
18
18
|
const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"], st = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"], It = /* @__PURE__ */ Oe({
|
|
19
19
|
__name: "input",
|
|
20
20
|
props: {
|
|
@@ -85,9 +85,9 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
|
|
|
85
85
|
n.is("focus", v.value)
|
|
86
86
|
]), d = Ze({
|
|
87
87
|
excludeKeys: l(() => Object.keys(X.value))
|
|
88
|
-
}), { form: Ce, formItem: F } =
|
|
88
|
+
}), { form: Ce, formItem: F } = at(), { inputId: Y } = nt(we.props, {
|
|
89
89
|
formItemContext: F
|
|
90
|
-
}), ke =
|
|
90
|
+
}), ke = et(), x = tt(), n = ye("input"), Z = ye("textarea"), M = H(), p = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || p.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
|
|
91
91
|
icon: "icon-circle-close",
|
|
92
92
|
size: 16
|
|
93
93
|
})), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
|
|
2
2
|
import { EVENT_CODE as g } from "../../../constants/aria.js";
|
|
3
|
-
import { CHANGE_EVENT as i,
|
|
3
|
+
import { CHANGE_EVENT as i, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import { isUndefined as K } from "@vft/utils";
|
|
6
6
|
import { debugWarn as C } from "../../../utils/error.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { App } from 'vue';
|
|
2
|
-
import { vLoading, createLoadingDirective } from './directive';
|
|
2
|
+
import { vLoading, createLoadingDirective, type LoadingBinding } from './directive';
|
|
3
3
|
import { Loading } from './service';
|
|
4
4
|
export declare const VftLoading: {
|
|
5
5
|
install(app: App): void;
|
|
6
|
-
directive: import("vue").Directive<import("./directive").VftLoading,
|
|
6
|
+
directive: import("vue").Directive<import("./directive").VftLoading, LoadingBinding>;
|
|
7
7
|
service: (options?: import("./types").LoadingOptions) => import("./loading").LoadingInstance;
|
|
8
8
|
};
|
|
9
9
|
export default VftLoading;
|
|
10
|
-
export { vLoading as VftLoadingDirective, Loading as VftLoadingService, vLoading, createLoadingDirective };
|
|
10
|
+
export { vLoading as VftLoadingDirective, Loading as VftLoadingService, vLoading, createLoadingDirective, type LoadingBinding, };
|
|
11
11
|
export * from './types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IconProps } from 'vft/es/components/icon';
|
|
2
2
|
import type { MaybeRef } from '@vueuse/core';
|
|
3
|
+
import type { VNode } from 'vue';
|
|
3
4
|
export type LoadingOptionsResolved = {
|
|
4
5
|
parent: LoadingParentElement;
|
|
5
6
|
background: MaybeRef<string>;
|
|
@@ -8,7 +9,7 @@ export type LoadingOptionsResolved = {
|
|
|
8
9
|
spinner: MaybeRef<boolean | string>;
|
|
9
10
|
img: MaybeRef<boolean | string>;
|
|
10
11
|
icon: MaybeRef<IconProps | string>;
|
|
11
|
-
text: MaybeRef<string>;
|
|
12
|
+
text: MaybeRef<string | VNode | VNode[]>;
|
|
12
13
|
fullscreen: boolean;
|
|
13
14
|
rotate: MaybeRef<boolean | string>;
|
|
14
15
|
lock: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as X, computed as j, ref as re, unref as c, useSlots as oe, createVNode as a, mergeProps as q, withDirectives as ie, vShow as ne,
|
|
1
|
+
import { defineComponent as X, computed as j, ref as re, unref as c, useSlots as oe, createVNode as a, mergeProps as q, withDirectives as ie, vShow as ne, isVNode as le, createTextVNode as O, resolveComponent as N } from "vue";
|
|
2
2
|
import "../alert/index.js";
|
|
3
3
|
import "../avatar/index.js";
|
|
4
4
|
import "../avatar-stack/index.js";
|
|
@@ -69,6 +69,9 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
69
69
|
emptyCfg: {
|
|
70
70
|
type: import("vue").PropType<import("vft/es/vft").EmptyProps>;
|
|
71
71
|
};
|
|
72
|
+
loadingCfg: {
|
|
73
|
+
type: import("vue").PropType<import("vft/es/vft").LoadingBinding>;
|
|
74
|
+
};
|
|
72
75
|
layouts: {
|
|
73
76
|
type: import("vue").PropType<import("vxe-table").VxeGridPropTypes.Layouts>;
|
|
74
77
|
};
|
|
@@ -982,6 +985,9 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
982
985
|
emptyCfg: {
|
|
983
986
|
type: import("vue").PropType<import("vft/es/vft").EmptyProps>;
|
|
984
987
|
};
|
|
988
|
+
loadingCfg: {
|
|
989
|
+
type: import("vue").PropType<import("vft/es/vft").LoadingBinding>;
|
|
990
|
+
};
|
|
985
991
|
layouts: {
|
|
986
992
|
type: import("vue").PropType<import("vxe-table").VxeGridPropTypes.Layouts>;
|
|
987
993
|
};
|
|
@@ -1779,6 +1785,9 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
1779
1785
|
emptyCfg: {
|
|
1780
1786
|
type: import("vue").PropType<import("vft/es/vft").EmptyProps>;
|
|
1781
1787
|
};
|
|
1788
|
+
loadingCfg: {
|
|
1789
|
+
type: import("vue").PropType<import("vft/es/vft").LoadingBinding>;
|
|
1790
|
+
};
|
|
1782
1791
|
layouts: {
|
|
1783
1792
|
type: import("vue").PropType<import("vxe-table").VxeGridPropTypes.Layouts>;
|
|
1784
1793
|
};
|
|
@@ -1,42 +1,40 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftEmpty as
|
|
3
|
-
import { vLoading as
|
|
4
|
-
import { deepMerge as
|
|
5
|
-
import { FormCompEnum as
|
|
1
|
+
import { defineComponent as V, createVNode as c, useAttrs as ae, ref as g, getCurrentInstance as te, computed as D, unref as e, watch as oe, nextTick as le, toRaw as re, createBlock as m, openBlock as p, withCtx as i, createElementVNode as H, normalizeClass as ne, createCommentVNode as F, mergeProps as T, withDirectives as ce, vShow as ie, renderSlot as h, normalizeProps as se, guardReactiveProps as ge, createTextVNode as de } from "vue";
|
|
2
|
+
import { VftEmpty as ue } from "../empty/index.js";
|
|
3
|
+
import { vLoading as fe } from "../loading/directive.js";
|
|
4
|
+
import { deepMerge as _, isClient as me, omit as pe, isFunction as he } from "@vft/utils";
|
|
5
|
+
import { FormCompEnum as be } from "../../utils/form-register.js";
|
|
6
6
|
import "@vueuse/core";
|
|
7
7
|
import "../config-provider/hooks/use-global-config.js";
|
|
8
8
|
import "lodash-es";
|
|
9
|
-
import { useForm as
|
|
10
|
-
import { useNamespace as
|
|
9
|
+
import { useForm as Ce } from "../super-form/use/use-form.js";
|
|
10
|
+
import { useNamespace as ye } from "../../hooks/use-namespace/index.js";
|
|
11
11
|
import "../../hooks/use-model-toggle/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
14
|
import "../icon/index.js";
|
|
15
|
-
import { VftClientOnly as
|
|
16
|
-
import { VftPagination as
|
|
17
|
-
import { VftSkeleton as
|
|
18
|
-
import { VftSuperForm as
|
|
19
|
-
import { VxeGrid as
|
|
20
|
-
import
|
|
21
|
-
import { PageSize as
|
|
22
|
-
import { useColumns as
|
|
23
|
-
import { useDataSource as
|
|
24
|
-
import { useLoading as
|
|
25
|
-
import { usePagination as
|
|
26
|
-
import { EmptyEnum as
|
|
27
|
-
const
|
|
28
|
-
"vft-loading-text": "加载中..."
|
|
29
|
-
}, De = N({
|
|
15
|
+
import { VftClientOnly as we } from "../client-only/index.js";
|
|
16
|
+
import { VftPagination as ve } from "../pagination/index.js";
|
|
17
|
+
import { VftSkeleton as xe } from "../skeleton/index.js";
|
|
18
|
+
import { VftSuperForm as ke } from "../super-form/index.js";
|
|
19
|
+
import { VxeGrid as Se } from "vxe-table";
|
|
20
|
+
import Be from "xe-utils";
|
|
21
|
+
import { PageSize as N } from "./constants.js";
|
|
22
|
+
import { useColumns as ze } from "./use/use-columns.js";
|
|
23
|
+
import { useDataSource as Re } from "./use/use-data-source.js";
|
|
24
|
+
import { useLoading as Pe } from "./use/use-loading.js";
|
|
25
|
+
import { usePagination as De } from "./use/use-pagination.js";
|
|
26
|
+
import { EmptyEnum as He } from "../empty/constants.js";
|
|
27
|
+
const Fe = V({
|
|
30
28
|
name: "vft-table"
|
|
31
|
-
}),
|
|
32
|
-
...
|
|
29
|
+
}), ra = /* @__PURE__ */ V({
|
|
30
|
+
...Fe,
|
|
33
31
|
props: {
|
|
34
32
|
sticky: {
|
|
35
33
|
type: [Boolean, Object]
|
|
36
34
|
},
|
|
37
35
|
api: {},
|
|
38
36
|
pageSize: {
|
|
39
|
-
default:
|
|
37
|
+
default: N
|
|
40
38
|
},
|
|
41
39
|
total: {},
|
|
42
40
|
rowkey: {
|
|
@@ -81,7 +79,16 @@ const He = {
|
|
|
81
79
|
onChange: {},
|
|
82
80
|
emptyCfg: {
|
|
83
81
|
default: () => ({
|
|
84
|
-
type:
|
|
82
|
+
type: He.NoData
|
|
83
|
+
})
|
|
84
|
+
},
|
|
85
|
+
loadingCfg: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: () => ({
|
|
88
|
+
customClass: "vft-card-loading",
|
|
89
|
+
text: c("div", null, [c("span", null, [de("加载中")]), c("span", {
|
|
90
|
+
class: "dot"
|
|
91
|
+
}, null)])
|
|
85
92
|
})
|
|
86
93
|
},
|
|
87
94
|
layouts: {},
|
|
@@ -393,26 +400,26 @@ const He = {
|
|
|
393
400
|
"toolbar-tool-click",
|
|
394
401
|
"zoom"
|
|
395
402
|
],
|
|
396
|
-
setup(
|
|
397
|
-
expose:
|
|
398
|
-
emit:
|
|
403
|
+
setup(Te, {
|
|
404
|
+
expose: A,
|
|
405
|
+
emit: E
|
|
399
406
|
}) {
|
|
400
|
-
const
|
|
407
|
+
const n = E, d = ye("table"), O = ae(), b = g(), C = g(), q = g([]), u = g(), M = te(), t = D(() => _(M.props, e(u))), {
|
|
401
408
|
getLoading: $,
|
|
402
|
-
setLoading:
|
|
403
|
-
} =
|
|
404
|
-
getPaginationInfo:
|
|
405
|
-
setPagination:
|
|
409
|
+
setLoading: L
|
|
410
|
+
} = Pe(t), {
|
|
411
|
+
getPaginationInfo: s,
|
|
412
|
+
setPagination: f,
|
|
406
413
|
getCurrentPage: G
|
|
407
|
-
} =
|
|
414
|
+
} = De(t), {
|
|
408
415
|
getViewColumns: I,
|
|
409
416
|
setColumns: K
|
|
410
|
-
} =
|
|
417
|
+
} = ze(t);
|
|
411
418
|
oe(() => G(), (a) => {
|
|
412
419
|
le(() => {
|
|
413
420
|
y({
|
|
414
421
|
seqConfig: {
|
|
415
|
-
startIndex: (a - 1) * (
|
|
422
|
+
startIndex: (a - 1) * (s.value?.pageSize || e(t).pageSize || N)
|
|
416
423
|
}
|
|
417
424
|
});
|
|
418
425
|
});
|
|
@@ -420,39 +427,39 @@ const He = {
|
|
|
420
427
|
immediate: !0
|
|
421
428
|
});
|
|
422
429
|
function y(a) {
|
|
423
|
-
|
|
424
|
-
...e(
|
|
430
|
+
u.value = {
|
|
431
|
+
...e(u),
|
|
425
432
|
...a
|
|
426
433
|
};
|
|
427
434
|
}
|
|
428
435
|
const {
|
|
429
436
|
getDataSourceRef: w,
|
|
430
|
-
handleTableChange:
|
|
431
|
-
reload:
|
|
432
|
-
deleteTableDataRecord:
|
|
433
|
-
insertTableDataRecord:
|
|
437
|
+
handleTableChange: X,
|
|
438
|
+
reload: v,
|
|
439
|
+
deleteTableDataRecord: j,
|
|
440
|
+
insertTableDataRecord: Y,
|
|
434
441
|
updateTableData: W,
|
|
435
442
|
updateTableDataRecord: U,
|
|
436
|
-
setTableData:
|
|
443
|
+
setTableData: x,
|
|
437
444
|
getDataSource: J,
|
|
438
|
-
getRawDataSource:
|
|
439
|
-
tableSearch:
|
|
440
|
-
} =
|
|
441
|
-
tableData:
|
|
442
|
-
setLoading:
|
|
443
|
-
getPaginationInfo:
|
|
444
|
-
setPagination:
|
|
445
|
-
},
|
|
446
|
-
function
|
|
447
|
-
a?.pageSize &&
|
|
445
|
+
getRawDataSource: k,
|
|
446
|
+
tableSearch: S
|
|
447
|
+
} = Re(t, {
|
|
448
|
+
tableData: q,
|
|
449
|
+
setLoading: L,
|
|
450
|
+
getPaginationInfo: s,
|
|
451
|
+
setPagination: f
|
|
452
|
+
}, n);
|
|
453
|
+
function B(a) {
|
|
454
|
+
a?.pageSize && f({
|
|
448
455
|
currentPage: 1
|
|
449
|
-
}),
|
|
456
|
+
}), X(a), n("change", a);
|
|
450
457
|
const {
|
|
451
458
|
onChange: o
|
|
452
459
|
} = e(t);
|
|
453
|
-
o &&
|
|
460
|
+
o && he(o) && o(a);
|
|
454
461
|
}
|
|
455
|
-
const
|
|
462
|
+
const z = {};
|
|
456
463
|
[
|
|
457
464
|
"update:data",
|
|
458
465
|
"keydown-start",
|
|
@@ -574,57 +581,66 @@ const He = {
|
|
|
574
581
|
"toolbar-tool-click",
|
|
575
582
|
"zoom"
|
|
576
583
|
].forEach((a) => {
|
|
577
|
-
const o =
|
|
578
|
-
|
|
584
|
+
const o = Be.camelCase(`on-${a}`);
|
|
585
|
+
z[o] = (...r) => n(a, ...r);
|
|
579
586
|
});
|
|
580
|
-
const
|
|
587
|
+
const l = D(() => {
|
|
581
588
|
const a = e(w), o = {
|
|
582
|
-
...
|
|
589
|
+
...O,
|
|
583
590
|
...e(t),
|
|
584
591
|
columns: re(e(I)),
|
|
585
592
|
loading: e($),
|
|
586
593
|
data: a,
|
|
587
|
-
...
|
|
594
|
+
...z
|
|
588
595
|
};
|
|
589
|
-
if (
|
|
596
|
+
if (me) {
|
|
590
597
|
(e(t)?.addMaxHeight || e(t)?.maxHeight) && (o.maxHeight = e(t)?.maxHeight ? e(t)?.maxHeight : `${window.innerHeight - e(t)?.extraSysHeight - (t.value?.showPager ? t.value?.pageHeight || 40 : 0)}px`);
|
|
591
|
-
const
|
|
592
|
-
o.minHeight =
|
|
598
|
+
const r = e(t)?.minHeight;
|
|
599
|
+
o.minHeight = r || (r !== 0 && e(t)?.toolbarConfig?.custom ? 300 : void 0);
|
|
593
600
|
}
|
|
594
|
-
return o
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
601
|
+
return e(t)?.toolbarConfig?.refresh && (o.proxyConfig = e(t)?.proxyConfig || {
|
|
602
|
+
response: {
|
|
603
|
+
result: e(t)?.fetchSetting?.listField,
|
|
604
|
+
total: e(t)?.fetchSetting?.totalField
|
|
605
|
+
},
|
|
606
|
+
autoLoad: !1,
|
|
607
|
+
ajax: {
|
|
608
|
+
query: async () => await v()
|
|
609
|
+
}
|
|
610
|
+
}), o;
|
|
611
|
+
}), R = {
|
|
612
|
+
setPagination: f,
|
|
613
|
+
emit: n,
|
|
598
614
|
setProps: y,
|
|
599
|
-
reload:
|
|
600
|
-
deleteTableDataRecord:
|
|
601
|
-
insertTableDataRecord:
|
|
615
|
+
reload: v,
|
|
616
|
+
deleteTableDataRecord: j,
|
|
617
|
+
insertTableDataRecord: Y,
|
|
602
618
|
updateTableDataRecord: U,
|
|
603
619
|
updateTableData: W,
|
|
604
|
-
setTableData:
|
|
620
|
+
setTableData: x,
|
|
605
621
|
getDataSource: J,
|
|
606
622
|
getDataSourceRef: w,
|
|
607
623
|
setColumns: K,
|
|
608
|
-
getRawDataSource:
|
|
609
|
-
tableSearch:
|
|
624
|
+
getRawDataSource: k,
|
|
625
|
+
tableSearch: S
|
|
610
626
|
};
|
|
611
|
-
|
|
627
|
+
n("register", R);
|
|
612
628
|
const Q = {
|
|
613
629
|
field: "_filterTableData",
|
|
614
630
|
label: "",
|
|
615
|
-
type:
|
|
631
|
+
type: be.Search,
|
|
616
632
|
itemProps: {
|
|
617
633
|
class: "search-all-form-item"
|
|
618
634
|
},
|
|
619
635
|
componentProps: () => ({
|
|
620
636
|
onChange: (a) => {
|
|
621
|
-
|
|
637
|
+
P({
|
|
622
638
|
_filterTableData: a
|
|
623
639
|
});
|
|
624
640
|
}
|
|
625
641
|
})
|
|
626
|
-
}, [Z] =
|
|
627
|
-
schemas: [
|
|
642
|
+
}, [Z] = Ce(_({
|
|
643
|
+
schemas: [l.value?.formOptions?.addSearchAllSchema ? Q : {}],
|
|
628
644
|
rowProps: {
|
|
629
645
|
justify: "start"
|
|
630
646
|
},
|
|
@@ -638,53 +654,53 @@ const He = {
|
|
|
638
654
|
btnText: "搜索"
|
|
639
655
|
},
|
|
640
656
|
actionInline: !0
|
|
641
|
-
},
|
|
642
|
-
|
|
657
|
+
}, pe(
|
|
658
|
+
l.value?.formOptions,
|
|
643
659
|
["showActionForm", "addSearchAllSchema"]
|
|
644
660
|
// 'union' | 'intersection' | 'concat' | 'replace' = 'union'
|
|
645
|
-
), "replace")),
|
|
646
|
-
Reflect.has(a, "_filterTableData") &&
|
|
661
|
+
), "replace")), P = (a) => {
|
|
662
|
+
Reflect.has(a, "_filterTableData") && S(a._filterTableData), n("form-submit", a);
|
|
647
663
|
}, ee = () => {
|
|
648
|
-
|
|
664
|
+
x(k()), n("form-reset");
|
|
649
665
|
};
|
|
650
|
-
return
|
|
666
|
+
return A({
|
|
651
667
|
table: b,
|
|
652
668
|
pageRef: C,
|
|
653
|
-
...
|
|
654
|
-
}), (a, o) => (
|
|
655
|
-
fallback:
|
|
656
|
-
default:
|
|
657
|
-
class: ne([e(
|
|
658
|
-
}, [
|
|
669
|
+
...R
|
|
670
|
+
}), (a, o) => (p(), m(e(we), null, {
|
|
671
|
+
fallback: i(() => [c(e(xe))]),
|
|
672
|
+
default: i(() => [H("div", {
|
|
673
|
+
class: ne([e(d).b()])
|
|
674
|
+
}, [c(e(Se), T({
|
|
659
675
|
ref_key: "xGrid",
|
|
660
676
|
ref: b
|
|
661
|
-
},
|
|
662
|
-
toolbarButtons:
|
|
677
|
+
}, l.value), {
|
|
678
|
+
toolbarButtons: i(() => [h(a.$slots, "toolbar-left"), l.value?.formOptions?.showActionForm ? (p(), m(e(ke), {
|
|
663
679
|
key: 0,
|
|
664
680
|
onRegister: e(Z),
|
|
665
|
-
onSubmit:
|
|
681
|
+
onSubmit: P,
|
|
666
682
|
onReset: ee
|
|
667
|
-
}, null, 8, ["onRegister"])) :
|
|
668
|
-
empty:
|
|
669
|
-
loading:
|
|
683
|
+
}, null, 8, ["onRegister"])) : F("", !0), h(a.$slots, "toolbar-right")]),
|
|
684
|
+
empty: i(() => [h(a.$slots, "empty", {}, () => [c(e(ue), se(ge(l.value.emptyCfg)), null, 16)])]),
|
|
685
|
+
loading: i(() => [ce(H("div", null, null, 512), [[ie, l.value.loading], [e(fe), l.value.loadingCfg || {}]])]),
|
|
670
686
|
_: 3
|
|
671
|
-
}, 16),
|
|
687
|
+
}, 16), l.value.showPager ? (p(), m(e(ve), T({
|
|
672
688
|
key: 0,
|
|
673
689
|
ref_key: "pageRef",
|
|
674
690
|
ref: C
|
|
675
|
-
}, e(
|
|
676
|
-
class: [e(
|
|
677
|
-
onCurrentChange: o[0] || (o[0] = (
|
|
678
|
-
currentPage:
|
|
691
|
+
}, e(s), {
|
|
692
|
+
class: [e(d).e("pager"), e(d).m(`pager-${e(s)?.pagePlacement}`)],
|
|
693
|
+
onCurrentChange: o[0] || (o[0] = (r) => B({
|
|
694
|
+
currentPage: r
|
|
679
695
|
})),
|
|
680
|
-
onSizeChange: o[1] || (o[1] = (
|
|
681
|
-
pageSize:
|
|
696
|
+
onSizeChange: o[1] || (o[1] = (r) => B({
|
|
697
|
+
pageSize: r
|
|
682
698
|
}))
|
|
683
|
-
}), null, 16, ["class"])) :
|
|
699
|
+
}), null, 16, ["class"])) : F("", !0)], 2)]),
|
|
684
700
|
_: 3
|
|
685
701
|
}));
|
|
686
702
|
}
|
|
687
703
|
});
|
|
688
704
|
export {
|
|
689
|
-
|
|
705
|
+
ra as default
|
|
690
706
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EmptyProps } from 'vft/es/components/empty';
|
|
2
|
+
import type { LoadingBinding } from 'vft/es/components/loading';
|
|
2
3
|
import { type PaginationProps } from 'vft/es/components/pagination';
|
|
3
4
|
import type { VxeGridInstance, VxeGridProps, VxeTableDefines } from 'vxe-table';
|
|
4
5
|
import { type SuperFormProps } from '../super-form';
|
|
@@ -76,6 +77,7 @@ export interface TableProps extends VxeGridProps {
|
|
|
76
77
|
onChange?: (...args: any[]) => void;
|
|
77
78
|
/** 空状态配置,用于自定义空数据时的显示内容 */
|
|
78
79
|
emptyCfg?: EmptyProps;
|
|
80
|
+
loadingCfg?: LoadingBinding;
|
|
79
81
|
}
|
|
80
82
|
/** 列项属性类型,继承自 VXE Table 的列选项 */
|
|
81
83
|
export type ColumnItemProps = VxeTableDefines.ColumnOptions;
|