vft 0.0.514 → 0.0.516
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 +1 -1
- package/es/components/icon/icon.vue.d.ts +5 -1
- package/es/components/icon/icon.vue2.js +23 -21
- package/es/components/icon/index.d.ts +6 -2
- package/es/components/image/image.vue2.js +25 -24
- package/es/components/image/index.d.ts +9 -0
- package/es/components/image/types.d.ts +2 -0
- package/es/components/image-viewer/image-viewer.vue.d.ts +1 -12
- package/es/components/image-viewer/types.d.ts +22 -0
- package/es/components/md-comment/md-comment.vue2.js +50 -28
- package/es/components/modal/modal.vue2.js +31 -30
- package/es/components/select/index.d.ts +6 -2
- package/es/components/select/select.vue.d.ts +6 -2
- package/es/components/table/index.d.ts +12 -12
- package/es/components/table/table.vue2.js +126 -121
- package/es/components/table/vxe-runtime.d.ts +16 -0
- package/es/components/table/vxe-runtime.js +16 -0
- package/es/components/tree/tree-node.vue.d.ts +6 -2
- package/es/components/upload/index.d.ts +2 -2
- package/es/components/upload/upload.vue.d.ts +2 -2
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/icon/icon.vue.d.ts +5 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon/index.d.ts +6 -2
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image/index.d.ts +9 -0
- package/lib/components/image/types.d.ts +2 -0
- package/lib/components/image-viewer/image-viewer.vue.d.ts +1 -12
- package/lib/components/image-viewer/types.d.ts +22 -0
- package/lib/components/md-comment/md-comment.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/select/index.d.ts +6 -2
- package/lib/components/select/select.vue.d.ts +6 -2
- package/lib/components/table/index.d.ts +12 -12
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/vxe-runtime.cjs +1 -0
- package/lib/components/table/vxe-runtime.d.ts +16 -0
- package/lib/components/tree/tree-node.vue.d.ts +6 -2
- package/lib/components/upload/index.d.ts +2 -2
- package/lib/components/upload/upload.vue.d.ts +2 -2
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +3 -3
- package/theme-style/index.css +1 -1
- package/theme-style/vft-autocomplete.css +1 -1
- package/theme-style/vft-button-group.css +1 -1
- package/theme-style/vft-button.css +1 -1
- package/theme-style/vft-cascader.css +1 -1
- package/theme-style/vft-checkbox.css +1 -1
- package/theme-style/vft-color-picker.css +1 -1
- package/theme-style/vft-date-picker.css +1 -1
- package/theme-style/vft-dropdown.css +1 -1
- package/theme-style/vft-input.css +1 -1
- package/theme-style/vft-link.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-md-vue-playground.css +1 -1
- package/theme-style/vft-multiple-tabs.css +1 -1
- package/theme-style/vft-popper.css +1 -1
- package/theme-style/vft-radio.css +1 -1
- package/theme-style/vft-result.css +1 -1
- package/theme-style/vft-select.css +1 -1
- package/theme-style/vft-tag.css +1 -1
- package/theme-style/vft-time-picker.css +1 -1
- package/theme-style/vft-time-select.css +1 -1
- package/web-types.json +1 -1
|
@@ -98,7 +98,7 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
98
98
|
type: import("vue").PropType<import("vxe-table").VxeGridPropTypes.ZoomConfig>;
|
|
99
99
|
};
|
|
100
100
|
size: {
|
|
101
|
-
type: import("vue").PropType<import("vxe-
|
|
101
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentSizeType>;
|
|
102
102
|
};
|
|
103
103
|
id: {
|
|
104
104
|
type: import("vue").PropType<import("vxe-table").VxeTablePropTypes.ID<any>>;
|
|
@@ -131,13 +131,13 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
131
131
|
type: import("vue").PropType<boolean>;
|
|
132
132
|
};
|
|
133
133
|
align: {
|
|
134
|
-
type: import("vue").PropType<import("vxe-
|
|
134
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
|
|
135
135
|
};
|
|
136
136
|
headerAlign: {
|
|
137
|
-
type: import("vue").PropType<import("vxe-
|
|
137
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
|
|
138
138
|
};
|
|
139
139
|
footerAlign: {
|
|
140
|
-
type: import("vue").PropType<import("vxe-
|
|
140
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
|
|
141
141
|
};
|
|
142
142
|
showHeader: {
|
|
143
143
|
type: import("vue").PropType<boolean>;
|
|
@@ -1020,7 +1020,7 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
1020
1020
|
type: import("vue").PropType<import("vxe-table").VxeGridPropTypes.ZoomConfig>;
|
|
1021
1021
|
};
|
|
1022
1022
|
size: {
|
|
1023
|
-
type: import("vue").PropType<import("vxe-
|
|
1023
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentSizeType>;
|
|
1024
1024
|
};
|
|
1025
1025
|
id: {
|
|
1026
1026
|
type: import("vue").PropType<import("vxe-table").VxeTablePropTypes.ID<any>>;
|
|
@@ -1053,13 +1053,13 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
1053
1053
|
type: import("vue").PropType<boolean>;
|
|
1054
1054
|
};
|
|
1055
1055
|
align: {
|
|
1056
|
-
type: import("vue").PropType<import("vxe-
|
|
1056
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
|
|
1057
1057
|
};
|
|
1058
1058
|
headerAlign: {
|
|
1059
|
-
type: import("vue").PropType<import("vxe-
|
|
1059
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
|
|
1060
1060
|
};
|
|
1061
1061
|
footerAlign: {
|
|
1062
|
-
type: import("vue").PropType<import("vxe-
|
|
1062
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
|
|
1063
1063
|
};
|
|
1064
1064
|
showHeader: {
|
|
1065
1065
|
type: import("vue").PropType<boolean>;
|
|
@@ -1826,7 +1826,7 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
1826
1826
|
type: import("vue").PropType<import("vxe-table").VxeGridPropTypes.ZoomConfig>;
|
|
1827
1827
|
};
|
|
1828
1828
|
size: {
|
|
1829
|
-
type: import("vue").PropType<import("vxe-
|
|
1829
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentSizeType>;
|
|
1830
1830
|
};
|
|
1831
1831
|
id: {
|
|
1832
1832
|
type: import("vue").PropType<import("vxe-table").VxeTablePropTypes.ID<any>>;
|
|
@@ -1859,13 +1859,13 @@ export declare const VftTable: import("vft/es/utils").SFCWithInstall<{
|
|
|
1859
1859
|
type: import("vue").PropType<boolean>;
|
|
1860
1860
|
};
|
|
1861
1861
|
align: {
|
|
1862
|
-
type: import("vue").PropType<import("vxe-
|
|
1862
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
|
|
1863
1863
|
};
|
|
1864
1864
|
headerAlign: {
|
|
1865
|
-
type: import("vue").PropType<import("vxe-
|
|
1865
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
|
|
1866
1866
|
};
|
|
1867
1867
|
footerAlign: {
|
|
1868
|
-
type: import("vue").PropType<import("vxe-
|
|
1868
|
+
type: import("vue").PropType<import("vxe-pc-ui").VxeComponentAlignType>;
|
|
1869
1869
|
};
|
|
1870
1870
|
showHeader: {
|
|
1871
1871
|
type: import("vue").PropType<boolean>;
|
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftClientOnly as
|
|
3
|
-
import { VftEmpty as
|
|
4
|
-
import { vLoading as
|
|
5
|
-
import { deepMerge as
|
|
1
|
+
import { defineComponent as X, computed as m, createVNode as i, createTextVNode as ye, defineAsyncComponent as we, useAttrs as ve, ref as g, getCurrentInstance as xe, unref as a, watch as ke, nextTick as q, toRaw as Se, openBlock as S, createElementBlock as Be, normalizeClass as Re, withCtx as n, mergeProps as G, withDirectives as ze, createElementVNode as Pe, vShow as De, renderSlot as s, normalizeProps as p, guardReactiveProps as h, createCommentVNode as B, createBlock as I, createSlots as He } from "vue";
|
|
2
|
+
import { VftClientOnly as Oe } from "../client-only/index.js";
|
|
3
|
+
import { VftEmpty as Ae } from "../empty/index.js";
|
|
4
|
+
import { vLoading as Fe } from "../loading/directive.js";
|
|
5
|
+
import { deepMerge as K, isClient as Te, omit as Ve, isFunction as R } from "@vft/utils";
|
|
6
6
|
import { FormCompEnum as C } from "../../utils/form-register.js";
|
|
7
7
|
import "@vueuse/core";
|
|
8
8
|
import "../config-provider/hooks/use-global-config.js";
|
|
9
9
|
import "lodash-es";
|
|
10
|
-
import { useForm as
|
|
11
|
-
import { useNamespace as
|
|
10
|
+
import { useForm as Ne } from "../super-form/use/use-form.js";
|
|
11
|
+
import { useNamespace as Ee } from "../../hooks/use-namespace/index.js";
|
|
12
12
|
import "../../hooks/use-model-toggle/index.js";
|
|
13
13
|
import "@popperjs/core";
|
|
14
14
|
import "../../hooks/use-z-index/index.js";
|
|
15
15
|
import "../icon/index.js";
|
|
16
|
-
import { VftPagination as
|
|
17
|
-
import { VftSkeleton as
|
|
18
|
-
import { VftSuperForm as
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
import { EmptyEnum as Ge } from "../empty/constants.js";
|
|
27
|
-
const Ie = K({
|
|
16
|
+
import { VftPagination as $e } from "../pagination/index.js";
|
|
17
|
+
import { VftSkeleton as _e } from "../skeleton/index.js";
|
|
18
|
+
import { VftSuperForm as Le } from "../super-form/index.js";
|
|
19
|
+
import { PageSize as j } from "./constants.js";
|
|
20
|
+
import { useColumns as Me } from "./use/use-columns.js";
|
|
21
|
+
import { useDataSource as qe } from "./use/use-data-source.js";
|
|
22
|
+
import { useLoading as Ge } from "./use/use-loading.js";
|
|
23
|
+
import { usePagination as Ie } from "./use/use-pagination.js";
|
|
24
|
+
import { EmptyEnum as Ke } from "../empty/constants.js";
|
|
25
|
+
const je = X({
|
|
28
26
|
name: "vft-table"
|
|
29
|
-
}), Ca = /* @__PURE__ */
|
|
30
|
-
...
|
|
27
|
+
}), Ca = /* @__PURE__ */ X({
|
|
28
|
+
...je,
|
|
31
29
|
props: {
|
|
32
30
|
sticky: {
|
|
33
31
|
type: [Boolean, Object]
|
|
34
32
|
},
|
|
35
33
|
api: {},
|
|
36
34
|
pageSize: {
|
|
37
|
-
default:
|
|
35
|
+
default: j
|
|
38
36
|
},
|
|
39
37
|
total: {},
|
|
40
38
|
rowkey: {
|
|
@@ -79,7 +77,7 @@ const Ie = K({
|
|
|
79
77
|
onChange: {},
|
|
80
78
|
emptyCfg: {
|
|
81
79
|
default: () => ({
|
|
82
|
-
type:
|
|
80
|
+
type: Ke.NoData
|
|
83
81
|
})
|
|
84
82
|
},
|
|
85
83
|
loadingCfg: {},
|
|
@@ -392,73 +390,80 @@ const Ie = K({
|
|
|
392
390
|
"toolbar-tool-click",
|
|
393
391
|
"zoom"
|
|
394
392
|
],
|
|
395
|
-
setup(
|
|
396
|
-
expose:
|
|
397
|
-
emit:
|
|
393
|
+
setup(Y, {
|
|
394
|
+
expose: W,
|
|
395
|
+
emit: U
|
|
398
396
|
}) {
|
|
399
|
-
const
|
|
397
|
+
const J = m(() => ({
|
|
400
398
|
customClass: "vft-card-loading",
|
|
401
|
-
text: i("div", null, [i("span", null, [
|
|
399
|
+
text: i("div", null, [i("span", null, [ye("加载中")]), i("span", {
|
|
402
400
|
class: "dot"
|
|
403
401
|
}, null)])
|
|
404
|
-
})),
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
402
|
+
})), Q = m(() => Y.loadingCfg || J.value), c = U;
|
|
403
|
+
let z;
|
|
404
|
+
const Z = we(async () => {
|
|
405
|
+
const e = await import("./vxe-runtime.js");
|
|
406
|
+
return e.setupVxe(z), e.VxeGrid;
|
|
407
|
+
}), ee = (e) => e.replace(/-(\w)/g, (t, l) => l.toUpperCase()), d = Ee("table"), ae = ve(), b = g(), P = g(), oe = g([]), y = g(), w = g(), D = xe();
|
|
408
|
+
z = D.appContext.app;
|
|
409
|
+
const o = m(() => K(D.props, a(y))), {
|
|
410
|
+
getLoading: te,
|
|
411
|
+
setLoading: le
|
|
412
|
+
} = Ge(o), {
|
|
408
413
|
getPaginationInfo: f,
|
|
409
414
|
setPagination: v,
|
|
410
|
-
getCurrentPage:
|
|
411
|
-
} =
|
|
412
|
-
getViewColumns:
|
|
413
|
-
setColumns:
|
|
414
|
-
} =
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
415
|
+
getCurrentPage: re
|
|
416
|
+
} = Ie(o), {
|
|
417
|
+
getViewColumns: ne,
|
|
418
|
+
setColumns: ce
|
|
419
|
+
} = Me(o);
|
|
420
|
+
ke(() => re(), (e) => {
|
|
421
|
+
q(() => {
|
|
422
|
+
H({
|
|
418
423
|
seqConfig: {
|
|
419
|
-
startIndex: (e - 1) * (f.value?.pageSize || a(o).pageSize ||
|
|
424
|
+
startIndex: (e - 1) * (f.value?.pageSize || a(o).pageSize || j)
|
|
420
425
|
}
|
|
421
426
|
});
|
|
422
427
|
});
|
|
423
428
|
}, {
|
|
424
429
|
immediate: !0
|
|
425
430
|
});
|
|
426
|
-
function
|
|
431
|
+
function H(e) {
|
|
427
432
|
y.value = {
|
|
428
433
|
...a(y),
|
|
429
434
|
...e
|
|
430
435
|
};
|
|
431
436
|
}
|
|
432
437
|
const {
|
|
433
|
-
getDataSourceRef:
|
|
434
|
-
handleTableChange:
|
|
435
|
-
reload:
|
|
436
|
-
deleteTableDataRecord:
|
|
437
|
-
insertTableDataRecord:
|
|
438
|
-
updateTableData:
|
|
439
|
-
updateTableDataRecord:
|
|
440
|
-
setTableData:
|
|
441
|
-
getDataSource:
|
|
442
|
-
getRawDataSource:
|
|
443
|
-
tableSearch:
|
|
444
|
-
expandTreeLevel:
|
|
445
|
-
} =
|
|
446
|
-
tableData:
|
|
447
|
-
setLoading:
|
|
438
|
+
getDataSourceRef: O,
|
|
439
|
+
handleTableChange: ie,
|
|
440
|
+
reload: x,
|
|
441
|
+
deleteTableDataRecord: se,
|
|
442
|
+
insertTableDataRecord: ge,
|
|
443
|
+
updateTableData: de,
|
|
444
|
+
updateTableDataRecord: fe,
|
|
445
|
+
setTableData: A,
|
|
446
|
+
getDataSource: ue,
|
|
447
|
+
getRawDataSource: F,
|
|
448
|
+
tableSearch: T,
|
|
449
|
+
expandTreeLevel: me
|
|
450
|
+
} = qe(o, {
|
|
451
|
+
tableData: oe,
|
|
452
|
+
setLoading: le,
|
|
448
453
|
getPaginationInfo: f,
|
|
449
454
|
setPagination: v,
|
|
450
455
|
getGridRef: () => b.value
|
|
451
456
|
}, c);
|
|
452
|
-
function
|
|
457
|
+
function V(e) {
|
|
453
458
|
e?.pageSize && v({
|
|
454
459
|
currentPage: 1
|
|
455
|
-
}),
|
|
460
|
+
}), ie(e), c("change", e);
|
|
456
461
|
const {
|
|
457
462
|
onChange: t
|
|
458
463
|
} = a(o);
|
|
459
464
|
t && R(t) && t(e);
|
|
460
465
|
}
|
|
461
|
-
const
|
|
466
|
+
const N = {};
|
|
462
467
|
[
|
|
463
468
|
"update:data",
|
|
464
469
|
"keydown-start",
|
|
@@ -580,20 +585,20 @@ const Ie = K({
|
|
|
580
585
|
"toolbar-tool-click",
|
|
581
586
|
"zoom"
|
|
582
587
|
].forEach((e) => {
|
|
583
|
-
const t =
|
|
584
|
-
|
|
588
|
+
const t = ee(`on-${e}`);
|
|
589
|
+
N[t] = (...l) => c(e, ...l);
|
|
585
590
|
});
|
|
586
591
|
const r = m(() => {
|
|
587
|
-
const e = a(
|
|
588
|
-
...
|
|
592
|
+
const e = a(O), t = {
|
|
593
|
+
...ae,
|
|
589
594
|
...a(o),
|
|
590
|
-
columns:
|
|
591
|
-
loading: a(
|
|
595
|
+
columns: Se(a(ne)),
|
|
596
|
+
loading: a(te),
|
|
592
597
|
data: e,
|
|
593
|
-
loadingCfg: a(
|
|
594
|
-
...
|
|
598
|
+
loadingCfg: a(Q),
|
|
599
|
+
...N
|
|
595
600
|
};
|
|
596
|
-
if (
|
|
601
|
+
if (Te) {
|
|
597
602
|
(a(o)?.addMaxHeight || a(o)?.maxHeight) && (t.maxHeight = a(o)?.maxHeight ? a(o)?.maxHeight : `${window.innerHeight - a(o)?.extraSysHeight - (o.value?.showPager ? o.value?.pageHeight || 40 : 0)}px`);
|
|
598
603
|
const l = a(o)?.minHeight;
|
|
599
604
|
t.minHeight = l || (l !== 0 && a(o)?.toolbarConfig?.custom ? 300 : void 0);
|
|
@@ -605,28 +610,28 @@ const Ie = K({
|
|
|
605
610
|
},
|
|
606
611
|
autoLoad: !1,
|
|
607
612
|
ajax: {
|
|
608
|
-
query: async () => await
|
|
613
|
+
query: async () => await x()
|
|
609
614
|
}
|
|
610
615
|
}), t;
|
|
611
616
|
}), E = {
|
|
612
617
|
setPagination: v,
|
|
613
618
|
emit: c,
|
|
614
|
-
setProps:
|
|
615
|
-
reload:
|
|
616
|
-
deleteTableDataRecord:
|
|
617
|
-
insertTableDataRecord:
|
|
618
|
-
updateTableDataRecord:
|
|
619
|
-
updateTableData:
|
|
620
|
-
setTableData:
|
|
621
|
-
getDataSource:
|
|
622
|
-
getDataSourceRef:
|
|
623
|
-
setColumns:
|
|
624
|
-
getRawDataSource:
|
|
625
|
-
tableSearch:
|
|
626
|
-
expandTreeLevel:
|
|
619
|
+
setProps: H,
|
|
620
|
+
reload: x,
|
|
621
|
+
deleteTableDataRecord: se,
|
|
622
|
+
insertTableDataRecord: ge,
|
|
623
|
+
updateTableDataRecord: fe,
|
|
624
|
+
updateTableData: de,
|
|
625
|
+
setTableData: A,
|
|
626
|
+
getDataSource: ue,
|
|
627
|
+
getDataSourceRef: O,
|
|
628
|
+
setColumns: ce,
|
|
629
|
+
getRawDataSource: F,
|
|
630
|
+
tableSearch: T,
|
|
631
|
+
expandTreeLevel: me
|
|
627
632
|
};
|
|
628
633
|
c("register", E);
|
|
629
|
-
const
|
|
634
|
+
const pe = {
|
|
630
635
|
field: "_filterTableData",
|
|
631
636
|
label: "",
|
|
632
637
|
type: C.Search,
|
|
@@ -635,13 +640,13 @@ const Ie = K({
|
|
|
635
640
|
},
|
|
636
641
|
componentProps: () => ({
|
|
637
642
|
onChange: (e) => {
|
|
638
|
-
|
|
643
|
+
L({
|
|
639
644
|
_filterTableData: e
|
|
640
645
|
});
|
|
641
646
|
}
|
|
642
647
|
})
|
|
643
|
-
},
|
|
644
|
-
schemas: [r.value?.formOptions?.addSearchAllSchema ?
|
|
648
|
+
}, $ = K({
|
|
649
|
+
schemas: [r.value?.formOptions?.addSearchAllSchema ? pe : {}],
|
|
645
650
|
rowProps: {
|
|
646
651
|
justify: "start"
|
|
647
652
|
},
|
|
@@ -655,13 +660,13 @@ const Ie = K({
|
|
|
655
660
|
btnText: "搜索"
|
|
656
661
|
},
|
|
657
662
|
actionInline: !0
|
|
658
|
-
},
|
|
659
|
-
e && R(e) && e(...t),
|
|
660
|
-
|
|
663
|
+
}, Ve(r.value?.formOptions, ["showActionForm", "addSearchAllSchema"]), "replace"), _ = (e) => (...t) => {
|
|
664
|
+
e && R(e) && e(...t), q(() => {
|
|
665
|
+
x();
|
|
661
666
|
});
|
|
662
|
-
}, [
|
|
663
|
-
|
|
664
|
-
schemas: (a(
|
|
667
|
+
}, [he] = Ne({
|
|
668
|
+
...$,
|
|
669
|
+
schemas: (a($)?.schemas || []).map((e) => {
|
|
665
670
|
if (!a(r)?.formOptions?.autoReloadOnClear)
|
|
666
671
|
return e;
|
|
667
672
|
if (!e.type || e.type === C.Input || e.type === C.Search || e.type === C.Textarea) {
|
|
@@ -671,55 +676,55 @@ const Ie = K({
|
|
|
671
676
|
if (R(u))
|
|
672
677
|
return {
|
|
673
678
|
...e,
|
|
674
|
-
componentProps: async (
|
|
675
|
-
const
|
|
679
|
+
componentProps: async (k) => {
|
|
680
|
+
const M = await u(k), be = M?.onClear;
|
|
676
681
|
return {
|
|
677
|
-
...
|
|
678
|
-
onClear:
|
|
682
|
+
...M,
|
|
683
|
+
onClear: _(be)
|
|
679
684
|
};
|
|
680
685
|
}
|
|
681
686
|
};
|
|
682
687
|
{
|
|
683
|
-
const
|
|
688
|
+
const k = u?.onClear;
|
|
684
689
|
return {
|
|
685
690
|
...e,
|
|
686
691
|
componentProps: {
|
|
687
692
|
...u,
|
|
688
|
-
onClear:
|
|
693
|
+
onClear: _(k)
|
|
689
694
|
}
|
|
690
695
|
};
|
|
691
696
|
}
|
|
692
697
|
}
|
|
693
698
|
return e;
|
|
694
699
|
})
|
|
695
|
-
}),
|
|
696
|
-
Reflect.has(e, "_filterTableData") &&
|
|
697
|
-
},
|
|
698
|
-
|
|
700
|
+
}), L = (e) => {
|
|
701
|
+
Reflect.has(e, "_filterTableData") && T(e._filterTableData), c("form-submit", e);
|
|
702
|
+
}, Ce = () => {
|
|
703
|
+
A(F()), c("form-reset");
|
|
699
704
|
};
|
|
700
|
-
return
|
|
705
|
+
return W({
|
|
701
706
|
table: b,
|
|
702
707
|
formRef: w,
|
|
703
|
-
pageRef:
|
|
708
|
+
pageRef: P,
|
|
704
709
|
...E
|
|
705
|
-
}), (e, t) => (S(),
|
|
706
|
-
class:
|
|
710
|
+
}), (e, t) => (S(), Be("div", {
|
|
711
|
+
class: Re([a(d).b(), {
|
|
707
712
|
[a(d).is("form-exceed-one-rows")]: w.value?.willExceedOneRow
|
|
708
713
|
}])
|
|
709
|
-
}, [i(a(
|
|
710
|
-
fallback: n(() => [i(a(
|
|
711
|
-
default: n(() => [i(a(
|
|
714
|
+
}, [i(a(Oe), null, {
|
|
715
|
+
fallback: n(() => [i(a(_e))]),
|
|
716
|
+
default: n(() => [i(a(Z), G({
|
|
712
717
|
ref_key: "xGrid",
|
|
713
718
|
ref: b
|
|
714
719
|
}, r.value), {
|
|
715
|
-
toolbarButtons: n(() => [s(e.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (S(),
|
|
720
|
+
toolbarButtons: n(() => [s(e.$slots, "toolbar-left"), r.value?.formOptions?.showActionForm ? (S(), I(a(Le), {
|
|
716
721
|
key: 0,
|
|
717
722
|
ref_key: "formRef",
|
|
718
723
|
ref: w,
|
|
719
|
-
onRegister: a(
|
|
720
|
-
onSubmit:
|
|
721
|
-
onReset:
|
|
722
|
-
},
|
|
724
|
+
onRegister: a(he),
|
|
725
|
+
onSubmit: L,
|
|
726
|
+
onReset: Ce
|
|
727
|
+
}, He({
|
|
723
728
|
_: 2
|
|
724
729
|
}, [e.$slots.resetBefore ? {
|
|
725
730
|
name: "resetBefore",
|
|
@@ -736,19 +741,19 @@ const Ie = K({
|
|
|
736
741
|
} : void 0]), 1032, ["onRegister"])) : B("", !0), s(e.$slots, "toolbar-right")]),
|
|
737
742
|
empty: n(() => [r.value.loading ? B("", !0) : s(e.$slots, "empty", {
|
|
738
743
|
key: 0
|
|
739
|
-
}, () => [i(a(
|
|
740
|
-
loading: n(() => [
|
|
744
|
+
}, () => [i(a(Ae), p(h(r.value.emptyCfg)), null, 16)])]),
|
|
745
|
+
loading: n(() => [ze(Pe("div", null, null, 512), [[De, r.value.loading], [a(Fe), r.value.loadingCfg]])]),
|
|
741
746
|
_: 3
|
|
742
|
-
}, 16), r.value.showPager ? (S(),
|
|
747
|
+
}, 16), r.value.showPager ? (S(), I(a($e), G({
|
|
743
748
|
key: 0,
|
|
744
749
|
ref_key: "pageRef",
|
|
745
|
-
ref:
|
|
750
|
+
ref: P
|
|
746
751
|
}, a(f), {
|
|
747
752
|
class: [a(d).e("pager"), a(d).m(`pager-${a(f)?.pagePlacement}`)],
|
|
748
|
-
onCurrentChange: t[0] || (t[0] = (l) =>
|
|
753
|
+
onCurrentChange: t[0] || (t[0] = (l) => V({
|
|
749
754
|
currentPage: l
|
|
750
755
|
})),
|
|
751
|
-
onSizeChange: t[1] || (t[1] = (l) =>
|
|
756
|
+
onSizeChange: t[1] || (t[1] = (l) => V({
|
|
752
757
|
pageSize: l
|
|
753
758
|
}))
|
|
754
759
|
}), null, 16, ["class"])) : B("", !0)]),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import { VxeGrid } from 'vxe-table';
|
|
3
|
+
import 'vxe-table/es/table/style.min.css';
|
|
4
|
+
import 'vxe-table/es/toolbar/style.min.css';
|
|
5
|
+
import 'vxe-table/styles/cssvar.scss';
|
|
6
|
+
import 'vxe-pc-ui/styles/cssvar.scss';
|
|
7
|
+
export { VxeGrid };
|
|
8
|
+
/**
|
|
9
|
+
* vxe 运行时初始化(i18n + 全局注册)。
|
|
10
|
+
*
|
|
11
|
+
* 本模块通过 table.vue 的 defineAsyncComponent **动态 import**,使 vxe(js ~568K +
|
|
12
|
+
* css ~249K)整体成为按需 chunk,不再被 vft 静态依赖拖进首屏;首页/无表格页零下载。
|
|
13
|
+
* 这里用「静态 import 组件 + css」而非组件内动态 import css,保证样式注入方式与原
|
|
14
|
+
* 全局 initTable 完全一致(动态 import css 在组件里不可靠,会丢样式)。
|
|
15
|
+
*/
|
|
16
|
+
export declare function setupVxe(app?: App<Element>): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VxeUI as e, VxeIcon as r, VxeButton as u, VxeTooltip as i } from "vxe-pc-ui";
|
|
2
|
+
import { VxeToolbar as p, VxeGrid as m, VxeTable as s } from "vxe-table";
|
|
3
|
+
import { VxeGrid as T } from "vxe-table";
|
|
4
|
+
import x from "vxe-pc-ui/lib/language/zh-CN";
|
|
5
|
+
import "vxe-table/es/table/style.min.css";
|
|
6
|
+
import "vxe-table/es/toolbar/style.min.css";
|
|
7
|
+
import "vxe-table/styles/cssvar.scss";
|
|
8
|
+
import "vxe-pc-ui/styles/cssvar.scss";
|
|
9
|
+
let o = !1;
|
|
10
|
+
function C(t) {
|
|
11
|
+
o || (o = !0, e.setI18n("zh-CN", x), e.setLanguage("zh-CN"), t?.use(p).use(r).use(u).use(i).use(m).use(s));
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
T as VxeGrid,
|
|
15
|
+
C as setupVxe
|
|
16
|
+
};
|
|
@@ -647,7 +647,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
647
647
|
hoverColor: {
|
|
648
648
|
type: import("vue").PropType<string>;
|
|
649
649
|
};
|
|
650
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
650
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
651
|
+
error: (event: Event) => void;
|
|
652
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
651
653
|
icon: {
|
|
652
654
|
type: import("vue").PropType<string>;
|
|
653
655
|
required: true;
|
|
@@ -670,6 +672,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
670
672
|
hoverColor: {
|
|
671
673
|
type: import("vue").PropType<string>;
|
|
672
674
|
};
|
|
673
|
-
}>> & Readonly<{
|
|
675
|
+
}>> & Readonly<{
|
|
676
|
+
onError?: ((event: Event) => any) | undefined;
|
|
677
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
674
678
|
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
675
679
|
export default _default;
|
|
@@ -580,8 +580,8 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
580
580
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
581
581
|
$slots: {
|
|
582
582
|
file?(_: {
|
|
583
|
-
file:
|
|
584
|
-
index:
|
|
583
|
+
file: any;
|
|
584
|
+
index: any;
|
|
585
585
|
}): any;
|
|
586
586
|
trigger?(_: {}): any;
|
|
587
587
|
default?(_: {}): any;
|
|
@@ -2,14 +2,14 @@ import "@vueuse/core";
|
|
|
2
2
|
import { isNumber as m, isClient as p } from "@vft/utils";
|
|
3
3
|
import { debugWarn as l } from "../../utils/error.js";
|
|
4
4
|
import "../../components/config-provider/hooks/use-global-config.js";
|
|
5
|
-
import { getCurrentInstance as i, inject as e, computed as c, unref as
|
|
5
|
+
import { ref as v, getCurrentInstance as i, inject as e, computed as c, unref as Z } from "vue";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../../components/form/index.js";
|
|
8
8
|
const s = {
|
|
9
9
|
current: 0
|
|
10
|
-
}, u =
|
|
10
|
+
}, u = v(0), f = 2e3, d = Symbol("vftZIndexContextKey"), y = Symbol("zIndexContextKey"), K = (I) => {
|
|
11
11
|
const n = i() ? e(d, s) : s, x = I || (i() ? e(y, void 0) : void 0), t = c(() => {
|
|
12
|
-
const r =
|
|
12
|
+
const r = Z(x);
|
|
13
13
|
return m(r) ? r : f;
|
|
14
14
|
}), o = c(() => t.value + u.value), a = () => (n.current++, u.value = n.current, o.value);
|
|
15
15
|
return !p && !e(d) && l(
|
package/es/package.json.d.ts
CHANGED
package/es/package.json.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { IconProps } from './types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
|
+
error: (event: Event) => void;
|
|
4
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>> & Readonly<{
|
|
5
|
+
onError?: ((event: Event) => any) | undefined;
|
|
6
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
7
|
export default _default;
|
|
4
8
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
5
9
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("@vft/utils");require("../config-provider/index.cjs");require("@vueuse/core");const v=require("../../utils/helper.cjs"),C=require("../../utils/ns-cover.cjs");require("lodash-es");require("../form/index.cjs");const y=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const q=require("../config-provider/hooks/use-global-config.cjs"),g=["src"],z=e.defineComponent({name:"vft-icon"}),S=e.defineComponent({...z,props:{icon:{},size:{},color:{},rotate:{type:Boolean},rotateSpeed:{default:2},pointer:{type:Boolean},hoverColor:{}},emits:["error"],setup(o,{emit:l}){const c=l,i=y.useNamespace("icon"),n=q.useGlobalConfig(),t=e.computed(()=>C.generateCssVars({size:v.addUnit(o.size),color:o.color,hoverColor:o.hoverColor,cursor:o.pointer?"pointer":void 0,animation:o.rotate?`${n.value.namespace}-rotate ${o.rotateSpeed}s linear 0s infinite`:void 0},"icon")),a=r=>r?.includes("/"),u=e.computed(()=>a(o.icon)),f=e.computed(()=>n.value?.iconifyPrefixClass&&o.icon&&d.isString(o.icon)?o.icon.startsWith(n.value?.iconifyPrefixClass):!1).value?"":n.value?.iconfontClass||"";return(r,s)=>u.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:e.normalizeClass(e.unref(i).e("image")),src:o.icon,alt:"",style:e.normalizeStyle(t.value),onError:s[0]||(s[0]=m=>c("error",m))},null,46,g)):(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass([e.unref(i).b(),o.icon,e.unref(f)]),style:e.normalizeStyle(t.value)},null,6))}});exports.default=S;
|
|
@@ -21,7 +21,9 @@ export declare const VftIcon: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
21
21
|
hoverColor: {
|
|
22
22
|
type: import("vue").PropType<string>;
|
|
23
23
|
};
|
|
24
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
error: (event: Event) => void;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
27
|
icon: {
|
|
26
28
|
type: import("vue").PropType<string>;
|
|
27
29
|
required: true;
|
|
@@ -44,6 +46,8 @@ export declare const VftIcon: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
44
46
|
hoverColor: {
|
|
45
47
|
type: import("vue").PropType<string>;
|
|
46
48
|
};
|
|
47
|
-
}>> & Readonly<{
|
|
49
|
+
}>> & Readonly<{
|
|
50
|
+
onError?: ((event: Event) => any) | undefined;
|
|
51
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
48
52
|
export * from './types';
|
|
49
53
|
export default VftIcon;
|