@fecp/designer 5.4.106 → 5.4.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/designer/package.json.mjs +1 -1
- package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
- package/es/designer/src/packages/form/property/widgets.vue.mjs +2 -2
- package/es/designer.css +2 -2
- package/es/node_modules/vxe-table/es/components.mjs +2 -1
- package/es/node_modules/vxe-table/es/grid/index.mjs +5 -1
- package/es/node_modules/vxe-table/es/grid/src/grid.mjs +20 -24
- package/es/node_modules/vxe-table/es/locale/lang/zh-CN.mjs +0 -6
- package/es/node_modules/vxe-table/es/table/module/custom/hook.mjs +8 -25
- package/es/node_modules/vxe-table/es/table/module/custom/panel.mjs +9 -14
- package/es/node_modules/vxe-table/es/table/module/export/export-panel.mjs +5 -11
- package/es/node_modules/vxe-table/es/table/module/export/import-panel.mjs +4 -11
- package/es/node_modules/vxe-table/es/table/module/filter/hook.mjs +19 -63
- package/es/node_modules/vxe-table/es/table/module/keyboard/hook.mjs +7 -18
- package/es/node_modules/vxe-table/es/table/module/menu/hook.mjs +2 -2
- package/es/node_modules/vxe-table/es/table/module/validator/hook.mjs +19 -19
- package/es/node_modules/vxe-table/es/table/src/body.mjs +17 -28
- package/es/node_modules/vxe-table/es/table/src/column.mjs +1 -1
- package/es/node_modules/vxe-table/es/table/src/columnInfo.mjs +0 -2
- package/es/node_modules/vxe-table/es/table/src/emits.mjs +0 -1
- package/es/node_modules/vxe-table/es/table/src/footer.mjs +2 -2
- package/es/node_modules/vxe-table/es/table/src/group.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/src/props.mjs +0 -4
- package/es/node_modules/vxe-table/es/table/src/table.mjs +496 -619
- package/es/node_modules/vxe-table/es/table/src/util.mjs +22 -286
- package/es/node_modules/vxe-table/es/toolbar/src/toolbar.mjs +7 -11
- package/es/node_modules/vxe-table/es/ui/index.mjs +4 -12
- package/es/node_modules/vxe-table/es/ui/src/dom.mjs +1 -24
- package/es/node_modules/vxe-table/es/ui/src/log.mjs +1 -1
- package/es/packages/mobile/src/components/dataDisplay/table/Table.vue.mjs +3 -3
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
- package/lib/designer/src/packages/form/property/widgets.vue.js +2 -2
- package/lib/designer.css +2 -2
- package/lib/node_modules/vxe-table/es/components.js +4 -3
- package/lib/node_modules/vxe-table/es/grid/index.js +4 -1
- package/lib/node_modules/vxe-table/es/grid/src/grid.js +19 -23
- package/lib/node_modules/vxe-table/es/locale/lang/zh-CN.js +0 -6
- package/lib/node_modules/vxe-table/es/table/module/custom/hook.js +8 -25
- package/lib/node_modules/vxe-table/es/table/module/custom/panel.js +8 -13
- package/lib/node_modules/vxe-table/es/table/module/export/export-panel.js +5 -11
- package/lib/node_modules/vxe-table/es/table/module/export/import-panel.js +4 -11
- package/lib/node_modules/vxe-table/es/table/module/filter/hook.js +19 -63
- package/lib/node_modules/vxe-table/es/table/module/keyboard/hook.js +7 -18
- package/lib/node_modules/vxe-table/es/table/module/menu/hook.js +2 -2
- package/lib/node_modules/vxe-table/es/table/module/validator/hook.js +19 -19
- package/lib/node_modules/vxe-table/es/table/src/body.js +17 -28
- package/lib/node_modules/vxe-table/es/table/src/column.js +1 -1
- package/lib/node_modules/vxe-table/es/table/src/columnInfo.js +0 -2
- package/lib/node_modules/vxe-table/es/table/src/emits.js +0 -1
- package/lib/node_modules/vxe-table/es/table/src/footer.js +2 -2
- package/lib/node_modules/vxe-table/es/table/src/group.js +1 -2
- package/lib/node_modules/vxe-table/es/table/src/props.js +0 -4
- package/lib/node_modules/vxe-table/es/table/src/table.js +494 -617
- package/lib/node_modules/vxe-table/es/table/src/util.js +22 -286
- package/lib/node_modules/vxe-table/es/toolbar/src/toolbar.js +6 -10
- package/lib/node_modules/vxe-table/es/ui/index.js +4 -12
- package/lib/node_modules/vxe-table/es/ui/src/dom.js +0 -23
- package/lib/node_modules/vxe-table/es/ui/src/log.js +1 -1
- package/lib/packages/mobile/src/components/dataDisplay/table/Table.vue.js +3 -3
- package/package.json +1 -1
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const index = require("./ui/index.js");
|
|
4
4
|
const index$2 = require("./column/index.js");
|
|
5
5
|
require("./colgroup/index.js");
|
|
6
|
-
require("./grid/index.js");
|
|
6
|
+
const index$3 = require("./grid/index.js");
|
|
7
7
|
const index$1 = require("./table/index.js");
|
|
8
|
-
const index$
|
|
8
|
+
const index$4 = require("./toolbar/index.js");
|
|
9
9
|
const zhCN = require("./locale/lang/zh-CN.js");
|
|
10
10
|
const index_esm = require("../../@vxe-ui/core/es/index.esm.js");
|
|
11
11
|
if (!index_esm.VxeUI.hasLanguage("zh-CN")) {
|
|
@@ -20,6 +20,7 @@ exports.setup = index.setup;
|
|
|
20
20
|
exports.t = index.t;
|
|
21
21
|
exports.version = index.version;
|
|
22
22
|
exports.VxeColumn = index$2.VxeColumn;
|
|
23
|
+
exports.VxeGrid = index$3.VxeGrid;
|
|
23
24
|
exports.VxeTable = index$1.VxeTable;
|
|
24
|
-
exports.VxeToolbar = index$
|
|
25
|
+
exports.VxeToolbar = index$4.VxeToolbar;
|
|
25
26
|
exports.VxeUI = index_esm.VxeUI;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
2
3
|
require("../ui/index.js");
|
|
3
4
|
const grid = require("./src/grid.js");
|
|
4
5
|
const index_esm = require("../../../@vxe-ui/core/es/index.esm.js");
|
|
5
|
-
Object.assign({}, grid.default, {
|
|
6
|
+
const VxeGrid = Object.assign({}, grid.default, {
|
|
6
7
|
install(app) {
|
|
7
8
|
app.component(grid.default.name, grid.default);
|
|
8
9
|
}
|
|
@@ -11,3 +12,5 @@ if (index_esm.VxeUI.dynamicApp) {
|
|
|
11
12
|
index_esm.VxeUI.dynamicApp.component(grid.default.name, grid.default);
|
|
12
13
|
}
|
|
13
14
|
index_esm.VxeUI.component(grid.default);
|
|
15
|
+
exports.VxeGrid = VxeGrid;
|
|
16
|
+
exports.default = VxeGrid;
|
|
@@ -17,26 +17,7 @@ const toolbar = require("../../toolbar/src/toolbar.js");
|
|
|
17
17
|
const index_esm = require("../../../../@vxe-ui/core/es/index.esm.js");
|
|
18
18
|
const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = index_esm.VxeUI;
|
|
19
19
|
const tableComponentPropKeys = Object.keys(props$1.tableProps);
|
|
20
|
-
const tableComponentMethodKeys = ["clearAll", "syncData", "updateData", "loadData", "reloadData", "reloadRow", "loadColumn", "reloadColumn", "getRowNode", "getColumnNode", "getRowIndex", "getVTRowIndex", "getVMRowIndex", "getColumnIndex", "getVTColumnIndex", "getVMColumnIndex", "setRow", "createData", "createRow", "revertData", "clearData", "isRemoveByRow", "isInsertByRow", "isUpdateByRow", "getColumns", "getColumnById", "getColumnByField", "getTableColumn", "getFullColumns", "getData", "getCheckboxRecords", "getParentRow", "getTreeRowChildren", "getTreeRowLevel", "getTreeParentRow", "getRowSeq", "getRowById", "getRowid", "getTableData", "getFullData", "setColumnFixed", "clearColumnFixed", "setColumnWidth", "getColumnWidth", "recalcRowHeight", "setRowHeightConf", "getRowHeightConf", "setRowHeight", "getRowHeight", "hideColumn", "showColumn", "resetColumn", "refreshColumn", "refreshScroll", "recalculate", "closeTooltip", "isAllCheckboxChecked", "isAllCheckboxIndeterminate", "getCheckboxIndeterminateRecords", "setCheckboxRow", "setCheckboxRowKey", "isCheckedByCheckboxRow", "isCheckedByCheckboxRowKey", "isIndeterminateByCheckboxRow", "isIndeterminateByCheckboxRowKey", "toggleCheckboxRow", "setAllCheckboxRow", "getRadioReserveRecord", "clearRadioReserve", "getCheckboxReserveRecords", "clearCheckboxReserve", "toggleAllCheckboxRow", "clearCheckboxRow", "setCurrentRow", "isCheckedByRadioRow", "isCheckedByRadioRowKey", "setRadioRow", "setRadioRowKey", "clearCurrentRow", "clearRadioRow", "getCurrentRecord", "getRadioRecord", "getCurrentColumn", "setCurrentColumn", "clearCurrentColumn", "setPendingRow", "togglePendingRow", "hasPendingByRow", "isPendingByRow", "getPendingRecords", "clearPendingRow", "setFilterByEvent", "sort", "setSort", "setSortByEvent", "clearSort", "clearSortByEvent", "isSort", "getSortColumns", "closeFilter", "isFilter", "clearFilterByEvent", "isActiveFilterByColumn", "isRowExpandLoaded", "clearRowExpandLoaded", "reloadRowExpand", "reloadRowExpand", "toggleRowExpand", "setAllRowExpand", "setRowExpand", "isExpandByRow", "isRowExpandByRow", "clearRowExpand", "clearRowExpandReserve", "getRowExpandRecords", "getTreeExpandRecords", "isTreeExpandLoaded", "clearTreeExpandLoaded", "reloadTreeExpand", "reloadTreeChilds", "toggleTreeExpand", "setAllTreeExpand", "setTreeExpand", "isTreeExpandByRow", "clearTreeExpand", "clearTreeExpandReserve", "getScroll", "getScrollData", "scrollTo", "scrollToStartRow", "scrollToEndRow", "scrollToRow", "scrollToStartColumn", "scrollToEndColumn", "scrollToColumn", "clearScroll", "updateFooter", "updateStatus", "setMergeCells", "removeInsertRow", "removeMergeCells", "getMergeCells", "setMergeHeaderCells", "removeMergeHeaderCells", "getMergeHeaderCells", "clearMergeHeaderCells", "clearMergeCells", "setMergeFooterItems", "removeMergeFooterItems", "getMergeFooterItems", "clearMergeFooterItems", "getCustomStoreData", "setRowGroupExpand", "setRowGroupExpandByField", "setAllRowGroupExpand", "clearRowGroupExpand", "isRowGroupExpandByRow", "isRowGroupRecord", "isAggregateRecord", "isAggregateExpandByRow", "getAggregateContentByRow", "getAggregateRowChildren", "setRowGroups", "clearRowGroups", "openTooltip", "moveColumnTo", "moveRowTo", "getCellLabel", "
|
|
21
|
-
function createReactData() {
|
|
22
|
-
var _a;
|
|
23
|
-
return {
|
|
24
|
-
tableLoading: false,
|
|
25
|
-
proxyInited: false,
|
|
26
|
-
isZMax: false,
|
|
27
|
-
tableData: [],
|
|
28
|
-
filterData: [],
|
|
29
|
-
formData: {},
|
|
30
|
-
sortData: [],
|
|
31
|
-
footerData: [],
|
|
32
|
-
tZindex: 0,
|
|
33
|
-
tablePage: {
|
|
34
|
-
total: 0,
|
|
35
|
-
pageSize: ((_a = getConfig().pager) === null || _a === void 0 ? void 0 : _a.pageSize) || 10,
|
|
36
|
-
currentPage: 1
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}
|
|
20
|
+
const tableComponentMethodKeys = ["clearAll", "syncData", "updateData", "loadData", "reloadData", "reloadRow", "loadColumn", "reloadColumn", "getRowNode", "getColumnNode", "getRowIndex", "getVTRowIndex", "getVMRowIndex", "getColumnIndex", "getVTColumnIndex", "getVMColumnIndex", "setRow", "createData", "createRow", "revertData", "clearData", "isRemoveByRow", "isInsertByRow", "isUpdateByRow", "getColumns", "getColumnById", "getColumnByField", "getTableColumn", "getFullColumns", "getData", "getCheckboxRecords", "getParentRow", "getTreeRowChildren", "getTreeRowLevel", "getTreeParentRow", "getRowSeq", "getRowById", "getRowid", "getTableData", "getFullData", "setColumnFixed", "clearColumnFixed", "setColumnWidth", "getColumnWidth", "recalcRowHeight", "setRowHeightConf", "getRowHeightConf", "setRowHeight", "getRowHeight", "hideColumn", "showColumn", "resetColumn", "refreshColumn", "refreshScroll", "recalculate", "closeTooltip", "isAllCheckboxChecked", "isAllCheckboxIndeterminate", "getCheckboxIndeterminateRecords", "setCheckboxRow", "setCheckboxRowKey", "isCheckedByCheckboxRow", "isCheckedByCheckboxRowKey", "isIndeterminateByCheckboxRow", "isIndeterminateByCheckboxRowKey", "toggleCheckboxRow", "setAllCheckboxRow", "getRadioReserveRecord", "clearRadioReserve", "getCheckboxReserveRecords", "clearCheckboxReserve", "toggleAllCheckboxRow", "clearCheckboxRow", "setCurrentRow", "isCheckedByRadioRow", "isCheckedByRadioRowKey", "setRadioRow", "setRadioRowKey", "clearCurrentRow", "clearRadioRow", "getCurrentRecord", "getRadioRecord", "getCurrentColumn", "setCurrentColumn", "clearCurrentColumn", "setPendingRow", "togglePendingRow", "hasPendingByRow", "isPendingByRow", "getPendingRecords", "clearPendingRow", "setFilterByEvent", "sort", "setSort", "setSortByEvent", "clearSort", "clearSortByEvent", "isSort", "getSortColumns", "closeFilter", "isFilter", "clearFilterByEvent", "isActiveFilterByColumn", "isRowExpandLoaded", "clearRowExpandLoaded", "reloadRowExpand", "reloadRowExpand", "toggleRowExpand", "setAllRowExpand", "setRowExpand", "isExpandByRow", "isRowExpandByRow", "clearRowExpand", "clearRowExpandReserve", "getRowExpandRecords", "getTreeExpandRecords", "isTreeExpandLoaded", "clearTreeExpandLoaded", "reloadTreeExpand", "reloadTreeChilds", "toggleTreeExpand", "setAllTreeExpand", "setTreeExpand", "isTreeExpandByRow", "clearTreeExpand", "clearTreeExpandReserve", "getScroll", "getScrollData", "scrollTo", "scrollToStartRow", "scrollToEndRow", "scrollToRow", "scrollToStartColumn", "scrollToEndColumn", "scrollToColumn", "clearScroll", "updateFooter", "updateStatus", "setMergeCells", "removeInsertRow", "removeMergeCells", "getMergeCells", "setMergeHeaderCells", "removeMergeHeaderCells", "getMergeHeaderCells", "clearMergeHeaderCells", "clearMergeCells", "setMergeFooterItems", "removeMergeFooterItems", "getMergeFooterItems", "clearMergeFooterItems", "getCustomStoreData", "setRowGroupExpand", "setRowGroupExpandByField", "setAllRowGroupExpand", "clearRowGroupExpand", "isRowGroupExpandByRow", "isRowGroupRecord", "isAggregateRecord", "isAggregateExpandByRow", "getAggregateContentByRow", "getAggregateRowChildren", "setRowGroups", "clearRowGroups", "openTooltip", "moveColumnTo", "moveRowTo", "getCellLabel", "getCellElement", "focus", "blur", "connect", "connectToolbar"];
|
|
40
21
|
function createInternalData() {
|
|
41
22
|
return {
|
|
42
23
|
uFoot: false
|
|
@@ -47,13 +28,29 @@ const VxeGridComponent = comp.defineVxeComponent({
|
|
|
47
28
|
props: props.gridProps,
|
|
48
29
|
emits: emits.gridEmits,
|
|
49
30
|
setup(props2, context) {
|
|
31
|
+
var _a;
|
|
50
32
|
const { slots, emit } = context;
|
|
51
33
|
const xID = index.default.uniqueId();
|
|
52
34
|
const VxeUIFormComponent = index_esm.VxeUI.getComponent("VxeForm");
|
|
53
35
|
const VxeUIPagerComponent = index_esm.VxeUI.getComponent("VxePager");
|
|
54
36
|
const defaultLayouts = [["Form"], ["Toolbar", "Top", "Table", "Bottom", "Pager"]];
|
|
55
37
|
const { computeSize } = useFns.useSize(props2);
|
|
56
|
-
const reactData = vue.reactive(
|
|
38
|
+
const reactData = vue.reactive({
|
|
39
|
+
tableLoading: false,
|
|
40
|
+
proxyInited: false,
|
|
41
|
+
isZMax: false,
|
|
42
|
+
tableData: [],
|
|
43
|
+
filterData: [],
|
|
44
|
+
formData: {},
|
|
45
|
+
sortData: [],
|
|
46
|
+
footerData: [],
|
|
47
|
+
tZindex: 0,
|
|
48
|
+
tablePage: {
|
|
49
|
+
total: 0,
|
|
50
|
+
pageSize: ((_a = getConfig().pager) === null || _a === void 0 ? void 0 : _a.pageSize) || 10,
|
|
51
|
+
currentPage: 1
|
|
52
|
+
}
|
|
53
|
+
});
|
|
57
54
|
const internalData = createInternalData();
|
|
58
55
|
const refElem = vue.ref();
|
|
59
56
|
const refTable = vue.ref();
|
|
@@ -1566,9 +1563,8 @@ const VxeGridComponent = comp.defineVxeComponent({
|
|
|
1566
1563
|
});
|
|
1567
1564
|
globalEvents.on($xeGrid, "keydown", handleGlobalKeydownEvent);
|
|
1568
1565
|
});
|
|
1569
|
-
vue.
|
|
1566
|
+
vue.onUnmounted(() => {
|
|
1570
1567
|
globalEvents.off($xeGrid, "keydown");
|
|
1571
|
-
index.default.assign(reactData, createReactData());
|
|
1572
1568
|
index.default.assign(internalData, createInternalData());
|
|
1573
1569
|
});
|
|
1574
1570
|
$xeGrid.renderVN = renderVN;
|
|
@@ -374,8 +374,6 @@ const zhCN = {
|
|
|
374
374
|
uploadErr: "上传失败",
|
|
375
375
|
uploadSuccess: "上传成功",
|
|
376
376
|
moreBtnText: "更多({0})",
|
|
377
|
-
moreImgBtnText: "图片({0})",
|
|
378
|
-
moreFileBtnText: "文件({0})",
|
|
379
377
|
viewItemTitle: "点击查看",
|
|
380
378
|
morePopup: {
|
|
381
379
|
readTitle: "查看列表",
|
|
@@ -595,8 +593,6 @@ const zhCN = {
|
|
|
595
593
|
},
|
|
596
594
|
fnr: {
|
|
597
595
|
title: "查找和替换",
|
|
598
|
-
titleFd: "查找",
|
|
599
|
-
titleRe: "替换",
|
|
600
596
|
findLabel: "查找",
|
|
601
597
|
replaceLabel: "替换",
|
|
602
598
|
findTitle: "查找内容:",
|
|
@@ -746,8 +742,6 @@ const zhCN = {
|
|
|
746
742
|
},
|
|
747
743
|
fnr: {
|
|
748
744
|
title: "查找和替换",
|
|
749
|
-
titleFd: "查找",
|
|
750
|
-
titleRe: "替换",
|
|
751
745
|
findLabel: "查找",
|
|
752
746
|
replaceLabel: "替换",
|
|
753
747
|
findTitle: "查找内容:",
|
|
@@ -8,21 +8,13 @@ const tableCustomMethodKeys = ["openCustom", "closeCustom", "getCustomVisible",
|
|
|
8
8
|
index_esm.VxeUI.hooks.add("tableCustomModule", {
|
|
9
9
|
setupTable($xeTable) {
|
|
10
10
|
const { reactData, internalData } = $xeTable;
|
|
11
|
-
const { computeCustomOpts, computeRowGroupFields
|
|
11
|
+
const { computeCustomOpts, computeRowGroupFields } = $xeTable.getComputeMaps();
|
|
12
12
|
const { refElem } = $xeTable.getRefMaps();
|
|
13
|
-
const $xeGrid = $xeTable.xeGrid;
|
|
14
13
|
const $xeGantt = $xeTable.xeGantt;
|
|
15
|
-
const
|
|
16
|
-
const updatePopupStyle = () => {
|
|
14
|
+
const calcMaxHeight = () => {
|
|
17
15
|
const { customStore } = reactData;
|
|
18
|
-
const customOpts = computeCustomOpts.value;
|
|
19
|
-
const customSimpleMode = computeCustomSimpleMode.value;
|
|
20
|
-
const showCustomSimpleOutside = customSimpleMode === "outside";
|
|
21
|
-
const { popupOptions } = customOpts;
|
|
22
|
-
const { maxHeight } = popupOptions || {};
|
|
23
16
|
let wrapperEl = refElem.value;
|
|
24
|
-
let
|
|
25
|
-
let popupMaxHeight = 0;
|
|
17
|
+
let tableHeight = 0;
|
|
26
18
|
if ($xeGantt) {
|
|
27
19
|
const { refGanttContainerElem } = $xeGantt.getRefMaps();
|
|
28
20
|
const ganttContainerElem = refGanttContainerElem.value;
|
|
@@ -30,19 +22,10 @@ index_esm.VxeUI.hooks.add("tableCustomModule", {
|
|
|
30
22
|
wrapperEl = ganttContainerElem;
|
|
31
23
|
}
|
|
32
24
|
}
|
|
33
|
-
if (
|
|
34
|
-
|
|
35
|
-
popupTop = wrapperEl.offsetTop;
|
|
36
|
-
}
|
|
37
|
-
popupMaxHeight = index.default.eqNull(maxHeight) ? 360 : maxHeight;
|
|
38
|
-
} else {
|
|
39
|
-
if (wrapperEl) {
|
|
40
|
-
popupMaxHeight = wrapperEl.clientHeight - 22;
|
|
41
|
-
}
|
|
42
|
-
popupMaxHeight = Math.max(88, popupMaxHeight);
|
|
25
|
+
if (wrapperEl) {
|
|
26
|
+
tableHeight = wrapperEl.clientHeight - 28;
|
|
43
27
|
}
|
|
44
|
-
customStore.
|
|
45
|
-
customStore.maxHeight = index.default.eqNull(maxHeight) ? popupMaxHeight : maxHeight;
|
|
28
|
+
customStore.maxHeight = Math.max(88, tableHeight);
|
|
46
29
|
};
|
|
47
30
|
const openCustom = () => {
|
|
48
31
|
const { initStore, customStore } = reactData;
|
|
@@ -50,8 +33,8 @@ index_esm.VxeUI.hooks.add("tableCustomModule", {
|
|
|
50
33
|
initStore.custom = true;
|
|
51
34
|
handleUpdateCustomColumn();
|
|
52
35
|
checkCustomStatus();
|
|
53
|
-
|
|
54
|
-
return vue.nextTick().then(() =>
|
|
36
|
+
calcMaxHeight();
|
|
37
|
+
return vue.nextTick().then(() => calcMaxHeight());
|
|
55
38
|
};
|
|
56
39
|
const handleUpdateCustomColumn = () => {
|
|
57
40
|
const { customStore } = reactData;
|
|
@@ -545,7 +545,7 @@ const TableCustomPanelComponent = comp.defineVxeComponent({
|
|
|
545
545
|
const customOpts = computeCustomOpts.value;
|
|
546
546
|
const { immediate } = customOpts;
|
|
547
547
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
548
|
-
const { maxHeight
|
|
548
|
+
const { maxHeight } = customStore;
|
|
549
549
|
const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts;
|
|
550
550
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
551
551
|
const { isCrossDrag } = columnDragOpts;
|
|
@@ -662,20 +662,15 @@ const TableCustomPanelComponent = comp.defineVxeComponent({
|
|
|
662
662
|
]));
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
|
-
const popupStys = {};
|
|
666
|
-
if (maxHeight && !["left", "right"].includes(placement || "")) {
|
|
667
|
-
if (popupTop) {
|
|
668
|
-
popupStys.top = dom.toCssUnit(popupTop);
|
|
669
|
-
}
|
|
670
|
-
popupStys.maxHeight = dom.toCssUnit(maxHeight);
|
|
671
|
-
}
|
|
672
665
|
return vue.h("div", {
|
|
673
666
|
ref: refElem,
|
|
674
667
|
key: "simple",
|
|
675
668
|
class: ["vxe-table-custom-wrapper", `placement--${placement}`, {
|
|
676
669
|
"is--active": customStore.visible
|
|
677
670
|
}],
|
|
678
|
-
style:
|
|
671
|
+
style: maxHeight && !["left", "right"].includes(placement || "") ? {
|
|
672
|
+
maxHeight: `${maxHeight}px`
|
|
673
|
+
} : {}
|
|
679
674
|
}, customStore.visible ? [
|
|
680
675
|
vue.h("div", {
|
|
681
676
|
ref: refBodyWrapperElem,
|
|
@@ -934,9 +929,6 @@ const TableCustomPanelComponent = comp.defineVxeComponent({
|
|
|
934
929
|
ref: refBodyWrapperElem,
|
|
935
930
|
class: "vxe-table-custom-popup--body-wrapper"
|
|
936
931
|
}, defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
|
|
937
|
-
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? vue.h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
938
|
-
customStore
|
|
939
|
-
}) : renderEmptyElement($xeTable),
|
|
940
932
|
vue.h("div", {
|
|
941
933
|
ref: refCustomBodyElem,
|
|
942
934
|
class: "vxe-table-custom-popup--handle-wrapper"
|
|
@@ -999,7 +991,10 @@ const TableCustomPanelComponent = comp.defineVxeComponent({
|
|
|
999
991
|
class: "vxe-table-custom-popup--table-bottom"
|
|
1000
992
|
}, $xeTable.callSlot(bottomSlot, params)) : renderEmptyElement($xeTable),
|
|
1001
993
|
renderDragTip()
|
|
1002
|
-
])
|
|
994
|
+
]),
|
|
995
|
+
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? vue.h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
996
|
+
customStore
|
|
997
|
+
}) : renderEmptyElement($xeTable)
|
|
1003
998
|
]);
|
|
1004
999
|
},
|
|
1005
1000
|
footer: () => {
|
|
@@ -11,14 +11,8 @@ const { getI18n, getIcon, renderEmptyElement } = index_esm.VxeUI;
|
|
|
11
11
|
const TableExportPanelComponent = comp.defineVxeComponent({
|
|
12
12
|
name: "VxeTableExportPanel",
|
|
13
13
|
props: {
|
|
14
|
-
defaultOptions:
|
|
15
|
-
|
|
16
|
-
default: () => ({})
|
|
17
|
-
},
|
|
18
|
-
storeData: {
|
|
19
|
-
type: Object,
|
|
20
|
-
default: () => ({})
|
|
21
|
-
}
|
|
14
|
+
defaultOptions: Object,
|
|
15
|
+
storeData: Object
|
|
22
16
|
},
|
|
23
17
|
setup(props) {
|
|
24
18
|
const VxeUIModalComponent = index_esm.VxeUI.getComponent("VxeModal");
|
|
@@ -150,7 +144,7 @@ const TableExportPanelComponent = comp.defineVxeComponent({
|
|
|
150
144
|
const { isAll: isAllChecked, isIndeterminate: isAllIndeterminate } = reactData;
|
|
151
145
|
const { hasTree, hasMerge, isPrint, hasColgroup, columns } = storeData;
|
|
152
146
|
const { isHeader } = defaultOptions;
|
|
153
|
-
const
|
|
147
|
+
const cols = [];
|
|
154
148
|
const checkedAll = computeCheckedAll.value;
|
|
155
149
|
const showSheet = computeShowSheet.value;
|
|
156
150
|
const supportMerge = computeSupportMerge.value;
|
|
@@ -167,7 +161,7 @@ const TableExportPanelComponent = comp.defineVxeComponent({
|
|
|
167
161
|
const isChecked = column.checked;
|
|
168
162
|
const indeterminate = column.halfChecked;
|
|
169
163
|
const isHtml = column.type === "html";
|
|
170
|
-
|
|
164
|
+
cols.push(vue.h("li", {
|
|
171
165
|
key: column.id,
|
|
172
166
|
class: ["vxe-table-export--panel-column-option", `level--${column.level}`, {
|
|
173
167
|
"is--group": isColGroup,
|
|
@@ -329,7 +323,7 @@ const TableExportPanelComponent = comp.defineVxeComponent({
|
|
|
329
323
|
]),
|
|
330
324
|
vue.h("ul", {
|
|
331
325
|
class: "vxe-table-export--panel-column-body"
|
|
332
|
-
},
|
|
326
|
+
}, cols)
|
|
333
327
|
])
|
|
334
328
|
])
|
|
335
329
|
]),
|
|
@@ -11,14 +11,8 @@ const { getI18n, getIcon, renderEmptyElement } = index_esm.VxeUI;
|
|
|
11
11
|
const TableImportPanelComponent = comp.defineVxeComponent({
|
|
12
12
|
name: "VxeTableImportPanel",
|
|
13
13
|
props: {
|
|
14
|
-
defaultOptions:
|
|
15
|
-
|
|
16
|
-
default: () => ({})
|
|
17
|
-
},
|
|
18
|
-
storeData: {
|
|
19
|
-
type: Object,
|
|
20
|
-
default: () => ({})
|
|
21
|
-
}
|
|
14
|
+
defaultOptions: Object,
|
|
15
|
+
storeData: Object
|
|
22
16
|
},
|
|
23
17
|
setup(props) {
|
|
24
18
|
const VxeUIModalComponent = index_esm.VxeUI.getComponent("VxeModal");
|
|
@@ -43,7 +37,7 @@ const TableImportPanelComponent = comp.defineVxeComponent({
|
|
|
43
37
|
const { type, typeList } = storeData;
|
|
44
38
|
if (type) {
|
|
45
39
|
const selectItem = index.default.find(typeList, (item) => type === item.value);
|
|
46
|
-
return
|
|
40
|
+
return selectItem ? selectItem.label : "*.*";
|
|
47
41
|
}
|
|
48
42
|
return `*.${typeList.map((item) => item.value).join(", *.")}`;
|
|
49
43
|
});
|
|
@@ -60,8 +54,7 @@ const TableImportPanelComponent = comp.defineVxeComponent({
|
|
|
60
54
|
$xeTable.readFile(defaultOptions).then((params) => {
|
|
61
55
|
const { file } = params;
|
|
62
56
|
Object.assign(storeData, utils.parseFile(file), { file });
|
|
63
|
-
}).catch(() =>
|
|
64
|
-
});
|
|
57
|
+
}).catch((e) => e);
|
|
65
58
|
};
|
|
66
59
|
const showEvent = () => {
|
|
67
60
|
vue.nextTick(() => {
|
|
@@ -8,7 +8,6 @@ const utils = require("../../../ui/src/utils.js");
|
|
|
8
8
|
const index_esm = require("../../../../../@vxe-ui/core/es/index.esm.js");
|
|
9
9
|
const { renderer, hooks } = index_esm.VxeUI;
|
|
10
10
|
const tableFilterMethodKeys = ["openFilter", "setFilter", "clearFilter", "saveFilter", "saveFilterByEvent", "saveFilterPanel", "saveFilterPanelByEvent", "resetFilter", "resetFilterByEvent", "resetFilterPanel", "resetFilterPanelByEvent", "getCheckedFilters", "updateFilterOptionStatus"];
|
|
11
|
-
const sourceType = "table";
|
|
12
11
|
hooks.add("tableFilterModule", {
|
|
13
12
|
setupTable($xeTable) {
|
|
14
13
|
const $xeGrid = $xeTable.xeGrid;
|
|
@@ -27,7 +26,16 @@ hooks.add("tableFilterModule", {
|
|
|
27
26
|
filterStore.isIndeterminate = !filterStore.isAllSelected && filterOptions.some((item) => item._checked);
|
|
28
27
|
}
|
|
29
28
|
},
|
|
30
|
-
|
|
29
|
+
/**
|
|
30
|
+
* 点击筛选事件
|
|
31
|
+
* 当筛选图标被点击时触发
|
|
32
|
+
* 更新选项是否全部状态
|
|
33
|
+
* 打开筛选面板
|
|
34
|
+
* @param {Event} evnt 事件
|
|
35
|
+
* @param {ColumnInfo} column 列配置
|
|
36
|
+
* @param {Object} params 参数
|
|
37
|
+
*/
|
|
38
|
+
triggerFilterEvent(evnt, column, params) {
|
|
31
39
|
const { initStore, filterStore } = reactData;
|
|
32
40
|
const { elemStore } = internalData;
|
|
33
41
|
if (filterStore.column === column && filterStore.visible) {
|
|
@@ -36,9 +44,9 @@ hooks.add("tableFilterModule", {
|
|
|
36
44
|
const tableEl = refElem.value;
|
|
37
45
|
const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = dom.getDomNode();
|
|
38
46
|
const filterOpts = computeFilterOpts.value;
|
|
39
|
-
const {
|
|
40
|
-
const currEl = btnEl || colEl;
|
|
47
|
+
const { transfer } = filterOpts;
|
|
41
48
|
const tableRect = tableEl.getBoundingClientRect();
|
|
49
|
+
const btnElem = evnt.currentTarget;
|
|
42
50
|
const filterRender = column ? column.filterRender : null;
|
|
43
51
|
const compConf = filterRender && utils.isEnableConf(filterRender) ? renderer.get(filterRender.name) : null;
|
|
44
52
|
$xeTable.handleFilterOptions(column);
|
|
@@ -56,17 +64,17 @@ hooks.add("tableFilterModule", {
|
|
|
56
64
|
if (!filterWrapperElem) {
|
|
57
65
|
return;
|
|
58
66
|
}
|
|
59
|
-
const btnRect =
|
|
67
|
+
const btnRect = btnElem.getBoundingClientRect();
|
|
60
68
|
const filterHeadElem = filterWrapperElem.querySelector(".vxe-table--filter-header");
|
|
61
69
|
const filterFootElem = filterWrapperElem.querySelector(".vxe-table--filter-footer");
|
|
62
70
|
const filterWidth = filterWrapperElem.offsetWidth;
|
|
63
|
-
const centerWidth =
|
|
71
|
+
const centerWidth = filterWidth / 2;
|
|
64
72
|
let left = 0;
|
|
65
73
|
let top = 0;
|
|
66
74
|
let maxHeight = 0;
|
|
67
75
|
if (transfer) {
|
|
68
76
|
left = btnRect.left - centerWidth + scrollLeft;
|
|
69
|
-
top = btnRect.top +
|
|
77
|
+
top = btnRect.top + btnElem.clientHeight + scrollTop;
|
|
70
78
|
maxHeight = Math.min(Math.max(tableRect.height, Math.floor(visibleHeight / 2)), Math.max(80, visibleHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 28));
|
|
71
79
|
if (left < 16) {
|
|
72
80
|
left = 16;
|
|
@@ -75,7 +83,7 @@ hooks.add("tableFilterModule", {
|
|
|
75
83
|
}
|
|
76
84
|
} else {
|
|
77
85
|
left = btnRect.left - tableRect.left - centerWidth;
|
|
78
|
-
top = btnRect.top - tableRect.top +
|
|
86
|
+
top = btnRect.top - tableRect.top + btnElem.clientHeight;
|
|
79
87
|
maxHeight = Math.max(40, tableEl.clientHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 14);
|
|
80
88
|
if (left < 1) {
|
|
81
89
|
left = 1;
|
|
@@ -90,43 +98,18 @@ hooks.add("tableFilterModule", {
|
|
|
90
98
|
}
|
|
91
99
|
}
|
|
92
100
|
}
|
|
93
|
-
|
|
101
|
+
filterStore.style = {
|
|
94
102
|
top: dom.toCssUnit(top),
|
|
95
103
|
left: dom.toCssUnit(left)
|
|
96
104
|
};
|
|
97
|
-
if (zIndex) {
|
|
98
|
-
fStys.zIndex = zIndex;
|
|
99
|
-
}
|
|
100
|
-
filterStore.style = fStys;
|
|
101
105
|
if (compConf ? !compConf.tableFilterAutoHeight : false) {
|
|
102
106
|
maxHeight = 0;
|
|
103
|
-
} else {
|
|
104
|
-
if (customMaxHeight) {
|
|
105
|
-
maxHeight = customMaxHeight > maxHeight ? maxHeight : customMaxHeight;
|
|
106
|
-
}
|
|
107
107
|
}
|
|
108
108
|
filterStore.maxHeight = maxHeight;
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
$xeTable.dispatchEvent("filter-visible", { column, field: column.field, property: column.field, filterList: $xeTable.getCheckedFilters(), visible: filterStore.visible }, evnt);
|
|
112
112
|
},
|
|
113
|
-
/**
|
|
114
|
-
* 点击筛选事件
|
|
115
|
-
* 当筛选图标被点击时触发
|
|
116
|
-
* 更新选项是否全部状态
|
|
117
|
-
* 打开筛选面板
|
|
118
|
-
* @param {Event} evnt 事件
|
|
119
|
-
* @param {ColumnInfo} column 列配置
|
|
120
|
-
* @param {Object} params 参数
|
|
121
|
-
*/
|
|
122
|
-
triggerFilterEvent(evnt, column, params) {
|
|
123
|
-
const { elemStore } = internalData;
|
|
124
|
-
const { fixed } = column;
|
|
125
|
-
const headerWrapperElem = util.getRefElem(elemStore[`${fixed || "main"}-header-wrapper`] || elemStore["main-header-wrapper"]);
|
|
126
|
-
const btnElem = evnt.currentTarget;
|
|
127
|
-
const colEl = headerWrapperElem ? headerWrapperElem.querySelector(`.vxe-header--column.${column.id}`) : null;
|
|
128
|
-
$xeTable.handleOpenFilterColumn(evnt, btnElem, colEl || btnElem, column, params);
|
|
129
|
-
},
|
|
130
113
|
handleClearFilter(column) {
|
|
131
114
|
if (column) {
|
|
132
115
|
const { filters, filterRender } = column;
|
|
@@ -273,39 +256,12 @@ hooks.add("tableFilterModule", {
|
|
|
273
256
|
const column = util.handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
274
257
|
if (column && column.filters) {
|
|
275
258
|
const { elemStore } = internalData;
|
|
276
|
-
const { fixed
|
|
259
|
+
const { fixed } = column;
|
|
277
260
|
return $xeTable.scrollToColumn(column).then(() => {
|
|
278
261
|
const headerWrapperElem = util.getRefElem(elemStore[`${fixed || "main"}-header-wrapper`] || elemStore["main-header-wrapper"]);
|
|
279
262
|
if (headerWrapperElem) {
|
|
280
263
|
const filterBtnElem = headerWrapperElem.querySelector(`.vxe-header--column.${column.id} .vxe-cell--filter`);
|
|
281
|
-
|
|
282
|
-
dom.triggerEvent(filterBtnElem, "click");
|
|
283
|
-
} else {
|
|
284
|
-
const colEl = headerWrapperElem.querySelector(`.vxe-header--column.${column.id}`);
|
|
285
|
-
if (colEl) {
|
|
286
|
-
let firstFilterOption = null;
|
|
287
|
-
if (filters) {
|
|
288
|
-
firstFilterOption = filters[0];
|
|
289
|
-
}
|
|
290
|
-
const params = {
|
|
291
|
-
$table: $xeTable,
|
|
292
|
-
$grid: $xeGrid,
|
|
293
|
-
$gantt: $xeGantt,
|
|
294
|
-
$rowIndex: -1,
|
|
295
|
-
column,
|
|
296
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
297
|
-
$columnIndex: $xeTable.getVMColumnIndex(column),
|
|
298
|
-
_columnIndex: $xeTable.getVTColumnIndex(column),
|
|
299
|
-
firstFilterOption,
|
|
300
|
-
fixed,
|
|
301
|
-
source: sourceType,
|
|
302
|
-
type: "header"
|
|
303
|
-
// isHidden
|
|
304
|
-
// hasFilter
|
|
305
|
-
};
|
|
306
|
-
$xeTable.handleOpenFilterColumn(new Event("click"), null, colEl, column, params);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
264
|
+
dom.triggerEvent(filterBtnElem, "click");
|
|
309
265
|
}
|
|
310
266
|
});
|
|
311
267
|
}
|
|
@@ -8,7 +8,7 @@ const { hooks } = index_esm.VxeUI;
|
|
|
8
8
|
hooks.add("tableKeyboardModule", {
|
|
9
9
|
setupTable($xeTable) {
|
|
10
10
|
const { props, reactData, internalData } = $xeTable;
|
|
11
|
-
const { refElem
|
|
11
|
+
const { refElem } = $xeTable.getRefMaps();
|
|
12
12
|
const { computeEditOpts, computeCheckboxOpts, computeMouseOpts, computeTreeOpts, computeRowOpts, computeColumnOpts, computeCellOpts, computeDefaultRowHeight, computeCurrentRowOpts, computeCurrentColumnOpts } = $xeTable.getComputeMaps();
|
|
13
13
|
function getCheckboxRangeRows(evnt, params, targetTrElem, trRect, offsetClientTop, moveRange) {
|
|
14
14
|
const { showOverflow } = props;
|
|
@@ -230,8 +230,8 @@ hooks.add("tableKeyboardModule", {
|
|
|
230
230
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
231
231
|
const mouseOpts = computeMouseOpts.value;
|
|
232
232
|
const editOpts = computeEditOpts.value;
|
|
233
|
-
if (mouseConfig && mouseOpts.area && $xeTable.
|
|
234
|
-
return $xeTable.
|
|
233
|
+
if (mouseConfig && mouseOpts.area && $xeTable.triggerCellAreaModnEvent) {
|
|
234
|
+
return $xeTable.triggerCellAreaModnEvent(evnt, params);
|
|
235
235
|
} else {
|
|
236
236
|
if (checkboxConfig && checkboxOpts.range) {
|
|
237
237
|
handleCheckboxRangeEvent(evnt, params);
|
|
@@ -246,18 +246,9 @@ hooks.add("tableKeyboardModule", {
|
|
|
246
246
|
const handleMoveSelected = (evnt, args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow) => {
|
|
247
247
|
const { afterFullData, visibleColumn } = internalData;
|
|
248
248
|
const params = Object.assign({}, args);
|
|
249
|
-
const
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
const tableBody = refTableBody.value;
|
|
253
|
-
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
254
|
-
const tableWidth = tableBodyElem ? tableBodyElem.clientWidth : 0;
|
|
255
|
-
let colAlign = isLeftArrow || isRightArrow || column.renderWidth < tableWidth;
|
|
256
|
-
if (isLeftArrow && _columnIndex >= 0 || isRightArrow && _columnIndex <= visibleColumn.length - 1) {
|
|
257
|
-
colAlign = false;
|
|
258
|
-
} else {
|
|
259
|
-
evnt.preventDefault();
|
|
260
|
-
}
|
|
249
|
+
const _rowIndex = $xeTable.getVTRowIndex(params.row);
|
|
250
|
+
const _columnIndex = $xeTable.getVTColumnIndex(params.column);
|
|
251
|
+
evnt.preventDefault();
|
|
261
252
|
if (isUpArrow && _rowIndex > 0) {
|
|
262
253
|
params.rowIndex = _rowIndex - 1;
|
|
263
254
|
params.row = afterFullData[params.rowIndex];
|
|
@@ -271,9 +262,7 @@ hooks.add("tableKeyboardModule", {
|
|
|
271
262
|
params.columnIndex = _columnIndex + 1;
|
|
272
263
|
params.column = visibleColumn[params.columnIndex];
|
|
273
264
|
}
|
|
274
|
-
$xeTable.scrollToRow(params.row, params.column
|
|
275
|
-
colAlign
|
|
276
|
-
}).then(() => {
|
|
265
|
+
$xeTable.scrollToRow(params.row, params.column).then(() => {
|
|
277
266
|
params.cell = $xeTable.getCellElement(params.row, params.column);
|
|
278
267
|
$xeTable.handleSelected(params, evnt);
|
|
279
268
|
});
|
|
@@ -22,7 +22,7 @@ hooks.add("tableMenuModule", {
|
|
|
22
22
|
const isContentMenu = computeIsContentMenu.value;
|
|
23
23
|
const menuOpts = computeMenuOpts.value;
|
|
24
24
|
const config = menuOpts[type];
|
|
25
|
-
const {
|
|
25
|
+
const { transfer, visibleMethod } = menuOpts;
|
|
26
26
|
if (config) {
|
|
27
27
|
const { options, disabled } = config;
|
|
28
28
|
if (disabled) {
|
|
@@ -54,7 +54,7 @@ hooks.add("tableMenuModule", {
|
|
|
54
54
|
selectChild: null,
|
|
55
55
|
showChild: false,
|
|
56
56
|
style: {
|
|
57
|
-
zIndex:
|
|
57
|
+
zIndex: internalData.tZindex,
|
|
58
58
|
top: `${top}px`,
|
|
59
59
|
left: `${left}px`
|
|
60
60
|
}
|