vxe-table 4.23.11 → 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 +20675 -20631
- package/dist/all.esm.min.js +3 -0
- 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 +1670 -1667
- 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/column.js +39 -36
- 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/group.js +49 -46
- 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 +13744 -13724
- package/es/toolbar/index.d.ts +18 -18
- package/es/toolbar/src/toolbar.d.ts +3 -3
- package/es/toolbar/src/toolbar.js +595 -592
- package/es/ui/index.js +2 -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 +1666 -1663
- 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 +20675 -20631
- package/lib/index.umd.min.js +3 -3
- package/lib/locale/ar-EG.umd.d.ts +908 -0
- package/lib/locale/ar-EG.umd.min.js +1 -0
- package/lib/locale/de-DE.umd.d.ts +908 -0
- package/lib/locale/de-DE.umd.min.js +1 -0
- package/lib/locale/en-US.umd.d.ts +908 -0
- package/lib/locale/en-US.umd.min.js +1 -0
- package/lib/locale/es-ES.umd.d.ts +908 -0
- package/lib/locale/es-ES.umd.min.js +1 -0
- package/lib/locale/fr-FR.umd.d.ts +908 -0
- package/lib/locale/fr-FR.umd.min.js +1 -0
- package/lib/locale/hu-HU.umd.d.ts +908 -0
- package/lib/locale/hu-HU.umd.min.js +1 -0
- package/lib/locale/hy-AM.umd.d.ts +908 -0
- package/lib/locale/hy-AM.umd.min.js +1 -0
- package/lib/locale/id-ID.umd.d.ts +908 -0
- package/lib/locale/id-ID.umd.min.js +1 -0
- package/lib/locale/it-IT.umd.d.ts +908 -0
- package/lib/locale/it-IT.umd.min.js +1 -0
- package/lib/locale/ja-JP.umd.d.ts +908 -0
- package/lib/locale/ja-JP.umd.min.js +1 -0
- package/lib/locale/ko-KR.umd.d.ts +908 -0
- package/lib/locale/ko-KR.umd.min.js +1 -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/ar-EG.umd.min.js +1 -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/de-DE.umd.min.js +1 -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/en-US.umd.min.js +1 -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/es-ES.umd.min.js +1 -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/fr-FR.umd.min.js +1 -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/hu-HU.umd.min.js +1 -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/hy-AM.umd.min.js +1 -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/id-ID.umd.min.js +1 -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/it-IT.umd.min.js +1 -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/ja-JP.umd.min.js +1 -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/ko-KR.umd.min.js +1 -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/ms-MY.umd.min.js +1 -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/nb-NO.umd.min.js +1 -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/pt-BR.umd.min.js +1 -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/ru-RU.umd.min.js +1 -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/th-TH.umd.min.js +1 -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/ug-CN.umd.min.js +1 -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/uk-UA.umd.min.js +1 -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/uz-UZ.umd.min.js +1 -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/vi-VN.umd.min.js +1 -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-CHT.umd.min.js +1 -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-CN.umd.min.js +1 -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-HK.umd.min.js +1 -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-MO.umd.min.js +1 -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-TC.umd.min.js +1 -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/lang/zh-TW.umd.min.js +1 -0
- package/lib/locale/ms-MY.umd.d.ts +908 -0
- package/lib/locale/ms-MY.umd.min.js +1 -0
- package/lib/locale/nb-NO.umd.d.ts +908 -0
- package/lib/locale/nb-NO.umd.min.js +1 -0
- package/lib/locale/pt-BR.umd.d.ts +908 -0
- package/lib/locale/pt-BR.umd.min.js +1 -0
- package/lib/locale/ru-RU.umd.d.ts +908 -0
- package/lib/locale/ru-RU.umd.min.js +1 -0
- package/lib/locale/th-TH.umd.d.ts +908 -0
- package/lib/locale/th-TH.umd.min.js +1 -0
- package/lib/locale/ug-CN.umd.d.ts +908 -0
- package/lib/locale/ug-CN.umd.min.js +1 -0
- package/lib/locale/uk-UA.umd.d.ts +908 -0
- package/lib/locale/uk-UA.umd.min.js +1 -0
- package/lib/locale/uz-UZ.umd.d.ts +908 -0
- package/lib/locale/uz-UZ.umd.min.js +1 -0
- package/lib/locale/vi-VN.umd.d.ts +908 -0
- package/lib/locale/vi-VN.umd.min.js +1 -0
- package/lib/locale/zh-CHT.umd.d.ts +908 -0
- package/lib/locale/zh-CHT.umd.min.js +1 -0
- package/lib/locale/zh-CN.umd.d.ts +908 -0
- package/lib/locale/zh-CN.umd.min.js +1 -0
- package/lib/locale/zh-HK.umd.d.ts +908 -0
- package/lib/locale/zh-HK.umd.min.js +1 -0
- package/lib/locale/zh-MO.umd.d.ts +908 -0
- package/lib/locale/zh-MO.umd.min.js +1 -0
- package/lib/locale/zh-TC.umd.d.ts +908 -0
- package/lib/locale/zh-TC.umd.min.js +1 -0
- package/lib/locale/zh-TW.umd.d.ts +908 -0
- package/lib/locale/zh-TW.umd.min.js +1 -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/column.js +39 -36
- 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/group.js +49 -46
- 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 +13742 -13722
- 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/toolbar/src/toolbar.js +595 -592
- package/lib/ui/index.d.ts +85 -0
- package/lib/ui/index.js +2 -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 +9 -2
- package/packages/grid/src/emits.ts +2 -2
- package/packages/grid/src/grid.ts +10 -10
- 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/column.ts +2 -2
- package/packages/table/src/emits.ts +1 -1
- package/packages/table/src/footer.ts +2 -2
- package/packages/table/src/group.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 +74 -57
- package/packages/toolbar/src/toolbar.ts +2 -2
- package/packages/ui/index.ts +1 -0
- /package/dist/{iconfont.1793016957545.ttf → iconfont.1793627868721.ttf} +0 -0
- /package/dist/{iconfont.1793016957545.woff → iconfont.1793627868721.woff} +0 -0
- /package/dist/{iconfont.1793016957545.woff2 → iconfont.1793627868721.woff2} +0 -0
- /package/es/{iconfont.1793016957545.ttf → iconfont.1793627868721.ttf} +0 -0
- /package/es/{iconfont.1793016957545.woff → iconfont.1793627868721.woff} +0 -0
- /package/es/{iconfont.1793016957545.woff2 → iconfont.1793627868721.woff2} +0 -0
- /package/lib/{iconfont.1793016957545.ttf → iconfont.1793627868721.ttf} +0 -0
- /package/lib/{iconfont.1793016957545.woff → iconfont.1793627868721.woff} +0 -0
- /package/lib/{iconfont.1793016957545.woff2 → iconfont.1793627868721.woff2} +0 -0
|
@@ -39,603 +39,606 @@ 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 export_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 VxeUIInputComponent = import_core.VxeUI.getComponent("VxeInput");
|
|
59
|
-
const VxeUICheckboxComponent = import_core.VxeUI.getComponent("VxeCheckbox");
|
|
60
|
-
const $xeTable = (0, import_vue.inject)("$xeTable", {});
|
|
61
|
-
const { computeExportOpts, computePrintOpts } = $xeTable.getComputeMaps();
|
|
62
|
-
const reactData = (0, import_vue.reactive)({
|
|
63
|
-
isAll: false,
|
|
64
|
-
isIndeterminate: false,
|
|
65
|
-
loading: false
|
|
66
|
-
});
|
|
67
|
-
const xButtonConfirm = (0, import_vue.ref)();
|
|
68
|
-
const xInputFilename = (0, import_vue.ref)();
|
|
69
|
-
const xInputSheetname = (0, import_vue.ref)();
|
|
70
|
-
const computeColWidthModeOptions = (0, import_vue.computed)(() => {
|
|
71
|
-
return [
|
|
72
|
-
{ value: "", label: getI18n("vxe.export.wdModes.default") },
|
|
73
|
-
{ value: "auto", label: getI18n("vxe.export.wdModes.auto") },
|
|
74
|
-
{ value: "scale", label: getI18n("vxe.export.wdModes.scale") }
|
|
75
|
-
];
|
|
76
|
-
});
|
|
77
|
-
const computeCheckedAll = (0, import_vue.computed)(() => {
|
|
78
|
-
const { storeData } = props;
|
|
79
|
-
return storeData.columns.every((column) => column.checked);
|
|
80
|
-
});
|
|
81
|
-
const computeShowSheet = (0, import_vue.computed)(() => {
|
|
82
|
-
const { defaultOptions } = props;
|
|
83
|
-
return ["html", "xml", "xlsx", "pdf"].indexOf(defaultOptions.type) > -1;
|
|
84
|
-
});
|
|
85
|
-
const computeSupportMerge = (0, import_vue.computed)(() => {
|
|
86
|
-
const { storeData, defaultOptions } = props;
|
|
87
|
-
return !defaultOptions.original && defaultOptions.mode === "current" && (storeData.isPrint || ["html", "xlsx"].indexOf(defaultOptions.type) > -1);
|
|
88
|
-
});
|
|
89
|
-
const computeSupportStyle = (0, import_vue.computed)(() => {
|
|
90
|
-
const { defaultOptions } = props;
|
|
91
|
-
return !defaultOptions.original && ["xlsx"].indexOf(defaultOptions.type) > -1;
|
|
92
|
-
});
|
|
93
|
-
const handleOptionCheck = (column) => {
|
|
94
|
-
const { storeData } = props;
|
|
95
|
-
const matchObj = import_xe_utils.default.findTree(storeData.columns, (item) => item === column);
|
|
96
|
-
if (matchObj && matchObj.parent) {
|
|
97
|
-
const { parent } = matchObj;
|
|
98
|
-
if (parent.children && parent.children.length) {
|
|
99
|
-
parent.checked = parent.children.every((column2) => column2.checked);
|
|
100
|
-
parent.halfChecked = !parent.checked && parent.children.some((column2) => column2.checked || column2.halfChecked);
|
|
101
|
-
handleOptionCheck(parent);
|
|
102
|
-
}
|
|
42
|
+
var export_panel_default = (
|
|
43
|
+
/* define-vxe-component start */
|
|
44
|
+
(0, import_comp.defineVxeComponent)({
|
|
45
|
+
name: "VxeTableExportPanel",
|
|
46
|
+
props: {
|
|
47
|
+
defaultOptions: {
|
|
48
|
+
type: Object,
|
|
49
|
+
default: () => ({})
|
|
50
|
+
},
|
|
51
|
+
storeData: {
|
|
52
|
+
type: Object,
|
|
53
|
+
default: () => ({})
|
|
103
54
|
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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 VxeUIInputComponent = import_core.VxeUI.getComponent("VxeInput");
|
|
61
|
+
const VxeUICheckboxComponent = import_core.VxeUI.getComponent("VxeCheckbox");
|
|
62
|
+
const $xeTable = (0, import_vue.inject)("$xeTable", {});
|
|
63
|
+
const { computeExportOpts, computePrintOpts } = $xeTable.getComputeMaps();
|
|
64
|
+
const reactData = (0, import_vue.reactive)({
|
|
65
|
+
isAll: false,
|
|
66
|
+
isIndeterminate: false,
|
|
67
|
+
loading: false
|
|
116
68
|
});
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
column.halfChecked = false;
|
|
127
|
-
}
|
|
69
|
+
const xButtonConfirm = (0, import_vue.ref)();
|
|
70
|
+
const xInputFilename = (0, import_vue.ref)();
|
|
71
|
+
const xInputSheetname = (0, import_vue.ref)();
|
|
72
|
+
const computeColWidthModeOptions = (0, import_vue.computed)(() => {
|
|
73
|
+
return [
|
|
74
|
+
{ value: "", label: getI18n("vxe.export.wdModes.default") },
|
|
75
|
+
{ value: "auto", label: getI18n("vxe.export.wdModes.auto") },
|
|
76
|
+
{ value: "scale", label: getI18n("vxe.export.wdModes.scale") }
|
|
77
|
+
];
|
|
128
78
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const showEvent = () => {
|
|
133
|
-
(0, import_vue.nextTick)(() => {
|
|
134
|
-
const filenameInp = xInputFilename.value;
|
|
135
|
-
const sheetnameInp = xInputSheetname.value;
|
|
136
|
-
const confirmBtn = xButtonConfirm.value;
|
|
137
|
-
const targetElem = filenameInp || sheetnameInp || confirmBtn;
|
|
138
|
-
if (targetElem) {
|
|
139
|
-
targetElem.focus();
|
|
140
|
-
}
|
|
79
|
+
const computeCheckedAll = (0, import_vue.computed)(() => {
|
|
80
|
+
const { storeData } = props;
|
|
81
|
+
return storeData.columns.every((column) => column.checked);
|
|
141
82
|
});
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const { storeData, defaultOptions } = props;
|
|
146
|
-
const { hasMerge, columns } = storeData;
|
|
147
|
-
const checkedAll = computeCheckedAll.value;
|
|
148
|
-
const supportMerge = computeSupportMerge.value;
|
|
149
|
-
const expColumns = import_xe_utils.default.searchTree(columns, (column) => column.checked, { children: "children", mapChildren: "_children", original: true });
|
|
150
|
-
return Object.assign({}, defaultOptions, {
|
|
151
|
-
_columns: expColumns,
|
|
152
|
-
isMerge: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false
|
|
83
|
+
const computeShowSheet = (0, import_vue.computed)(() => {
|
|
84
|
+
const { defaultOptions } = props;
|
|
85
|
+
return ["html", "xml", "xlsx", "pdf"].indexOf(defaultOptions.type) > -1;
|
|
153
86
|
});
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
const printOpts = computePrintOpts.value;
|
|
158
|
-
storeData.visible = false;
|
|
159
|
-
$xeTable.print(Object.assign({}, printOpts, getExportOption()));
|
|
160
|
-
};
|
|
161
|
-
const exportEvent = () => {
|
|
162
|
-
const { storeData } = props;
|
|
163
|
-
const exportOpts = computeExportOpts.value;
|
|
164
|
-
reactData.loading = true;
|
|
165
|
-
$xeTable.exportData(Object.assign({}, exportOpts, getExportOption())).then(() => {
|
|
166
|
-
reactData.loading = false;
|
|
167
|
-
storeData.visible = false;
|
|
168
|
-
}).catch(() => {
|
|
169
|
-
reactData.loading = false;
|
|
87
|
+
const computeSupportMerge = (0, import_vue.computed)(() => {
|
|
88
|
+
const { storeData, defaultOptions } = props;
|
|
89
|
+
return !defaultOptions.original && defaultOptions.mode === "current" && (storeData.isPrint || ["html", "xlsx"].indexOf(defaultOptions.type) > -1);
|
|
170
90
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
storeData.visible = false;
|
|
175
|
-
};
|
|
176
|
-
const confirmEvent = () => {
|
|
177
|
-
const { storeData } = props;
|
|
178
|
-
if (storeData.isPrint) {
|
|
179
|
-
printEvent();
|
|
180
|
-
} else {
|
|
181
|
-
exportEvent();
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
const renderVN = () => {
|
|
185
|
-
const $xeGrid = $xeTable.xeGrid;
|
|
186
|
-
const $xeGantt = $xeTable.xeGantt;
|
|
187
|
-
const { defaultOptions, storeData } = props;
|
|
188
|
-
const { isAll: isAllChecked, isIndeterminate: isAllIndeterminate } = reactData;
|
|
189
|
-
const { hasTree, hasRowGroup, hasMerge, isPrint, hasColgroup, columns } = storeData;
|
|
190
|
-
const { isHeader } = defaultOptions;
|
|
191
|
-
const colVNs = [];
|
|
192
|
-
const exportOpts = computeExportOpts.value;
|
|
193
|
-
const printOpts = computePrintOpts.value;
|
|
194
|
-
const modelOptions = (isPrint ? printOpts : exportOpts).modelOptions || {};
|
|
195
|
-
const settingOptions = (isPrint ? printOpts : exportOpts).settingOptions || {};
|
|
196
|
-
const checkedAll = computeCheckedAll.value;
|
|
197
|
-
const showSheet = computeShowSheet.value;
|
|
198
|
-
const supportMerge = computeSupportMerge.value;
|
|
199
|
-
const supportStyle = computeSupportStyle.value;
|
|
200
|
-
const colWidthModeOptions = computeColWidthModeOptions.value;
|
|
201
|
-
const slots = defaultOptions.slots || {};
|
|
202
|
-
const topSlot = slots.top;
|
|
203
|
-
const bottomSlot = slots.bottom;
|
|
204
|
-
const defaultSlot = slots.default;
|
|
205
|
-
const footerSlot = slots.footer;
|
|
206
|
-
const parameterSlot = slots.parameter;
|
|
207
|
-
import_xe_utils.default.eachTree(columns, (column) => {
|
|
208
|
-
const colTitle = (0, import_utils.formatText)(column.getTitle(), 1);
|
|
209
|
-
const isColGroup = column.children && column.children.length;
|
|
210
|
-
const isChecked = column.checked;
|
|
211
|
-
const indeterminate = column.halfChecked;
|
|
212
|
-
const isHtml = column.type === "html";
|
|
213
|
-
colVNs.push(
|
|
214
|
-
(0, import_vue.h)(
|
|
215
|
-
"li",
|
|
216
|
-
{
|
|
217
|
-
key: column.id,
|
|
218
|
-
class: [
|
|
219
|
-
"vxe-table-export--panel-column-option",
|
|
220
|
-
`level--${column.level}`,
|
|
221
|
-
{
|
|
222
|
-
"is--group": isColGroup,
|
|
223
|
-
"is--checked": isChecked,
|
|
224
|
-
"is--indeterminate": indeterminate,
|
|
225
|
-
"is--disabled": column.disabled
|
|
226
|
-
}
|
|
227
|
-
],
|
|
228
|
-
title: isHtml ? "" : colTitle,
|
|
229
|
-
onClick: () => {
|
|
230
|
-
if (!column.disabled) {
|
|
231
|
-
changeOption(column);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
[
|
|
236
|
-
(0, import_vue.h)("span", {
|
|
237
|
-
class: ["vxe-checkbox--icon", indeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
238
|
-
}),
|
|
239
|
-
isHtml ? (0, import_vue.h)("span", {
|
|
240
|
-
key: "1",
|
|
241
|
-
class: "vxe-checkbox--label",
|
|
242
|
-
innerHTML: colTitle
|
|
243
|
-
}) : (0, import_vue.h)(
|
|
244
|
-
"span",
|
|
245
|
-
{
|
|
246
|
-
key: "0",
|
|
247
|
-
class: "vxe-checkbox--label"
|
|
248
|
-
},
|
|
249
|
-
colTitle
|
|
250
|
-
)
|
|
251
|
-
]
|
|
252
|
-
)
|
|
253
|
-
);
|
|
91
|
+
const computeSupportStyle = (0, import_vue.computed)(() => {
|
|
92
|
+
const { defaultOptions } = props;
|
|
93
|
+
return !defaultOptions.original && ["xlsx"].indexOf(defaultOptions.type) > -1;
|
|
254
94
|
});
|
|
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
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
95
|
+
const handleOptionCheck = (column) => {
|
|
96
|
+
const { storeData } = props;
|
|
97
|
+
const matchObj = import_xe_utils.default.findTree(storeData.columns, (item) => item === column);
|
|
98
|
+
if (matchObj && matchObj.parent) {
|
|
99
|
+
const { parent } = matchObj;
|
|
100
|
+
if (parent.children && parent.children.length) {
|
|
101
|
+
parent.checked = parent.children.every((column2) => column2.checked);
|
|
102
|
+
parent.halfChecked = !parent.checked && parent.children.some((column2) => column2.checked || column2.halfChecked);
|
|
103
|
+
handleOptionCheck(parent);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
const checkStatus = () => {
|
|
108
|
+
const { storeData } = props;
|
|
109
|
+
const columns = storeData.columns;
|
|
110
|
+
reactData.isAll = columns.every((column) => column.disabled || column.checked);
|
|
111
|
+
reactData.isIndeterminate = !reactData.isAll && columns.some((column) => !column.disabled && (column.checked || column.halfChecked));
|
|
112
|
+
};
|
|
113
|
+
const changeOption = (column) => {
|
|
114
|
+
const isChecked = !column.checked;
|
|
115
|
+
import_xe_utils.default.eachTree([column], (item) => {
|
|
116
|
+
item.checked = isChecked;
|
|
117
|
+
item.halfChecked = false;
|
|
118
|
+
});
|
|
119
|
+
handleOptionCheck(column);
|
|
120
|
+
checkStatus();
|
|
121
|
+
};
|
|
122
|
+
const allColumnEvent = () => {
|
|
123
|
+
const { storeData } = props;
|
|
124
|
+
const isAll = !reactData.isAll;
|
|
125
|
+
import_xe_utils.default.eachTree(storeData.columns, (column) => {
|
|
126
|
+
if (!column.disabled) {
|
|
127
|
+
column.checked = isAll;
|
|
128
|
+
column.halfChecked = false;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
reactData.isAll = isAll;
|
|
132
|
+
checkStatus();
|
|
133
|
+
};
|
|
134
|
+
const showEvent = () => {
|
|
135
|
+
(0, import_vue.nextTick)(() => {
|
|
136
|
+
const filenameInp = xInputFilename.value;
|
|
137
|
+
const sheetnameInp = xInputSheetname.value;
|
|
138
|
+
const confirmBtn = xButtonConfirm.value;
|
|
139
|
+
const targetElem = filenameInp || sheetnameInp || confirmBtn;
|
|
140
|
+
if (targetElem) {
|
|
141
|
+
targetElem.focus();
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
checkStatus();
|
|
145
|
+
};
|
|
146
|
+
const getExportOption = () => {
|
|
147
|
+
const { storeData, defaultOptions } = props;
|
|
148
|
+
const { hasMerge, columns } = storeData;
|
|
149
|
+
const checkedAll = computeCheckedAll.value;
|
|
150
|
+
const supportMerge = computeSupportMerge.value;
|
|
151
|
+
const expColumns = import_xe_utils.default.searchTree(columns, (column) => column.checked, { children: "children", mapChildren: "_children", original: true });
|
|
152
|
+
return Object.assign({}, defaultOptions, {
|
|
153
|
+
_columns: expColumns,
|
|
154
|
+
isMerge: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
const printEvent = () => {
|
|
158
|
+
const { storeData } = props;
|
|
159
|
+
const printOpts = computePrintOpts.value;
|
|
160
|
+
storeData.visible = false;
|
|
161
|
+
$xeTable.print(Object.assign({}, printOpts, getExportOption()));
|
|
162
|
+
};
|
|
163
|
+
const exportEvent = () => {
|
|
164
|
+
const { storeData } = props;
|
|
165
|
+
const exportOpts = computeExportOpts.value;
|
|
166
|
+
reactData.loading = true;
|
|
167
|
+
$xeTable.exportData(Object.assign({}, exportOpts, getExportOption())).then(() => {
|
|
168
|
+
reactData.loading = false;
|
|
169
|
+
storeData.visible = false;
|
|
170
|
+
}).catch(() => {
|
|
171
|
+
reactData.loading = false;
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
const cancelEvent = () => {
|
|
175
|
+
const { storeData } = props;
|
|
176
|
+
storeData.visible = false;
|
|
177
|
+
};
|
|
178
|
+
const confirmEvent = () => {
|
|
179
|
+
const { storeData } = props;
|
|
180
|
+
if (storeData.isPrint) {
|
|
181
|
+
printEvent();
|
|
182
|
+
} else {
|
|
183
|
+
exportEvent();
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
const renderVN = () => {
|
|
187
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
188
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
189
|
+
const { defaultOptions, storeData } = props;
|
|
190
|
+
const { isAll: isAllChecked, isIndeterminate: isAllIndeterminate } = reactData;
|
|
191
|
+
const { hasTree, hasRowGroup, hasMerge, isPrint, hasColgroup, columns } = storeData;
|
|
192
|
+
const { isHeader } = defaultOptions;
|
|
193
|
+
const colVNs = [];
|
|
194
|
+
const exportOpts = computeExportOpts.value;
|
|
195
|
+
const printOpts = computePrintOpts.value;
|
|
196
|
+
const modelOptions = (isPrint ? printOpts : exportOpts).modelOptions || {};
|
|
197
|
+
const settingOptions = (isPrint ? printOpts : exportOpts).settingOptions || {};
|
|
198
|
+
const checkedAll = computeCheckedAll.value;
|
|
199
|
+
const showSheet = computeShowSheet.value;
|
|
200
|
+
const supportMerge = computeSupportMerge.value;
|
|
201
|
+
const supportStyle = computeSupportStyle.value;
|
|
202
|
+
const colWidthModeOptions = computeColWidthModeOptions.value;
|
|
203
|
+
const slots = defaultOptions.slots || {};
|
|
204
|
+
const topSlot = slots.top;
|
|
205
|
+
const bottomSlot = slots.bottom;
|
|
206
|
+
const defaultSlot = slots.default;
|
|
207
|
+
const footerSlot = slots.footer;
|
|
208
|
+
const parameterSlot = slots.parameter;
|
|
209
|
+
import_xe_utils.default.eachTree(columns, (column) => {
|
|
210
|
+
const colTitle = (0, import_utils.formatText)(column.getTitle(), 1);
|
|
211
|
+
const isColGroup = column.children && column.children.length;
|
|
212
|
+
const isChecked = column.checked;
|
|
213
|
+
const indeterminate = column.halfChecked;
|
|
214
|
+
const isHtml = column.type === "html";
|
|
215
|
+
colVNs.push(
|
|
216
|
+
(0, import_vue.h)(
|
|
217
|
+
"li",
|
|
296
218
|
{
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
"div",
|
|
302
|
-
{
|
|
303
|
-
class: "vxe-table-export--panel-top"
|
|
304
|
-
},
|
|
305
|
-
$xeTable.callSlot(topSlot, params)
|
|
306
|
-
) : renderEmptyElement($xeTable),
|
|
307
|
-
(0, import_vue.h)(
|
|
308
|
-
"div",
|
|
219
|
+
key: column.id,
|
|
220
|
+
class: [
|
|
221
|
+
"vxe-table-export--panel-column-option",
|
|
222
|
+
`level--${column.level}`,
|
|
309
223
|
{
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
(0, import_vue.h)("tbody", [
|
|
323
|
-
[
|
|
324
|
-
isPrint || settingOptions.showFileName === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
|
|
325
|
-
(0, import_vue.h)("td", getI18n("vxe.export.expName")),
|
|
326
|
-
(0, import_vue.h)("td", [
|
|
327
|
-
VxeUIInputComponent ? (0, import_vue.h)(VxeUIInputComponent, {
|
|
328
|
-
ref: xInputFilename,
|
|
329
|
-
modelValue: defaultOptions.filename,
|
|
330
|
-
type: "text",
|
|
331
|
-
clearable: true,
|
|
332
|
-
placeholder: getI18n("vxe.export.expNamePlaceholder"),
|
|
333
|
-
"onUpdate:modelValue"(value) {
|
|
334
|
-
defaultOptions.filename = value;
|
|
335
|
-
}
|
|
336
|
-
}) : renderEmptyElement($xeTable)
|
|
337
|
-
])
|
|
338
|
-
]),
|
|
339
|
-
isPrint || settingOptions.showType === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
|
|
340
|
-
(0, import_vue.h)("td", getI18n("vxe.export.expType")),
|
|
341
|
-
(0, import_vue.h)("td", [
|
|
342
|
-
VxeUISelectComponent ? (0, import_vue.h)(VxeUISelectComponent, {
|
|
343
|
-
modelValue: defaultOptions.type,
|
|
344
|
-
options: storeData.typeList,
|
|
345
|
-
"onUpdate:modelValue"(value) {
|
|
346
|
-
defaultOptions.type = value;
|
|
347
|
-
}
|
|
348
|
-
}) : renderEmptyElement($xeTable)
|
|
349
|
-
])
|
|
350
|
-
]),
|
|
351
|
-
(isPrint || showSheet) && settingOptions.showSheet !== false ? (0, import_vue.h)("tr", [
|
|
352
|
-
(0, import_vue.h)("td", getI18n("vxe.export.expSheetName")),
|
|
353
|
-
(0, import_vue.h)("td", [
|
|
354
|
-
VxeUIInputComponent ? (0, import_vue.h)(VxeUIInputComponent, {
|
|
355
|
-
ref: xInputSheetname,
|
|
356
|
-
modelValue: defaultOptions.sheetName,
|
|
357
|
-
type: "text",
|
|
358
|
-
clearable: true,
|
|
359
|
-
placeholder: getI18n("vxe.export.expSheetNamePlaceholder"),
|
|
360
|
-
"onUpdate:modelValue"(value) {
|
|
361
|
-
defaultOptions.sheetName = value;
|
|
362
|
-
}
|
|
363
|
-
}) : renderEmptyElement($xeTable)
|
|
364
|
-
])
|
|
365
|
-
]) : renderEmptyElement($xeTable),
|
|
366
|
-
settingOptions.showMode === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
|
|
367
|
-
(0, import_vue.h)("td", getI18n("vxe.export.expMode")),
|
|
368
|
-
(0, import_vue.h)("td", [
|
|
369
|
-
VxeUISelectComponent ? (0, import_vue.h)(VxeUISelectComponent, {
|
|
370
|
-
modelValue: defaultOptions.mode,
|
|
371
|
-
options: storeData.modeList.map((item) => {
|
|
372
|
-
return {
|
|
373
|
-
value: item.value,
|
|
374
|
-
label: getI18n(item.label)
|
|
375
|
-
};
|
|
376
|
-
}),
|
|
377
|
-
"onUpdate:modelValue"(value) {
|
|
378
|
-
defaultOptions.mode = value;
|
|
379
|
-
}
|
|
380
|
-
}) : renderEmptyElement($xeTable)
|
|
381
|
-
])
|
|
382
|
-
]),
|
|
383
|
-
settingOptions.showColumn === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
|
|
384
|
-
(0, import_vue.h)("td", [getI18n("vxe.export.expColumn")]),
|
|
385
|
-
(0, import_vue.h)("td", [
|
|
386
|
-
(0, import_vue.h)(
|
|
387
|
-
"div",
|
|
388
|
-
{
|
|
389
|
-
class: "vxe-table-export--panel-column"
|
|
390
|
-
},
|
|
391
|
-
[
|
|
392
|
-
(0, import_vue.h)(
|
|
393
|
-
"ul",
|
|
394
|
-
{
|
|
395
|
-
class: "vxe-table-export--panel-column-header"
|
|
396
|
-
},
|
|
397
|
-
[
|
|
398
|
-
(0, import_vue.h)(
|
|
399
|
-
"li",
|
|
400
|
-
{
|
|
401
|
-
class: [
|
|
402
|
-
"vxe-table-export--panel-column-option",
|
|
403
|
-
{
|
|
404
|
-
"is--checked": isAllChecked,
|
|
405
|
-
"is--indeterminate": isAllIndeterminate
|
|
406
|
-
}
|
|
407
|
-
],
|
|
408
|
-
title: getI18n("vxe.table.allTitle"),
|
|
409
|
-
onClick: allColumnEvent
|
|
410
|
-
},
|
|
411
|
-
[
|
|
412
|
-
(0, import_vue.h)("span", {
|
|
413
|
-
class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
414
|
-
}),
|
|
415
|
-
(0, import_vue.h)(
|
|
416
|
-
"span",
|
|
417
|
-
{
|
|
418
|
-
class: "vxe-checkbox--label"
|
|
419
|
-
},
|
|
420
|
-
getI18n("vxe.export.expCurrentColumn")
|
|
421
|
-
)
|
|
422
|
-
]
|
|
423
|
-
)
|
|
424
|
-
]
|
|
425
|
-
),
|
|
426
|
-
(0, import_vue.h)(
|
|
427
|
-
"ul",
|
|
428
|
-
{
|
|
429
|
-
class: "vxe-table-export--panel-column-body"
|
|
430
|
-
},
|
|
431
|
-
colVNs
|
|
432
|
-
)
|
|
433
|
-
]
|
|
434
|
-
)
|
|
435
|
-
])
|
|
436
|
-
]),
|
|
437
|
-
isPrint && settingOptions.showWidthMode !== false ? (0, import_vue.h)("tr", [
|
|
438
|
-
(0, import_vue.h)("td", getI18n("vxe.export.widthMode")),
|
|
439
|
-
(0, import_vue.h)("td", [
|
|
440
|
-
VxeUISelectComponent ? (0, import_vue.h)(VxeUISelectComponent, {
|
|
441
|
-
modelValue: defaultOptions.widthMode,
|
|
442
|
-
options: colWidthModeOptions,
|
|
443
|
-
"onUpdate:modelValue"(value) {
|
|
444
|
-
defaultOptions.widthMode = value;
|
|
445
|
-
}
|
|
446
|
-
}) : renderEmptyElement($xeTable)
|
|
447
|
-
])
|
|
448
|
-
]) : renderEmptyElement($xeTable),
|
|
449
|
-
settingOptions.showParameter === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
|
|
450
|
-
(0, import_vue.h)("td", getI18n("vxe.export.expOpts")),
|
|
451
|
-
parameterSlot ? (0, import_vue.h)("td", [
|
|
452
|
-
(0, import_vue.h)(
|
|
453
|
-
"div",
|
|
454
|
-
{
|
|
455
|
-
class: "vxe-table-export--panel-option-row"
|
|
456
|
-
},
|
|
457
|
-
$xeTable.callSlot(parameterSlot, params)
|
|
458
|
-
)
|
|
459
|
-
]) : (0, import_vue.h)("td", [
|
|
460
|
-
(0, import_vue.h)(
|
|
461
|
-
"div",
|
|
462
|
-
{
|
|
463
|
-
class: "vxe-table-export--panel-option-row"
|
|
464
|
-
},
|
|
465
|
-
VxeUICheckboxComponent ? [
|
|
466
|
-
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
467
|
-
modelValue: hasEmptyData || isHeader,
|
|
468
|
-
disabled: hasEmptyData,
|
|
469
|
-
title: getI18n("vxe.export.expHeaderTitle"),
|
|
470
|
-
content: getI18n("vxe.export.expOptHeader"),
|
|
471
|
-
"onUpdate:modelValue"(value) {
|
|
472
|
-
defaultOptions.isHeader = value;
|
|
473
|
-
}
|
|
474
|
-
}),
|
|
475
|
-
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
476
|
-
modelValue: defaultOptions.isFooter,
|
|
477
|
-
disabled: !storeData.hasFooter,
|
|
478
|
-
title: getI18n("vxe.export.expFooterTitle"),
|
|
479
|
-
content: getI18n("vxe.export.expOptFooter"),
|
|
480
|
-
"onUpdate:modelValue"(value) {
|
|
481
|
-
defaultOptions.isFooter = value;
|
|
482
|
-
}
|
|
483
|
-
}),
|
|
484
|
-
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
485
|
-
modelValue: isHeader ? defaultOptions.isTitle : false,
|
|
486
|
-
disabled: !isHeader,
|
|
487
|
-
title: getI18n("vxe.export.expTitleTitle"),
|
|
488
|
-
content: getI18n("vxe.export.expOptTitle"),
|
|
489
|
-
"onUpdate:modelValue"(value) {
|
|
490
|
-
defaultOptions.isTitle = value;
|
|
491
|
-
}
|
|
492
|
-
}),
|
|
493
|
-
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
494
|
-
modelValue: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
495
|
-
title: getI18n("vxe.export.expColgroupTitle"),
|
|
496
|
-
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
497
|
-
content: getI18n("vxe.export.expOptColgroup"),
|
|
498
|
-
"onUpdate:modelValue"(value) {
|
|
499
|
-
defaultOptions.isColgroup = value;
|
|
500
|
-
}
|
|
501
|
-
})
|
|
502
|
-
] : []
|
|
503
|
-
),
|
|
504
|
-
(0, import_vue.h)(
|
|
505
|
-
"div",
|
|
506
|
-
{
|
|
507
|
-
class: "vxe-table-export--panel-option-row"
|
|
508
|
-
},
|
|
509
|
-
VxeUICheckboxComponent ? [
|
|
510
|
-
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
511
|
-
modelValue: hasEmptyData ? false : defaultOptions.original,
|
|
512
|
-
disabled: hasEmptyData,
|
|
513
|
-
title: getI18n("vxe.export.expOriginalTitle"),
|
|
514
|
-
content: getI18n("vxe.export.expOptOriginal"),
|
|
515
|
-
"onUpdate:modelValue"(value) {
|
|
516
|
-
defaultOptions.original = value;
|
|
517
|
-
}
|
|
518
|
-
}),
|
|
519
|
-
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
520
|
-
modelValue: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
521
|
-
title: getI18n("vxe.export.expMergeTitle"),
|
|
522
|
-
disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
|
|
523
|
-
content: getI18n("vxe.export.expOptMerge"),
|
|
524
|
-
"onUpdate:modelValue"(value) {
|
|
525
|
-
defaultOptions.isMerge = value;
|
|
526
|
-
}
|
|
527
|
-
}),
|
|
528
|
-
isPrint ? renderEmptyElement($xeTable) : (0, import_vue.h)(VxeUICheckboxComponent, {
|
|
529
|
-
modelValue: supportStyle ? defaultOptions.useStyle : false,
|
|
530
|
-
disabled: !supportStyle,
|
|
531
|
-
title: getI18n("vxe.export.expUseStyleTitle"),
|
|
532
|
-
content: getI18n("vxe.export.expOptUseStyle"),
|
|
533
|
-
"onUpdate:modelValue"(value) {
|
|
534
|
-
defaultOptions.useStyle = value;
|
|
535
|
-
}
|
|
536
|
-
})
|
|
537
|
-
] : []
|
|
538
|
-
),
|
|
539
|
-
(0, import_vue.h)(
|
|
540
|
-
"div",
|
|
541
|
-
{
|
|
542
|
-
class: "vxe-table-export--panel-option-row"
|
|
543
|
-
},
|
|
544
|
-
VxeUICheckboxComponent ? [
|
|
545
|
-
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
546
|
-
modelValue: hasTree ? defaultOptions.isTreeAllExpanded : false,
|
|
547
|
-
disabled: hasEmptyData || !hasTree,
|
|
548
|
-
title: getI18n("vxe.export.expTreeAllExpandTitle"),
|
|
549
|
-
content: getI18n("vxe.export.expOptTreeAllExpand"),
|
|
550
|
-
"onUpdate:modelValue"(value) {
|
|
551
|
-
defaultOptions.isTreeAllExpanded = value;
|
|
552
|
-
}
|
|
553
|
-
}),
|
|
554
|
-
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
555
|
-
modelValue: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
|
|
556
|
-
disabled: hasEmptyData || !hasRowGroup,
|
|
557
|
-
title: getI18n("vxe.export.expRowGroupAllExpandTitle"),
|
|
558
|
-
content: getI18n("vxe.export.expOptRowGroupAllExpand"),
|
|
559
|
-
"onUpdate:modelValue"(value) {
|
|
560
|
-
defaultOptions.isRowGroupAllExpanded = value;
|
|
561
|
-
}
|
|
562
|
-
})
|
|
563
|
-
] : []
|
|
564
|
-
)
|
|
565
|
-
])
|
|
566
|
-
])
|
|
567
|
-
]
|
|
568
|
-
])
|
|
569
|
-
]
|
|
570
|
-
)
|
|
571
|
-
]
|
|
572
|
-
),
|
|
573
|
-
bottomSlot ? (0, import_vue.h)(
|
|
574
|
-
"div",
|
|
575
|
-
{
|
|
576
|
-
class: "vxe-table-export--panel-bottom"
|
|
577
|
-
},
|
|
578
|
-
$xeTable.callSlot(bottomSlot, params)
|
|
579
|
-
) : renderEmptyElement($xeTable)
|
|
580
|
-
]
|
|
581
|
-
);
|
|
582
|
-
},
|
|
583
|
-
footer() {
|
|
584
|
-
const params = {
|
|
585
|
-
$table: $xeTable,
|
|
586
|
-
$grid: $xeGrid,
|
|
587
|
-
$gantt: $xeGantt,
|
|
588
|
-
options: defaultOptions,
|
|
589
|
-
columns,
|
|
590
|
-
params: defaultOptions.params
|
|
591
|
-
};
|
|
592
|
-
return (0, import_vue.h)(
|
|
593
|
-
"div",
|
|
594
|
-
{
|
|
595
|
-
class: "vxe-table-export--panel-footer"
|
|
224
|
+
"is--group": isColGroup,
|
|
225
|
+
"is--checked": isChecked,
|
|
226
|
+
"is--indeterminate": indeterminate,
|
|
227
|
+
"is--disabled": column.disabled
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
title: isHtml ? "" : colTitle,
|
|
231
|
+
onClick: () => {
|
|
232
|
+
if (!column.disabled) {
|
|
233
|
+
changeOption(column);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
596
236
|
},
|
|
597
|
-
|
|
598
|
-
(0, import_vue.h)(
|
|
599
|
-
"
|
|
237
|
+
[
|
|
238
|
+
(0, import_vue.h)("span", {
|
|
239
|
+
class: ["vxe-checkbox--icon", indeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
240
|
+
}),
|
|
241
|
+
isHtml ? (0, import_vue.h)("span", {
|
|
242
|
+
key: "1",
|
|
243
|
+
class: "vxe-checkbox--label",
|
|
244
|
+
innerHTML: colTitle
|
|
245
|
+
}) : (0, import_vue.h)(
|
|
246
|
+
"span",
|
|
600
247
|
{
|
|
601
|
-
|
|
248
|
+
key: "0",
|
|
249
|
+
class: "vxe-checkbox--label"
|
|
602
250
|
},
|
|
603
|
-
|
|
604
|
-
VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
605
|
-
content: getI18n("vxe.export.expCancel"),
|
|
606
|
-
onClick: cancelEvent
|
|
607
|
-
}) : renderEmptyElement($xeTable),
|
|
608
|
-
VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
609
|
-
ref: xButtonConfirm,
|
|
610
|
-
status: "primary",
|
|
611
|
-
content: getI18n(isPrint ? "vxe.export.expPrint" : "vxe.export.expConfirm"),
|
|
612
|
-
onClick: confirmEvent
|
|
613
|
-
}) : renderEmptyElement($xeTable)
|
|
614
|
-
]
|
|
251
|
+
colTitle
|
|
615
252
|
)
|
|
616
253
|
]
|
|
617
|
-
)
|
|
254
|
+
)
|
|
255
|
+
);
|
|
256
|
+
});
|
|
257
|
+
return VxeUIModalComponent ? (0, import_vue.h)(
|
|
258
|
+
VxeUIModalComponent,
|
|
259
|
+
{
|
|
260
|
+
id: "VXE_EXPORT_MODAL",
|
|
261
|
+
modelValue: storeData.visible,
|
|
262
|
+
title: modelOptions.title || getI18n(isPrint ? "vxe.export.printTitle" : "vxe.export.expTitle"),
|
|
263
|
+
className: "vxe-table-export-popup-wrapper",
|
|
264
|
+
width: modelOptions.width || 660,
|
|
265
|
+
height: modelOptions.height,
|
|
266
|
+
minWidth: modelOptions.minWidth || 500,
|
|
267
|
+
minHeight: modelOptions.minHeight || 400,
|
|
268
|
+
mask: (0, import_utils.getDefaultConfig)(modelOptions.mask, true),
|
|
269
|
+
lockView: (0, import_utils.getDefaultConfig)(modelOptions.lockView, true),
|
|
270
|
+
showFooter: true,
|
|
271
|
+
escClosable: true,
|
|
272
|
+
maskClosable: true,
|
|
273
|
+
position: modelOptions.position,
|
|
274
|
+
fullscreen: modelOptions.fullscreen,
|
|
275
|
+
remember: modelOptions.remember,
|
|
276
|
+
showMinimize: modelOptions.showMinimize,
|
|
277
|
+
showMaximize: (0, import_utils.getDefaultConfig)(modelOptions.showMaximize, true),
|
|
278
|
+
resize: (0, import_utils.getDefaultConfig)(modelOptions.resize, true),
|
|
279
|
+
loading: reactData.loading,
|
|
280
|
+
"onUpdate:modelValue"(value) {
|
|
281
|
+
storeData.visible = value;
|
|
282
|
+
},
|
|
283
|
+
onShow: showEvent
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
default: () => {
|
|
287
|
+
const params = {
|
|
288
|
+
$table: $xeTable,
|
|
289
|
+
$grid: $xeGrid,
|
|
290
|
+
$gantt: $xeGantt,
|
|
291
|
+
options: defaultOptions,
|
|
292
|
+
columns,
|
|
293
|
+
params: defaultOptions.params
|
|
294
|
+
};
|
|
295
|
+
const hasEmptyData = defaultOptions.mode === "empty";
|
|
296
|
+
return (0, import_vue.h)(
|
|
297
|
+
"div",
|
|
298
|
+
{
|
|
299
|
+
class: "vxe-table-export--panel"
|
|
300
|
+
},
|
|
301
|
+
[
|
|
302
|
+
topSlot ? (0, import_vue.h)(
|
|
303
|
+
"div",
|
|
304
|
+
{
|
|
305
|
+
class: "vxe-table-export--panel-top"
|
|
306
|
+
},
|
|
307
|
+
$xeTable.callSlot(topSlot, params)
|
|
308
|
+
) : renderEmptyElement($xeTable),
|
|
309
|
+
(0, import_vue.h)(
|
|
310
|
+
"div",
|
|
311
|
+
{
|
|
312
|
+
class: "vxe-table-export--panel-body"
|
|
313
|
+
},
|
|
314
|
+
defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
|
|
315
|
+
(0, import_vue.h)(
|
|
316
|
+
"table",
|
|
317
|
+
{
|
|
318
|
+
class: "vxe-table-export--panel-table",
|
|
319
|
+
cellspacing: 0,
|
|
320
|
+
cellpadding: 0,
|
|
321
|
+
border: 0
|
|
322
|
+
},
|
|
323
|
+
[
|
|
324
|
+
(0, import_vue.h)("tbody", [
|
|
325
|
+
[
|
|
326
|
+
isPrint || settingOptions.showFileName === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
|
|
327
|
+
(0, import_vue.h)("td", getI18n("vxe.export.expName")),
|
|
328
|
+
(0, import_vue.h)("td", [
|
|
329
|
+
VxeUIInputComponent ? (0, import_vue.h)(VxeUIInputComponent, {
|
|
330
|
+
ref: xInputFilename,
|
|
331
|
+
modelValue: defaultOptions.filename,
|
|
332
|
+
type: "text",
|
|
333
|
+
clearable: true,
|
|
334
|
+
placeholder: getI18n("vxe.export.expNamePlaceholder"),
|
|
335
|
+
"onUpdate:modelValue"(value) {
|
|
336
|
+
defaultOptions.filename = value;
|
|
337
|
+
}
|
|
338
|
+
}) : renderEmptyElement($xeTable)
|
|
339
|
+
])
|
|
340
|
+
]),
|
|
341
|
+
isPrint || settingOptions.showType === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
|
|
342
|
+
(0, import_vue.h)("td", getI18n("vxe.export.expType")),
|
|
343
|
+
(0, import_vue.h)("td", [
|
|
344
|
+
VxeUISelectComponent ? (0, import_vue.h)(VxeUISelectComponent, {
|
|
345
|
+
modelValue: defaultOptions.type,
|
|
346
|
+
options: storeData.typeList,
|
|
347
|
+
"onUpdate:modelValue"(value) {
|
|
348
|
+
defaultOptions.type = value;
|
|
349
|
+
}
|
|
350
|
+
}) : renderEmptyElement($xeTable)
|
|
351
|
+
])
|
|
352
|
+
]),
|
|
353
|
+
(isPrint || showSheet) && settingOptions.showSheet !== false ? (0, import_vue.h)("tr", [
|
|
354
|
+
(0, import_vue.h)("td", getI18n("vxe.export.expSheetName")),
|
|
355
|
+
(0, import_vue.h)("td", [
|
|
356
|
+
VxeUIInputComponent ? (0, import_vue.h)(VxeUIInputComponent, {
|
|
357
|
+
ref: xInputSheetname,
|
|
358
|
+
modelValue: defaultOptions.sheetName,
|
|
359
|
+
type: "text",
|
|
360
|
+
clearable: true,
|
|
361
|
+
placeholder: getI18n("vxe.export.expSheetNamePlaceholder"),
|
|
362
|
+
"onUpdate:modelValue"(value) {
|
|
363
|
+
defaultOptions.sheetName = value;
|
|
364
|
+
}
|
|
365
|
+
}) : renderEmptyElement($xeTable)
|
|
366
|
+
])
|
|
367
|
+
]) : renderEmptyElement($xeTable),
|
|
368
|
+
settingOptions.showMode === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
|
|
369
|
+
(0, import_vue.h)("td", getI18n("vxe.export.expMode")),
|
|
370
|
+
(0, import_vue.h)("td", [
|
|
371
|
+
VxeUISelectComponent ? (0, import_vue.h)(VxeUISelectComponent, {
|
|
372
|
+
modelValue: defaultOptions.mode,
|
|
373
|
+
options: storeData.modeList.map((item) => {
|
|
374
|
+
return {
|
|
375
|
+
value: item.value,
|
|
376
|
+
label: getI18n(item.label)
|
|
377
|
+
};
|
|
378
|
+
}),
|
|
379
|
+
"onUpdate:modelValue"(value) {
|
|
380
|
+
defaultOptions.mode = value;
|
|
381
|
+
}
|
|
382
|
+
}) : renderEmptyElement($xeTable)
|
|
383
|
+
])
|
|
384
|
+
]),
|
|
385
|
+
settingOptions.showColumn === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
|
|
386
|
+
(0, import_vue.h)("td", [getI18n("vxe.export.expColumn")]),
|
|
387
|
+
(0, import_vue.h)("td", [
|
|
388
|
+
(0, import_vue.h)(
|
|
389
|
+
"div",
|
|
390
|
+
{
|
|
391
|
+
class: "vxe-table-export--panel-column"
|
|
392
|
+
},
|
|
393
|
+
[
|
|
394
|
+
(0, import_vue.h)(
|
|
395
|
+
"ul",
|
|
396
|
+
{
|
|
397
|
+
class: "vxe-table-export--panel-column-header"
|
|
398
|
+
},
|
|
399
|
+
[
|
|
400
|
+
(0, import_vue.h)(
|
|
401
|
+
"li",
|
|
402
|
+
{
|
|
403
|
+
class: [
|
|
404
|
+
"vxe-table-export--panel-column-option",
|
|
405
|
+
{
|
|
406
|
+
"is--checked": isAllChecked,
|
|
407
|
+
"is--indeterminate": isAllIndeterminate
|
|
408
|
+
}
|
|
409
|
+
],
|
|
410
|
+
title: getI18n("vxe.table.allTitle"),
|
|
411
|
+
onClick: allColumnEvent
|
|
412
|
+
},
|
|
413
|
+
[
|
|
414
|
+
(0, import_vue.h)("span", {
|
|
415
|
+
class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
416
|
+
}),
|
|
417
|
+
(0, import_vue.h)(
|
|
418
|
+
"span",
|
|
419
|
+
{
|
|
420
|
+
class: "vxe-checkbox--label"
|
|
421
|
+
},
|
|
422
|
+
getI18n("vxe.export.expCurrentColumn")
|
|
423
|
+
)
|
|
424
|
+
]
|
|
425
|
+
)
|
|
426
|
+
]
|
|
427
|
+
),
|
|
428
|
+
(0, import_vue.h)(
|
|
429
|
+
"ul",
|
|
430
|
+
{
|
|
431
|
+
class: "vxe-table-export--panel-column-body"
|
|
432
|
+
},
|
|
433
|
+
colVNs
|
|
434
|
+
)
|
|
435
|
+
]
|
|
436
|
+
)
|
|
437
|
+
])
|
|
438
|
+
]),
|
|
439
|
+
isPrint && settingOptions.showWidthMode !== false ? (0, import_vue.h)("tr", [
|
|
440
|
+
(0, import_vue.h)("td", getI18n("vxe.export.widthMode")),
|
|
441
|
+
(0, import_vue.h)("td", [
|
|
442
|
+
VxeUISelectComponent ? (0, import_vue.h)(VxeUISelectComponent, {
|
|
443
|
+
modelValue: defaultOptions.widthMode,
|
|
444
|
+
options: colWidthModeOptions,
|
|
445
|
+
"onUpdate:modelValue"(value) {
|
|
446
|
+
defaultOptions.widthMode = value;
|
|
447
|
+
}
|
|
448
|
+
}) : renderEmptyElement($xeTable)
|
|
449
|
+
])
|
|
450
|
+
]) : renderEmptyElement($xeTable),
|
|
451
|
+
settingOptions.showParameter === false ? renderEmptyElement($xeTable) : (0, import_vue.h)("tr", [
|
|
452
|
+
(0, import_vue.h)("td", getI18n("vxe.export.expOpts")),
|
|
453
|
+
parameterSlot ? (0, import_vue.h)("td", [
|
|
454
|
+
(0, import_vue.h)(
|
|
455
|
+
"div",
|
|
456
|
+
{
|
|
457
|
+
class: "vxe-table-export--panel-option-row"
|
|
458
|
+
},
|
|
459
|
+
$xeTable.callSlot(parameterSlot, params)
|
|
460
|
+
)
|
|
461
|
+
]) : (0, import_vue.h)("td", [
|
|
462
|
+
(0, import_vue.h)(
|
|
463
|
+
"div",
|
|
464
|
+
{
|
|
465
|
+
class: "vxe-table-export--panel-option-row"
|
|
466
|
+
},
|
|
467
|
+
VxeUICheckboxComponent ? [
|
|
468
|
+
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
469
|
+
modelValue: hasEmptyData || isHeader,
|
|
470
|
+
disabled: hasEmptyData,
|
|
471
|
+
title: getI18n("vxe.export.expHeaderTitle"),
|
|
472
|
+
content: getI18n("vxe.export.expOptHeader"),
|
|
473
|
+
"onUpdate:modelValue"(value) {
|
|
474
|
+
defaultOptions.isHeader = value;
|
|
475
|
+
}
|
|
476
|
+
}),
|
|
477
|
+
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
478
|
+
modelValue: defaultOptions.isFooter,
|
|
479
|
+
disabled: !storeData.hasFooter,
|
|
480
|
+
title: getI18n("vxe.export.expFooterTitle"),
|
|
481
|
+
content: getI18n("vxe.export.expOptFooter"),
|
|
482
|
+
"onUpdate:modelValue"(value) {
|
|
483
|
+
defaultOptions.isFooter = value;
|
|
484
|
+
}
|
|
485
|
+
}),
|
|
486
|
+
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
487
|
+
modelValue: isHeader ? defaultOptions.isTitle : false,
|
|
488
|
+
disabled: !isHeader,
|
|
489
|
+
title: getI18n("vxe.export.expTitleTitle"),
|
|
490
|
+
content: getI18n("vxe.export.expOptTitle"),
|
|
491
|
+
"onUpdate:modelValue"(value) {
|
|
492
|
+
defaultOptions.isTitle = value;
|
|
493
|
+
}
|
|
494
|
+
}),
|
|
495
|
+
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
496
|
+
modelValue: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
497
|
+
title: getI18n("vxe.export.expColgroupTitle"),
|
|
498
|
+
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
499
|
+
content: getI18n("vxe.export.expOptColgroup"),
|
|
500
|
+
"onUpdate:modelValue"(value) {
|
|
501
|
+
defaultOptions.isColgroup = value;
|
|
502
|
+
}
|
|
503
|
+
})
|
|
504
|
+
] : []
|
|
505
|
+
),
|
|
506
|
+
(0, import_vue.h)(
|
|
507
|
+
"div",
|
|
508
|
+
{
|
|
509
|
+
class: "vxe-table-export--panel-option-row"
|
|
510
|
+
},
|
|
511
|
+
VxeUICheckboxComponent ? [
|
|
512
|
+
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
513
|
+
modelValue: hasEmptyData ? false : defaultOptions.original,
|
|
514
|
+
disabled: hasEmptyData,
|
|
515
|
+
title: getI18n("vxe.export.expOriginalTitle"),
|
|
516
|
+
content: getI18n("vxe.export.expOptOriginal"),
|
|
517
|
+
"onUpdate:modelValue"(value) {
|
|
518
|
+
defaultOptions.original = value;
|
|
519
|
+
}
|
|
520
|
+
}),
|
|
521
|
+
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
522
|
+
modelValue: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
523
|
+
title: getI18n("vxe.export.expMergeTitle"),
|
|
524
|
+
disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
|
|
525
|
+
content: getI18n("vxe.export.expOptMerge"),
|
|
526
|
+
"onUpdate:modelValue"(value) {
|
|
527
|
+
defaultOptions.isMerge = value;
|
|
528
|
+
}
|
|
529
|
+
}),
|
|
530
|
+
isPrint ? renderEmptyElement($xeTable) : (0, import_vue.h)(VxeUICheckboxComponent, {
|
|
531
|
+
modelValue: supportStyle ? defaultOptions.useStyle : false,
|
|
532
|
+
disabled: !supportStyle,
|
|
533
|
+
title: getI18n("vxe.export.expUseStyleTitle"),
|
|
534
|
+
content: getI18n("vxe.export.expOptUseStyle"),
|
|
535
|
+
"onUpdate:modelValue"(value) {
|
|
536
|
+
defaultOptions.useStyle = value;
|
|
537
|
+
}
|
|
538
|
+
})
|
|
539
|
+
] : []
|
|
540
|
+
),
|
|
541
|
+
(0, import_vue.h)(
|
|
542
|
+
"div",
|
|
543
|
+
{
|
|
544
|
+
class: "vxe-table-export--panel-option-row"
|
|
545
|
+
},
|
|
546
|
+
VxeUICheckboxComponent ? [
|
|
547
|
+
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
548
|
+
modelValue: hasTree ? defaultOptions.isTreeAllExpanded : false,
|
|
549
|
+
disabled: hasEmptyData || !hasTree,
|
|
550
|
+
title: getI18n("vxe.export.expTreeAllExpandTitle"),
|
|
551
|
+
content: getI18n("vxe.export.expOptTreeAllExpand"),
|
|
552
|
+
"onUpdate:modelValue"(value) {
|
|
553
|
+
defaultOptions.isTreeAllExpanded = value;
|
|
554
|
+
}
|
|
555
|
+
}),
|
|
556
|
+
(0, import_vue.h)(VxeUICheckboxComponent, {
|
|
557
|
+
modelValue: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
|
|
558
|
+
disabled: hasEmptyData || !hasRowGroup,
|
|
559
|
+
title: getI18n("vxe.export.expRowGroupAllExpandTitle"),
|
|
560
|
+
content: getI18n("vxe.export.expOptRowGroupAllExpand"),
|
|
561
|
+
"onUpdate:modelValue"(value) {
|
|
562
|
+
defaultOptions.isRowGroupAllExpanded = value;
|
|
563
|
+
}
|
|
564
|
+
})
|
|
565
|
+
] : []
|
|
566
|
+
)
|
|
567
|
+
])
|
|
568
|
+
])
|
|
569
|
+
]
|
|
570
|
+
])
|
|
571
|
+
]
|
|
572
|
+
)
|
|
573
|
+
]
|
|
574
|
+
),
|
|
575
|
+
bottomSlot ? (0, import_vue.h)(
|
|
576
|
+
"div",
|
|
577
|
+
{
|
|
578
|
+
class: "vxe-table-export--panel-bottom"
|
|
579
|
+
},
|
|
580
|
+
$xeTable.callSlot(bottomSlot, params)
|
|
581
|
+
) : renderEmptyElement($xeTable)
|
|
582
|
+
]
|
|
583
|
+
);
|
|
584
|
+
},
|
|
585
|
+
footer() {
|
|
586
|
+
const params = {
|
|
587
|
+
$table: $xeTable,
|
|
588
|
+
$grid: $xeGrid,
|
|
589
|
+
$gantt: $xeGantt,
|
|
590
|
+
options: defaultOptions,
|
|
591
|
+
columns,
|
|
592
|
+
params: defaultOptions.params
|
|
593
|
+
};
|
|
594
|
+
return (0, import_vue.h)(
|
|
595
|
+
"div",
|
|
596
|
+
{
|
|
597
|
+
class: "vxe-table-export--panel-footer"
|
|
598
|
+
},
|
|
599
|
+
footerSlot ? $xeTable.callSlot(footerSlot, params) : [
|
|
600
|
+
(0, import_vue.h)(
|
|
601
|
+
"div",
|
|
602
|
+
{
|
|
603
|
+
class: "vxe-table-export--panel-btns"
|
|
604
|
+
},
|
|
605
|
+
[
|
|
606
|
+
VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
607
|
+
content: getI18n("vxe.export.expCancel"),
|
|
608
|
+
onClick: cancelEvent
|
|
609
|
+
}) : renderEmptyElement($xeTable),
|
|
610
|
+
VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
611
|
+
ref: xButtonConfirm,
|
|
612
|
+
status: "primary",
|
|
613
|
+
content: getI18n(isPrint ? "vxe.export.expPrint" : "vxe.export.expConfirm"),
|
|
614
|
+
onClick: confirmEvent
|
|
615
|
+
}) : renderEmptyElement($xeTable)
|
|
616
|
+
]
|
|
617
|
+
)
|
|
618
|
+
]
|
|
619
|
+
);
|
|
620
|
+
}
|
|
618
621
|
}
|
|
622
|
+
) : renderEmptyElement($xeTable);
|
|
623
|
+
};
|
|
624
|
+
(0, import_vue.nextTick)(() => {
|
|
625
|
+
if (!VxeUIModalComponent) {
|
|
626
|
+
errLog("vxe.error.reqComp", ["vxe-modal"]);
|
|
619
627
|
}
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
}
|
|
638
|
-
});
|
|
639
|
-
return renderVN;
|
|
640
|
-
}
|
|
641
|
-
});
|
|
628
|
+
if (!VxeUIButtonComponent) {
|
|
629
|
+
errLog("vxe.error.reqComp", ["vxe-button"]);
|
|
630
|
+
}
|
|
631
|
+
if (!VxeUISelectComponent) {
|
|
632
|
+
errLog("vxe.error.reqComp", ["vxe-select"]);
|
|
633
|
+
}
|
|
634
|
+
if (!VxeUIInputComponent) {
|
|
635
|
+
errLog("vxe.error.reqComp", ["vxe-input"]);
|
|
636
|
+
}
|
|
637
|
+
if (!VxeUICheckboxComponent) {
|
|
638
|
+
errLog("vxe.error.reqComp", ["vxe-checkbox"]);
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
return renderVN;
|
|
642
|
+
}
|
|
643
|
+
})
|
|
644
|
+
);
|