vxe-table 4.23.12 → 4.23.13
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/all.esm.js +4789 -4773
- package/dist/all.esm.min.js +3 -3
- package/es/colgroup/index.d.ts +18 -18
- package/es/column/index.d.ts +18 -18
- package/es/grid/index.d.ts +174 -174
- package/es/grid/src/emits.d.ts +1 -1
- package/es/grid/src/emits.js +3 -3
- package/es/grid/src/grid.d.ts +27 -27
- package/es/grid/src/grid.js +10 -10
- package/es/grid/src/props.d.ts +2 -2
- package/es/grid/src/props.js +4 -4
- package/es/index.esm.js +1 -0
- package/es/index.js +1 -0
- package/es/table/index.d.ts +174 -174
- package/es/table/module/custom/panel.js +1588 -1585
- package/es/table/module/export/export-panel.js +587 -584
- package/es/table/module/export/import-panel.js +258 -255
- package/es/table/module/filter/hook.js +1 -15
- package/es/table/module/filter/panel.js +281 -278
- package/es/table/module/menu/panel.js +225 -222
- package/es/table/src/body.js +895 -892
- package/es/table/src/column.d.ts +3 -3
- package/es/table/src/emits.d.ts +1 -1
- package/es/table/src/emits.js +2 -2
- package/es/table/src/footer.d.ts +2 -2
- package/es/table/src/footer.js +341 -338
- package/es/table/src/group.d.ts +3 -3
- package/es/table/src/header.js +539 -536
- package/es/table/src/props.d.ts +2 -2
- package/es/table/src/props.js +2 -2
- package/es/table/src/table.d.ts +27 -27
- package/es/table/src/table.js +15 -10
- package/es/toolbar/index.d.ts +18 -18
- package/es/toolbar/src/toolbar.d.ts +3 -3
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.d.ts +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/vn.d.ts +2 -2
- package/lib/colgroup/index.d.ts +760 -0
- package/lib/column/index.d.ts +760 -0
- package/lib/components.d.ts +13 -0
- package/lib/grid/index.d.ts +2824 -0
- package/lib/grid/src/emits.d.ts +2 -0
- package/lib/grid/src/emits.js +2 -2
- package/lib/grid/src/grid.d.ts +556 -0
- package/lib/grid/src/grid.js +6 -6
- package/lib/grid/src/props.d.ts +200 -0
- package/lib/grid/src/props.js +3 -3
- package/lib/index.common.js +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +1 -0
- package/lib/index.umd.js +4789 -4773
- package/lib/index.umd.min.js +3 -3
- package/lib/locale/ar-EG.umd.d.ts +908 -0
- package/lib/locale/de-DE.umd.d.ts +908 -0
- package/lib/locale/en-US.umd.d.ts +908 -0
- package/lib/locale/es-ES.umd.d.ts +908 -0
- package/lib/locale/fr-FR.umd.d.ts +908 -0
- package/lib/locale/hu-HU.umd.d.ts +908 -0
- package/lib/locale/hy-AM.umd.d.ts +908 -0
- package/lib/locale/id-ID.umd.d.ts +908 -0
- package/lib/locale/it-IT.umd.d.ts +908 -0
- package/lib/locale/ja-JP.umd.d.ts +908 -0
- package/lib/locale/ko-KR.umd.d.ts +908 -0
- package/lib/locale/lang/ar-EG.d.ts +908 -0
- package/lib/locale/lang/ar-EG.umd.d.ts +908 -0
- package/lib/locale/lang/de-DE.d.ts +908 -0
- package/lib/locale/lang/de-DE.umd.d.ts +908 -0
- package/lib/locale/lang/en-US.d.ts +908 -0
- package/lib/locale/lang/en-US.umd.d.ts +908 -0
- package/lib/locale/lang/es-ES.d.ts +908 -0
- package/lib/locale/lang/es-ES.umd.d.ts +908 -0
- package/lib/locale/lang/fr-FR.d.ts +908 -0
- package/lib/locale/lang/fr-FR.umd.d.ts +908 -0
- package/lib/locale/lang/hu-HU.d.ts +908 -0
- package/lib/locale/lang/hu-HU.umd.d.ts +908 -0
- package/lib/locale/lang/hy-AM.d.ts +908 -0
- package/lib/locale/lang/hy-AM.umd.d.ts +908 -0
- package/lib/locale/lang/id-ID.d.ts +908 -0
- package/lib/locale/lang/id-ID.umd.d.ts +908 -0
- package/lib/locale/lang/it-IT.d.ts +908 -0
- package/lib/locale/lang/it-IT.umd.d.ts +908 -0
- package/lib/locale/lang/ja-JP.d.ts +908 -0
- package/lib/locale/lang/ja-JP.umd.d.ts +908 -0
- package/lib/locale/lang/ko-KR.d.ts +908 -0
- package/lib/locale/lang/ko-KR.umd.d.ts +908 -0
- package/lib/locale/lang/ms-MY.d.ts +908 -0
- package/lib/locale/lang/ms-MY.umd.d.ts +908 -0
- package/lib/locale/lang/nb-NO.d.ts +908 -0
- package/lib/locale/lang/nb-NO.umd.d.ts +908 -0
- package/lib/locale/lang/pt-BR.d.ts +908 -0
- package/lib/locale/lang/pt-BR.umd.d.ts +908 -0
- package/lib/locale/lang/ru-RU.d.ts +908 -0
- package/lib/locale/lang/ru-RU.umd.d.ts +908 -0
- package/lib/locale/lang/th-TH.d.ts +908 -0
- package/lib/locale/lang/th-TH.umd.d.ts +908 -0
- package/lib/locale/lang/ug-CN.d.ts +908 -0
- package/lib/locale/lang/ug-CN.umd.d.ts +908 -0
- package/lib/locale/lang/uk-UA.d.ts +908 -0
- package/lib/locale/lang/uk-UA.umd.d.ts +908 -0
- package/lib/locale/lang/uz-UZ.d.ts +908 -0
- package/lib/locale/lang/uz-UZ.umd.d.ts +908 -0
- package/lib/locale/lang/vi-VN.d.ts +908 -0
- package/lib/locale/lang/vi-VN.umd.d.ts +908 -0
- package/lib/locale/lang/zh-CHT.d.ts +908 -0
- package/lib/locale/lang/zh-CHT.umd.d.ts +908 -0
- package/lib/locale/lang/zh-CN.d.ts +908 -0
- package/lib/locale/lang/zh-CN.umd.d.ts +908 -0
- package/lib/locale/lang/zh-HK.d.ts +908 -0
- package/lib/locale/lang/zh-HK.umd.d.ts +908 -0
- package/lib/locale/lang/zh-MO.d.ts +908 -0
- package/lib/locale/lang/zh-MO.umd.d.ts +908 -0
- package/lib/locale/lang/zh-TC.d.ts +908 -0
- package/lib/locale/lang/zh-TC.umd.d.ts +908 -0
- package/lib/locale/lang/zh-TW.d.ts +908 -0
- package/lib/locale/lang/zh-TW.umd.d.ts +908 -0
- package/lib/locale/ms-MY.umd.d.ts +908 -0
- package/lib/locale/nb-NO.umd.d.ts +908 -0
- package/lib/locale/pt-BR.umd.d.ts +908 -0
- package/lib/locale/ru-RU.umd.d.ts +908 -0
- package/lib/locale/th-TH.umd.d.ts +908 -0
- package/lib/locale/ug-CN.umd.d.ts +908 -0
- package/lib/locale/uk-UA.umd.d.ts +908 -0
- package/lib/locale/uz-UZ.umd.d.ts +908 -0
- package/lib/locale/vi-VN.umd.d.ts +908 -0
- package/lib/locale/zh-CHT.umd.d.ts +908 -0
- package/lib/locale/zh-CN.umd.d.ts +908 -0
- package/lib/locale/zh-HK.umd.d.ts +908 -0
- package/lib/locale/zh-MO.umd.d.ts +908 -0
- package/lib/locale/zh-TC.umd.d.ts +908 -0
- package/lib/locale/zh-TW.umd.d.ts +908 -0
- package/lib/table/index.d.ts +2672 -0
- package/lib/table/module/custom/hook.d.ts +1 -0
- package/lib/table/module/custom/panel.d.ts +17 -0
- package/lib/table/module/custom/panel.js +1588 -1585
- package/lib/table/module/edit/hook.d.ts +1 -0
- package/lib/table/module/export/export-panel.d.ts +27 -0
- package/lib/table/module/export/export-panel.js +587 -584
- package/lib/table/module/export/hook.d.ts +1 -0
- package/lib/table/module/export/import-panel.d.ts +27 -0
- package/lib/table/module/export/import-panel.js +258 -255
- package/lib/table/module/export/util.d.ts +5 -0
- package/lib/table/module/filter/hook.d.ts +1 -0
- package/lib/table/module/filter/hook.js +1 -15
- package/lib/table/module/filter/panel.d.ts +16 -0
- package/lib/table/module/filter/panel.js +281 -278
- package/lib/table/module/keyboard/hook.d.ts +1 -0
- package/lib/table/module/menu/hook.d.ts +1 -0
- package/lib/table/module/menu/panel.d.ts +2 -0
- package/lib/table/module/menu/panel.js +225 -222
- package/lib/table/module/validator/hook.d.ts +1 -0
- package/lib/table/render/index.d.ts +1 -0
- package/lib/table/src/body.d.ts +24 -0
- package/lib/table/src/body.js +895 -892
- package/lib/table/src/cell.d.ts +192 -0
- package/lib/table/src/column.d.ts +263 -0
- package/lib/table/src/columnInfo.d.ts +13 -0
- package/lib/table/src/emits.d.ts +2 -0
- package/lib/table/src/emits.js +2 -2
- package/lib/table/src/footer.d.ts +45 -0
- package/lib/table/src/footer.js +341 -338
- package/lib/table/src/group.d.ts +178 -0
- package/lib/table/src/header.d.ts +26 -0
- package/lib/table/src/header.js +539 -536
- package/lib/table/src/props.d.ts +238 -0
- package/lib/table/src/props.js +2 -2
- package/lib/table/src/store.d.ts +6 -0
- package/lib/table/src/table.d.ts +539 -0
- package/lib/table/src/table.js +13 -8
- package/lib/table/src/use/cell-view.d.ts +10 -0
- package/lib/table/src/use/index.d.ts +1 -0
- package/lib/table/src/util.d.ts +74 -0
- package/lib/toolbar/index.d.ts +340 -0
- package/lib/toolbar/src/toolbar.d.ts +75 -0
- package/lib/ui/index.d.ts +85 -0
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/anime.d.ts +10 -0
- package/lib/ui/src/comp.d.ts +2 -0
- package/lib/ui/src/dom.d.ts +80 -0
- package/lib/ui/src/log.d.ts +6 -0
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/utils.d.ts +23 -0
- package/lib/ui/src/vn.d.ts +7 -0
- package/lib/v-x-e-table/index.d.ts +2 -0
- package/lib/vxe-colgroup/index.d.ts +3 -0
- package/lib/vxe-column/index.d.ts +3 -0
- package/lib/vxe-grid/index.d.ts +3 -0
- package/lib/vxe-table/index.d.ts +3 -0
- package/lib/vxe-toolbar/index.d.ts +3 -0
- package/lib/vxe-ui/index.d.ts +3 -0
- package/package.json +2 -2
- package/packages/grid/src/emits.ts +2 -2
- package/packages/grid/src/grid.ts +8 -8
- package/packages/grid/src/props.ts +3 -3
- package/packages/index.ts +2 -2
- package/packages/table/module/custom/panel.ts +2 -2
- package/packages/table/module/export/export-panel.ts +2 -2
- package/packages/table/module/export/import-panel.ts +2 -2
- package/packages/table/module/filter/hook.ts +1 -15
- package/packages/table/module/filter/panel.ts +2 -2
- package/packages/table/module/menu/panel.ts +2 -2
- package/packages/table/src/body.ts +2 -2
- package/packages/table/src/emits.ts +1 -1
- package/packages/table/src/footer.ts +2 -2
- package/packages/table/src/header.ts +2 -2
- package/packages/table/src/props.ts +1 -1
- package/packages/table/src/table.ts +21 -33
- /package/dist/{iconfont.1793090564415.ttf → iconfont.1793627868721.ttf} +0 -0
- /package/dist/{iconfont.1793090564415.woff → iconfont.1793627868721.woff} +0 -0
- /package/dist/{iconfont.1793090564415.woff2 → iconfont.1793627868721.woff2} +0 -0
- /package/es/{iconfont.1793090564415.ttf → iconfont.1793627868721.ttf} +0 -0
- /package/es/{iconfont.1793090564415.woff → iconfont.1793627868721.woff} +0 -0
- /package/es/{iconfont.1793090564415.woff2 → iconfont.1793627868721.woff2} +0 -0
- /package/lib/{iconfont.1793090564415.ttf → iconfont.1793627868721.ttf} +0 -0
- /package/lib/{iconfont.1793090564415.woff → iconfont.1793627868721.woff} +0 -0
- /package/lib/{iconfont.1793090564415.woff2 → iconfont.1793627868721.woff2} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import type { VxeTableDefines } from '../../../../types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
defaultOptions: {
|
|
5
|
+
type: PropType<VxeTableDefines.ImportParamsObj>;
|
|
6
|
+
default: () => VxeTableDefines.ImportParamsObj;
|
|
7
|
+
};
|
|
8
|
+
storeData: {
|
|
9
|
+
type: PropType<VxeTableDefines.ImportStoreObj>;
|
|
10
|
+
default: () => VxeTableDefines.ImportStoreObj;
|
|
11
|
+
};
|
|
12
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
defaultOptions: {
|
|
16
|
+
type: PropType<VxeTableDefines.ImportParamsObj>;
|
|
17
|
+
default: () => VxeTableDefines.ImportParamsObj;
|
|
18
|
+
};
|
|
19
|
+
storeData: {
|
|
20
|
+
type: PropType<VxeTableDefines.ImportStoreObj>;
|
|
21
|
+
default: () => VxeTableDefines.ImportStoreObj;
|
|
22
|
+
};
|
|
23
|
+
}>>, {
|
|
24
|
+
defaultOptions: VxeTableDefines.ImportParamsObj;
|
|
25
|
+
storeData: VxeTableDefines.ImportStoreObj;
|
|
26
|
+
}, {}>;
|
|
27
|
+
export default _default;
|
|
@@ -39,269 +39,272 @@ var import_utils = require("../../../ui/src/utils");
|
|
|
39
39
|
var import_log = require("../../../ui/src/log");
|
|
40
40
|
const { errLog } = (0, import_log.createComponentLog)("table");
|
|
41
41
|
const { getI18n, getIcon, renderEmptyElement } = import_core.VxeUI;
|
|
42
|
-
var import_panel_default = (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
setup(props) {
|
|
55
|
-
const VxeUIModalComponent = import_core.VxeUI.getComponent("VxeModal");
|
|
56
|
-
const VxeUIButtonComponent = import_core.VxeUI.getComponent("VxeButton");
|
|
57
|
-
const VxeUISelectComponent = import_core.VxeUI.getComponent("VxeSelect");
|
|
58
|
-
const $xeTable = (0, import_vue.inject)("$xeTable", {});
|
|
59
|
-
const { computeImportOpts } = $xeTable.getComputeMaps();
|
|
60
|
-
const reactData = (0, import_vue.reactive)({
|
|
61
|
-
loading: false
|
|
62
|
-
});
|
|
63
|
-
const refFileBtn = (0, import_vue.ref)();
|
|
64
|
-
const computeSelectName = (0, import_vue.computed)(() => {
|
|
65
|
-
const { storeData } = props;
|
|
66
|
-
return `${storeData.filename}.${storeData.type}`;
|
|
67
|
-
});
|
|
68
|
-
const computeHasFile = (0, import_vue.computed)(() => {
|
|
69
|
-
const { storeData } = props;
|
|
70
|
-
return storeData.file && storeData.type;
|
|
71
|
-
});
|
|
72
|
-
const computeParseTypeLabel = (0, import_vue.computed)(() => {
|
|
73
|
-
const { storeData } = props;
|
|
74
|
-
const { type, typeList } = storeData;
|
|
75
|
-
if (type) {
|
|
76
|
-
const selectItem = import_xe_utils.default.find(typeList, (item) => type === item.value);
|
|
77
|
-
return `${selectItem ? selectItem.label : "*.*"}`;
|
|
42
|
+
var import_panel_default = (
|
|
43
|
+
/* define-vxe-component start */
|
|
44
|
+
(0, import_comp.defineVxeComponent)({
|
|
45
|
+
name: "VxeTableImportPanel",
|
|
46
|
+
props: {
|
|
47
|
+
defaultOptions: {
|
|
48
|
+
type: Object,
|
|
49
|
+
default: () => ({})
|
|
50
|
+
},
|
|
51
|
+
storeData: {
|
|
52
|
+
type: Object,
|
|
53
|
+
default: () => ({})
|
|
78
54
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
55
|
+
},
|
|
56
|
+
setup(props) {
|
|
57
|
+
const VxeUIModalComponent = import_core.VxeUI.getComponent("VxeModal");
|
|
58
|
+
const VxeUIButtonComponent = import_core.VxeUI.getComponent("VxeButton");
|
|
59
|
+
const VxeUISelectComponent = import_core.VxeUI.getComponent("VxeSelect");
|
|
60
|
+
const $xeTable = (0, import_vue.inject)("$xeTable", {});
|
|
61
|
+
const { computeImportOpts } = $xeTable.getComputeMaps();
|
|
62
|
+
const reactData = (0, import_vue.reactive)({
|
|
63
|
+
loading: false
|
|
87
64
|
});
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const { file } = params;
|
|
93
|
-
Object.assign(storeData, (0, import_utils.parseFile)(file), { file });
|
|
94
|
-
}).catch(() => {
|
|
65
|
+
const refFileBtn = (0, import_vue.ref)();
|
|
66
|
+
const computeSelectName = (0, import_vue.computed)(() => {
|
|
67
|
+
const { storeData } = props;
|
|
68
|
+
return `${storeData.filename}.${storeData.type}`;
|
|
95
69
|
});
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
70
|
+
const computeHasFile = (0, import_vue.computed)(() => {
|
|
71
|
+
const { storeData } = props;
|
|
72
|
+
return storeData.file && storeData.type;
|
|
73
|
+
});
|
|
74
|
+
const computeParseTypeLabel = (0, import_vue.computed)(() => {
|
|
75
|
+
const { storeData } = props;
|
|
76
|
+
const { type, typeList } = storeData;
|
|
77
|
+
if (type) {
|
|
78
|
+
const selectItem = import_xe_utils.default.find(typeList, (item) => type === item.value);
|
|
79
|
+
return `${selectItem ? selectItem.label : "*.*"}`;
|
|
102
80
|
}
|
|
81
|
+
return `*.${typeList.map((item) => item.value).join(", *.")}`;
|
|
103
82
|
});
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
83
|
+
const clearFileEvent = () => {
|
|
84
|
+
const { storeData } = props;
|
|
85
|
+
Object.assign(storeData, {
|
|
86
|
+
filename: "",
|
|
87
|
+
sheetName: "",
|
|
88
|
+
type: ""
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
const selectFileEvent = () => {
|
|
92
|
+
const { storeData, defaultOptions } = props;
|
|
93
|
+
$xeTable.readFile(defaultOptions).then((params) => {
|
|
94
|
+
const { file } = params;
|
|
95
|
+
Object.assign(storeData, (0, import_utils.parseFile)(file), { file });
|
|
96
|
+
}).catch(() => {
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
const showEvent = () => {
|
|
100
|
+
(0, import_vue.nextTick)(() => {
|
|
101
|
+
const targetElem = refFileBtn.value;
|
|
102
|
+
if (targetElem) {
|
|
103
|
+
targetElem.focus();
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const cancelEvent = () => {
|
|
108
|
+
const { storeData } = props;
|
|
115
109
|
storeData.visible = false;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
{
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
110
|
+
};
|
|
111
|
+
const importEvent = () => {
|
|
112
|
+
const { storeData, defaultOptions } = props;
|
|
113
|
+
const importOpts = computeImportOpts.value;
|
|
114
|
+
reactData.loading = true;
|
|
115
|
+
$xeTable.importByFile(storeData.file, Object.assign({}, importOpts, defaultOptions)).then(() => {
|
|
116
|
+
reactData.loading = false;
|
|
117
|
+
storeData.visible = false;
|
|
118
|
+
}).catch(() => {
|
|
119
|
+
reactData.loading = false;
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
const renderVN = () => {
|
|
123
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
124
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
125
|
+
const { defaultOptions, storeData } = props;
|
|
126
|
+
const selectName = computeSelectName.value;
|
|
127
|
+
const hasFile = computeHasFile.value;
|
|
128
|
+
const importOpts = computeImportOpts.value;
|
|
129
|
+
const parseTypeLabel = computeParseTypeLabel.value;
|
|
130
|
+
const modelOptions = importOpts.modelOptions || {};
|
|
131
|
+
const settingOptions = importOpts.settingOptions || {};
|
|
132
|
+
const slots = defaultOptions.slots || {};
|
|
133
|
+
const topSlot = slots.top;
|
|
134
|
+
const bottomSlot = slots.bottom;
|
|
135
|
+
const defaultSlot = slots.default;
|
|
136
|
+
const footerSlot = slots.footer;
|
|
137
|
+
return VxeUIModalComponent ? (0, import_vue.h)(
|
|
138
|
+
VxeUIModalComponent,
|
|
139
|
+
{
|
|
140
|
+
id: "VXE_IMPORT_MODAL",
|
|
141
|
+
modelValue: storeData.visible,
|
|
142
|
+
title: modelOptions.title || getI18n("vxe.import.impTitle"),
|
|
143
|
+
className: "vxe-table-export-popup-wrapper",
|
|
144
|
+
width: modelOptions.width || 540,
|
|
145
|
+
height: modelOptions.height,
|
|
146
|
+
minWidth: modelOptions.minWidth || 360,
|
|
147
|
+
minHeight: modelOptions.minHeight || 240,
|
|
148
|
+
mask: (0, import_utils.getDefaultConfig)(modelOptions.mask, true),
|
|
149
|
+
lockView: (0, import_utils.getDefaultConfig)(modelOptions.lockView, true),
|
|
150
|
+
showFooter: true,
|
|
151
|
+
escClosable: true,
|
|
152
|
+
maskClosable: true,
|
|
153
|
+
position: modelOptions.position,
|
|
154
|
+
fullscreen: modelOptions.fullscreen,
|
|
155
|
+
remember: modelOptions.remember,
|
|
156
|
+
showMinimize: modelOptions.showMinimize,
|
|
157
|
+
showMaximize: (0, import_utils.getDefaultConfig)(modelOptions.showMaximize, true),
|
|
158
|
+
resize: (0, import_utils.getDefaultConfig)(modelOptions.resize, true),
|
|
159
|
+
loading: reactData.loading,
|
|
160
|
+
"onUpdate:modelValue"(value) {
|
|
161
|
+
storeData.visible = value;
|
|
162
|
+
},
|
|
163
|
+
onShow: showEvent
|
|
160
164
|
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
])
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}) : renderEmptyElement($xeTable)
|
|
165
|
+
{
|
|
166
|
+
default: () => {
|
|
167
|
+
const params = {
|
|
168
|
+
$table: $xeTable,
|
|
169
|
+
$grid: $xeGrid,
|
|
170
|
+
$gantt: $xeGantt,
|
|
171
|
+
options: defaultOptions,
|
|
172
|
+
params: defaultOptions.params
|
|
173
|
+
};
|
|
174
|
+
return (0, import_vue.h)(
|
|
175
|
+
"div",
|
|
176
|
+
{
|
|
177
|
+
class: "vxe-table-export--panel"
|
|
178
|
+
},
|
|
179
|
+
[
|
|
180
|
+
topSlot ? (0, import_vue.h)(
|
|
181
|
+
"div",
|
|
182
|
+
{
|
|
183
|
+
class: "vxe-table-export--panel-top"
|
|
184
|
+
},
|
|
185
|
+
$xeTable.callSlot(topSlot, params)
|
|
186
|
+
) : renderEmptyElement($xeTable),
|
|
187
|
+
(0, import_vue.h)(
|
|
188
|
+
"div",
|
|
189
|
+
{
|
|
190
|
+
class: "vxe-table-export--panel-body"
|
|
191
|
+
},
|
|
192
|
+
defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
|
|
193
|
+
(0, import_vue.h)(
|
|
194
|
+
"table",
|
|
195
|
+
{
|
|
196
|
+
class: "vxe-table-export--panel-table",
|
|
197
|
+
cellspacing: 0,
|
|
198
|
+
cellpadding: 0,
|
|
199
|
+
border: 0
|
|
200
|
+
},
|
|
201
|
+
[
|
|
202
|
+
(0, import_vue.h)("tbody", [
|
|
203
|
+
(0, import_vue.h)("tr", [
|
|
204
|
+
(0, import_vue.h)("td", getI18n("vxe.import.impFile")),
|
|
205
|
+
(0, import_vue.h)("td", [
|
|
206
|
+
hasFile ? (0, import_vue.h)(
|
|
207
|
+
"div",
|
|
208
|
+
{
|
|
209
|
+
class: "vxe-table-export--selected--file",
|
|
210
|
+
title: selectName
|
|
211
|
+
},
|
|
212
|
+
[
|
|
213
|
+
(0, import_vue.h)("span", selectName),
|
|
214
|
+
(0, import_vue.h)("i", {
|
|
215
|
+
class: getIcon().INPUT_CLEAR,
|
|
216
|
+
onClick: clearFileEvent
|
|
217
|
+
})
|
|
218
|
+
]
|
|
219
|
+
) : (0, import_vue.h)(
|
|
220
|
+
"button",
|
|
221
|
+
{
|
|
222
|
+
ref: refFileBtn,
|
|
223
|
+
class: "vxe-table-export--select--file",
|
|
224
|
+
onClick: selectFileEvent
|
|
225
|
+
},
|
|
226
|
+
getI18n("vxe.import.impSelect")
|
|
227
|
+
)
|
|
228
|
+
])
|
|
229
|
+
]),
|
|
230
|
+
(0, import_vue.h)("tr", [(0, import_vue.h)("td", getI18n("vxe.import.impType")), (0, import_vue.h)("td", parseTypeLabel)]),
|
|
231
|
+
settingOptions.showMode === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
|
|
232
|
+
(0, import_vue.h)("td", getI18n("vxe.import.impMode")),
|
|
233
|
+
(0, import_vue.h)("td", [
|
|
234
|
+
VxeUISelectComponent ? (0, import_vue.h)(VxeUISelectComponent, {
|
|
235
|
+
modelValue: defaultOptions.mode,
|
|
236
|
+
options: storeData.modeList,
|
|
237
|
+
"onUpdate:modelValue"(value) {
|
|
238
|
+
defaultOptions.mode = value;
|
|
239
|
+
}
|
|
240
|
+
}) : renderEmptyElement($xeTable)
|
|
241
|
+
])
|
|
239
242
|
])
|
|
240
243
|
])
|
|
241
|
-
]
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
$xeTable
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
244
|
+
]
|
|
245
|
+
)
|
|
246
|
+
]
|
|
247
|
+
),
|
|
248
|
+
bottomSlot ? (0, import_vue.h)(
|
|
249
|
+
"div",
|
|
250
|
+
{
|
|
251
|
+
class: "vxe-table-export--panel-bottom"
|
|
252
|
+
},
|
|
253
|
+
$xeTable.callSlot(bottomSlot, params)
|
|
254
|
+
) : renderEmptyElement($xeTable)
|
|
255
|
+
]
|
|
256
|
+
);
|
|
257
|
+
},
|
|
258
|
+
footer() {
|
|
259
|
+
const params = {
|
|
260
|
+
$table: $xeTable,
|
|
261
|
+
$grid: $xeGrid,
|
|
262
|
+
$gantt: $xeGantt,
|
|
263
|
+
options: defaultOptions,
|
|
264
|
+
params: defaultOptions.params
|
|
265
|
+
};
|
|
266
|
+
return (0, import_vue.h)(
|
|
267
|
+
"div",
|
|
268
|
+
{
|
|
269
|
+
class: "vxe-table-export--panel-footer"
|
|
270
|
+
},
|
|
271
|
+
footerSlot ? $xeTable.callSlot(footerSlot, params) : [
|
|
272
|
+
(0, import_vue.h)(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
class: "vxe-table-export--panel-btns"
|
|
276
|
+
},
|
|
277
|
+
[
|
|
278
|
+
VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
279
|
+
content: getI18n("vxe.import.impCancel"),
|
|
280
|
+
onClick: cancelEvent
|
|
281
|
+
}) : renderEmptyElement($xeTable),
|
|
282
|
+
VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
283
|
+
status: "primary",
|
|
284
|
+
disabled: !hasFile || reactData.loading,
|
|
285
|
+
content: getI18n("vxe.import.impConfirm"),
|
|
286
|
+
onClick: importEvent
|
|
287
|
+
}) : renderEmptyElement($xeTable)
|
|
288
|
+
]
|
|
289
|
+
)
|
|
290
|
+
]
|
|
291
|
+
);
|
|
292
|
+
}
|
|
290
293
|
}
|
|
294
|
+
) : renderEmptyElement($xeTable);
|
|
295
|
+
};
|
|
296
|
+
(0, import_vue.nextTick)(() => {
|
|
297
|
+
if (!VxeUIModalComponent) {
|
|
298
|
+
errLog("vxe.error.reqComp", ["vxe-modal"]);
|
|
291
299
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
});
|
|
305
|
-
return renderVN;
|
|
306
|
-
}
|
|
307
|
-
});
|
|
300
|
+
if (!VxeUIButtonComponent) {
|
|
301
|
+
errLog("vxe.error.reqComp", ["vxe-button"]);
|
|
302
|
+
}
|
|
303
|
+
if (!VxeUISelectComponent) {
|
|
304
|
+
errLog("vxe.error.reqComp", ["vxe-select"]);
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
return renderVN;
|
|
308
|
+
}
|
|
309
|
+
})
|
|
310
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -28,21 +28,7 @@ var import_util = require("../../src/util");
|
|
|
28
28
|
var import_dom = require("../../../ui/src/dom");
|
|
29
29
|
var import_utils = require("../../../ui/src/utils");
|
|
30
30
|
const { renderer, hooks } = import_core.VxeUI;
|
|
31
|
-
const tableFilterMethodKeys = [
|
|
32
|
-
"openFilter",
|
|
33
|
-
"setFilter",
|
|
34
|
-
"clearFilter",
|
|
35
|
-
"saveFilter",
|
|
36
|
-
"saveFilterByEvent",
|
|
37
|
-
"saveFilterPanel",
|
|
38
|
-
"saveFilterPanelByEvent",
|
|
39
|
-
"resetFilter",
|
|
40
|
-
"resetFilterByEvent",
|
|
41
|
-
"resetFilterPanel",
|
|
42
|
-
"resetFilterPanelByEvent",
|
|
43
|
-
"getCheckedFilters",
|
|
44
|
-
"updateFilterOptionStatus"
|
|
45
|
-
];
|
|
31
|
+
const tableFilterMethodKeys = ["openFilter", "setFilter", "clearFilter", "saveFilter", "saveFilterByEvent", "saveFilterPanel", "saveFilterPanelByEvent", "resetFilter", "resetFilterByEvent", "resetFilterPanel", "resetFilterPanelByEvent", "getCheckedFilters", "updateFilterOptionStatus"];
|
|
46
32
|
const sourceType = "table";
|
|
47
33
|
hooks.add("tableFilterModule", {
|
|
48
34
|
setupTable($xeTable) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import type { VxeTableDefines } from '../../../../types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
filterStore: {
|
|
5
|
+
type: PropType<VxeTableDefines.FilterStoreObj>;
|
|
6
|
+
default: () => VxeTableDefines.FilterStoreObj;
|
|
7
|
+
};
|
|
8
|
+
}, any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
filterStore: {
|
|
10
|
+
type: PropType<VxeTableDefines.FilterStoreObj>;
|
|
11
|
+
default: () => VxeTableDefines.FilterStoreObj;
|
|
12
|
+
};
|
|
13
|
+
}>>, {
|
|
14
|
+
filterStore: VxeTableDefines.FilterStoreObj;
|
|
15
|
+
}, {}>;
|
|
16
|
+
export default _default;
|