@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _t, config, setup, t, version } from "./ui/index.mjs";
|
|
2
2
|
import { VxeColumn } from "./column/index.mjs";
|
|
3
3
|
import "./colgroup/index.mjs";
|
|
4
|
-
import "./grid/index.mjs";
|
|
4
|
+
import { VxeGrid } from "./grid/index.mjs";
|
|
5
5
|
import { VxeTable } from "./table/index.mjs";
|
|
6
6
|
import { VxeToolbar } from "./toolbar/index.mjs";
|
|
7
7
|
import zhCN from "./locale/lang/zh-CN.mjs";
|
|
@@ -14,6 +14,7 @@ if (!VxeUI.hasLanguage("zh-CN")) {
|
|
|
14
14
|
VxeUI.setTheme("light");
|
|
15
15
|
export {
|
|
16
16
|
VxeColumn,
|
|
17
|
+
VxeGrid,
|
|
17
18
|
VxeTable,
|
|
18
19
|
VxeToolbar,
|
|
19
20
|
VxeUI,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../ui/index.mjs";
|
|
2
2
|
import VxeGridComponent from "./src/grid.mjs";
|
|
3
3
|
import { VxeUI } from "../../../@vxe-ui/core/es/index.esm.mjs";
|
|
4
|
-
Object.assign({}, VxeGridComponent, {
|
|
4
|
+
const VxeGrid = Object.assign({}, VxeGridComponent, {
|
|
5
5
|
install(app) {
|
|
6
6
|
app.component(VxeGridComponent.name, VxeGridComponent);
|
|
7
7
|
}
|
|
@@ -10,3 +10,7 @@ if (VxeUI.dynamicApp) {
|
|
|
10
10
|
VxeUI.dynamicApp.component(VxeGridComponent.name, VxeGridComponent);
|
|
11
11
|
}
|
|
12
12
|
VxeUI.component(VxeGridComponent);
|
|
13
|
+
export {
|
|
14
|
+
VxeGrid,
|
|
15
|
+
VxeGrid as default
|
|
16
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive, ref, computed, nextTick, watch, onMounted,
|
|
1
|
+
import { reactive, ref, computed, nextTick, watch, onMounted, onUnmounted, provide, h } from "vue";
|
|
2
2
|
import { defineVxeComponent } from "../../ui/src/comp.mjs";
|
|
3
3
|
import XEUtils from "../../../../../_virtual/index2.mjs";
|
|
4
4
|
import { isEnableConf, getLastZIndex, nextZIndex } from "../../ui/src/utils.mjs";
|
|
@@ -15,26 +15,7 @@ import VxeToolbarComponent from "../../toolbar/src/toolbar.mjs";
|
|
|
15
15
|
import { VxeUI } from "../../../../@vxe-ui/core/es/index.esm.mjs";
|
|
16
16
|
const { getConfig, getI18n, commands, hooks, useFns, createEvent, globalEvents, GLOBAL_EVENT_KEYS, renderEmptyElement } = VxeUI;
|
|
17
17
|
const tableComponentPropKeys = Object.keys(tableProps);
|
|
18
|
-
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", "
|
|
19
|
-
function createReactData() {
|
|
20
|
-
var _a;
|
|
21
|
-
return {
|
|
22
|
-
tableLoading: false,
|
|
23
|
-
proxyInited: false,
|
|
24
|
-
isZMax: false,
|
|
25
|
-
tableData: [],
|
|
26
|
-
filterData: [],
|
|
27
|
-
formData: {},
|
|
28
|
-
sortData: [],
|
|
29
|
-
footerData: [],
|
|
30
|
-
tZindex: 0,
|
|
31
|
-
tablePage: {
|
|
32
|
-
total: 0,
|
|
33
|
-
pageSize: ((_a = getConfig().pager) === null || _a === void 0 ? void 0 : _a.pageSize) || 10,
|
|
34
|
-
currentPage: 1
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
}
|
|
18
|
+
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"];
|
|
38
19
|
function createInternalData() {
|
|
39
20
|
return {
|
|
40
21
|
uFoot: false
|
|
@@ -45,13 +26,29 @@ const VxeGridComponent = defineVxeComponent({
|
|
|
45
26
|
props: gridProps,
|
|
46
27
|
emits: gridEmits,
|
|
47
28
|
setup(props, context) {
|
|
29
|
+
var _a;
|
|
48
30
|
const { slots, emit } = context;
|
|
49
31
|
const xID = XEUtils.uniqueId();
|
|
50
32
|
const VxeUIFormComponent = VxeUI.getComponent("VxeForm");
|
|
51
33
|
const VxeUIPagerComponent = VxeUI.getComponent("VxePager");
|
|
52
34
|
const defaultLayouts = [["Form"], ["Toolbar", "Top", "Table", "Bottom", "Pager"]];
|
|
53
35
|
const { computeSize } = useFns.useSize(props);
|
|
54
|
-
const reactData = reactive(
|
|
36
|
+
const reactData = reactive({
|
|
37
|
+
tableLoading: false,
|
|
38
|
+
proxyInited: false,
|
|
39
|
+
isZMax: false,
|
|
40
|
+
tableData: [],
|
|
41
|
+
filterData: [],
|
|
42
|
+
formData: {},
|
|
43
|
+
sortData: [],
|
|
44
|
+
footerData: [],
|
|
45
|
+
tZindex: 0,
|
|
46
|
+
tablePage: {
|
|
47
|
+
total: 0,
|
|
48
|
+
pageSize: ((_a = getConfig().pager) === null || _a === void 0 ? void 0 : _a.pageSize) || 10,
|
|
49
|
+
currentPage: 1
|
|
50
|
+
}
|
|
51
|
+
});
|
|
55
52
|
const internalData = createInternalData();
|
|
56
53
|
const refElem = ref();
|
|
57
54
|
const refTable = ref();
|
|
@@ -1564,9 +1561,8 @@ const VxeGridComponent = defineVxeComponent({
|
|
|
1564
1561
|
});
|
|
1565
1562
|
globalEvents.on($xeGrid, "keydown", handleGlobalKeydownEvent);
|
|
1566
1563
|
});
|
|
1567
|
-
|
|
1564
|
+
onUnmounted(() => {
|
|
1568
1565
|
globalEvents.off($xeGrid, "keydown");
|
|
1569
|
-
XEUtils.assign(reactData, createReactData());
|
|
1570
1566
|
XEUtils.assign(internalData, createInternalData());
|
|
1571
1567
|
});
|
|
1572
1568
|
$xeGrid.renderVN = renderVN;
|
|
@@ -372,8 +372,6 @@ const zhCN = {
|
|
|
372
372
|
uploadErr: "上传失败",
|
|
373
373
|
uploadSuccess: "上传成功",
|
|
374
374
|
moreBtnText: "更多({0})",
|
|
375
|
-
moreImgBtnText: "图片({0})",
|
|
376
|
-
moreFileBtnText: "文件({0})",
|
|
377
375
|
viewItemTitle: "点击查看",
|
|
378
376
|
morePopup: {
|
|
379
377
|
readTitle: "查看列表",
|
|
@@ -593,8 +591,6 @@ const zhCN = {
|
|
|
593
591
|
},
|
|
594
592
|
fnr: {
|
|
595
593
|
title: "查找和替换",
|
|
596
|
-
titleFd: "查找",
|
|
597
|
-
titleRe: "替换",
|
|
598
594
|
findLabel: "查找",
|
|
599
595
|
replaceLabel: "替换",
|
|
600
596
|
findTitle: "查找内容:",
|
|
@@ -744,8 +740,6 @@ const zhCN = {
|
|
|
744
740
|
},
|
|
745
741
|
fnr: {
|
|
746
742
|
title: "查找和替换",
|
|
747
|
-
titleFd: "查找",
|
|
748
|
-
titleRe: "替换",
|
|
749
743
|
findLabel: "查找",
|
|
750
744
|
replaceLabel: "替换",
|
|
751
745
|
findTitle: "查找内容:",
|
|
@@ -7,21 +7,13 @@ const tableCustomMethodKeys = ["openCustom", "closeCustom", "getCustomVisible",
|
|
|
7
7
|
VxeUI.hooks.add("tableCustomModule", {
|
|
8
8
|
setupTable($xeTable) {
|
|
9
9
|
const { reactData, internalData } = $xeTable;
|
|
10
|
-
const { computeCustomOpts, computeRowGroupFields
|
|
10
|
+
const { computeCustomOpts, computeRowGroupFields } = $xeTable.getComputeMaps();
|
|
11
11
|
const { refElem } = $xeTable.getRefMaps();
|
|
12
|
-
const $xeGrid = $xeTable.xeGrid;
|
|
13
12
|
const $xeGantt = $xeTable.xeGantt;
|
|
14
|
-
const
|
|
15
|
-
const updatePopupStyle = () => {
|
|
13
|
+
const calcMaxHeight = () => {
|
|
16
14
|
const { customStore } = reactData;
|
|
17
|
-
const customOpts = computeCustomOpts.value;
|
|
18
|
-
const customSimpleMode = computeCustomSimpleMode.value;
|
|
19
|
-
const showCustomSimpleOutside = customSimpleMode === "outside";
|
|
20
|
-
const { popupOptions } = customOpts;
|
|
21
|
-
const { maxHeight } = popupOptions || {};
|
|
22
15
|
let wrapperEl = refElem.value;
|
|
23
|
-
let
|
|
24
|
-
let popupMaxHeight = 0;
|
|
16
|
+
let tableHeight = 0;
|
|
25
17
|
if ($xeGantt) {
|
|
26
18
|
const { refGanttContainerElem } = $xeGantt.getRefMaps();
|
|
27
19
|
const ganttContainerElem = refGanttContainerElem.value;
|
|
@@ -29,19 +21,10 @@ VxeUI.hooks.add("tableCustomModule", {
|
|
|
29
21
|
wrapperEl = ganttContainerElem;
|
|
30
22
|
}
|
|
31
23
|
}
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
-
popupTop = wrapperEl.offsetTop;
|
|
35
|
-
}
|
|
36
|
-
popupMaxHeight = XEUtils.eqNull(maxHeight) ? 360 : maxHeight;
|
|
37
|
-
} else {
|
|
38
|
-
if (wrapperEl) {
|
|
39
|
-
popupMaxHeight = wrapperEl.clientHeight - 22;
|
|
40
|
-
}
|
|
41
|
-
popupMaxHeight = Math.max(88, popupMaxHeight);
|
|
24
|
+
if (wrapperEl) {
|
|
25
|
+
tableHeight = wrapperEl.clientHeight - 28;
|
|
42
26
|
}
|
|
43
|
-
customStore.
|
|
44
|
-
customStore.maxHeight = XEUtils.eqNull(maxHeight) ? popupMaxHeight : maxHeight;
|
|
27
|
+
customStore.maxHeight = Math.max(88, tableHeight);
|
|
45
28
|
};
|
|
46
29
|
const openCustom = () => {
|
|
47
30
|
const { initStore, customStore } = reactData;
|
|
@@ -49,8 +32,8 @@ VxeUI.hooks.add("tableCustomModule", {
|
|
|
49
32
|
initStore.custom = true;
|
|
50
33
|
handleUpdateCustomColumn();
|
|
51
34
|
checkCustomStatus();
|
|
52
|
-
|
|
53
|
-
return nextTick().then(() =>
|
|
35
|
+
calcMaxHeight();
|
|
36
|
+
return nextTick().then(() => calcMaxHeight());
|
|
54
37
|
};
|
|
55
38
|
const handleUpdateCustomColumn = () => {
|
|
56
39
|
const { customStore } = reactData;
|
|
@@ -2,7 +2,7 @@ import { inject, ref, reactive, nextTick, onUnmounted, provide, h, TransitionGro
|
|
|
2
2
|
import { defineVxeComponent } from "../../../ui/src/comp.mjs";
|
|
3
3
|
import "../../../ui/index.mjs";
|
|
4
4
|
import { formatText } from "../../../ui/src/utils.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { hasControlKey, removeClass, getTpImg, addClass } from "../../../ui/src/dom.mjs";
|
|
6
6
|
import { errLog } from "../../../ui/src/log.mjs";
|
|
7
7
|
import XEUtils from "../../../../../../_virtual/index2.mjs";
|
|
8
8
|
import { VxeUI } from "../../../../../@vxe-ui/core/es/index.esm.mjs";
|
|
@@ -543,7 +543,7 @@ const TableCustomPanelComponent = defineVxeComponent({
|
|
|
543
543
|
const customOpts = computeCustomOpts.value;
|
|
544
544
|
const { immediate } = customOpts;
|
|
545
545
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
546
|
-
const { maxHeight
|
|
546
|
+
const { maxHeight } = customStore;
|
|
547
547
|
const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts;
|
|
548
548
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
549
549
|
const { isCrossDrag } = columnDragOpts;
|
|
@@ -660,20 +660,15 @@ const TableCustomPanelComponent = defineVxeComponent({
|
|
|
660
660
|
]));
|
|
661
661
|
}
|
|
662
662
|
});
|
|
663
|
-
const popupStys = {};
|
|
664
|
-
if (maxHeight && !["left", "right"].includes(placement || "")) {
|
|
665
|
-
if (popupTop) {
|
|
666
|
-
popupStys.top = toCssUnit(popupTop);
|
|
667
|
-
}
|
|
668
|
-
popupStys.maxHeight = toCssUnit(maxHeight);
|
|
669
|
-
}
|
|
670
663
|
return h("div", {
|
|
671
664
|
ref: refElem,
|
|
672
665
|
key: "simple",
|
|
673
666
|
class: ["vxe-table-custom-wrapper", `placement--${placement}`, {
|
|
674
667
|
"is--active": customStore.visible
|
|
675
668
|
}],
|
|
676
|
-
style:
|
|
669
|
+
style: maxHeight && !["left", "right"].includes(placement || "") ? {
|
|
670
|
+
maxHeight: `${maxHeight}px`
|
|
671
|
+
} : {}
|
|
677
672
|
}, customStore.visible ? [
|
|
678
673
|
h("div", {
|
|
679
674
|
ref: refBodyWrapperElem,
|
|
@@ -932,9 +927,6 @@ const TableCustomPanelComponent = defineVxeComponent({
|
|
|
932
927
|
ref: refBodyWrapperElem,
|
|
933
928
|
class: "vxe-table-custom-popup--body-wrapper"
|
|
934
929
|
}, defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
|
|
935
|
-
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
936
|
-
customStore
|
|
937
|
-
}) : renderEmptyElement($xeTable),
|
|
938
930
|
h("div", {
|
|
939
931
|
ref: refCustomBodyElem,
|
|
940
932
|
class: "vxe-table-custom-popup--handle-wrapper"
|
|
@@ -997,7 +989,10 @@ const TableCustomPanelComponent = defineVxeComponent({
|
|
|
997
989
|
class: "vxe-table-custom-popup--table-bottom"
|
|
998
990
|
}, $xeTable.callSlot(bottomSlot, params)) : renderEmptyElement($xeTable),
|
|
999
991
|
renderDragTip()
|
|
1000
|
-
])
|
|
992
|
+
]),
|
|
993
|
+
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
994
|
+
customStore
|
|
995
|
+
}) : renderEmptyElement($xeTable)
|
|
1001
996
|
]);
|
|
1002
997
|
},
|
|
1003
998
|
footer: () => {
|
|
@@ -9,14 +9,8 @@ const { getI18n, getIcon, renderEmptyElement } = VxeUI;
|
|
|
9
9
|
const TableExportPanelComponent = defineVxeComponent({
|
|
10
10
|
name: "VxeTableExportPanel",
|
|
11
11
|
props: {
|
|
12
|
-
defaultOptions:
|
|
13
|
-
|
|
14
|
-
default: () => ({})
|
|
15
|
-
},
|
|
16
|
-
storeData: {
|
|
17
|
-
type: Object,
|
|
18
|
-
default: () => ({})
|
|
19
|
-
}
|
|
12
|
+
defaultOptions: Object,
|
|
13
|
+
storeData: Object
|
|
20
14
|
},
|
|
21
15
|
setup(props) {
|
|
22
16
|
const VxeUIModalComponent = VxeUI.getComponent("VxeModal");
|
|
@@ -148,7 +142,7 @@ const TableExportPanelComponent = defineVxeComponent({
|
|
|
148
142
|
const { isAll: isAllChecked, isIndeterminate: isAllIndeterminate } = reactData;
|
|
149
143
|
const { hasTree, hasMerge, isPrint, hasColgroup, columns } = storeData;
|
|
150
144
|
const { isHeader } = defaultOptions;
|
|
151
|
-
const
|
|
145
|
+
const cols = [];
|
|
152
146
|
const checkedAll = computeCheckedAll.value;
|
|
153
147
|
const showSheet = computeShowSheet.value;
|
|
154
148
|
const supportMerge = computeSupportMerge.value;
|
|
@@ -165,7 +159,7 @@ const TableExportPanelComponent = defineVxeComponent({
|
|
|
165
159
|
const isChecked = column.checked;
|
|
166
160
|
const indeterminate = column.halfChecked;
|
|
167
161
|
const isHtml = column.type === "html";
|
|
168
|
-
|
|
162
|
+
cols.push(h("li", {
|
|
169
163
|
key: column.id,
|
|
170
164
|
class: ["vxe-table-export--panel-column-option", `level--${column.level}`, {
|
|
171
165
|
"is--group": isColGroup,
|
|
@@ -327,7 +321,7 @@ const TableExportPanelComponent = defineVxeComponent({
|
|
|
327
321
|
]),
|
|
328
322
|
h("ul", {
|
|
329
323
|
class: "vxe-table-export--panel-column-body"
|
|
330
|
-
},
|
|
324
|
+
}, cols)
|
|
331
325
|
])
|
|
332
326
|
])
|
|
333
327
|
]),
|
|
@@ -9,14 +9,8 @@ const { getI18n, getIcon, renderEmptyElement } = VxeUI;
|
|
|
9
9
|
const TableImportPanelComponent = defineVxeComponent({
|
|
10
10
|
name: "VxeTableImportPanel",
|
|
11
11
|
props: {
|
|
12
|
-
defaultOptions:
|
|
13
|
-
|
|
14
|
-
default: () => ({})
|
|
15
|
-
},
|
|
16
|
-
storeData: {
|
|
17
|
-
type: Object,
|
|
18
|
-
default: () => ({})
|
|
19
|
-
}
|
|
12
|
+
defaultOptions: Object,
|
|
13
|
+
storeData: Object
|
|
20
14
|
},
|
|
21
15
|
setup(props) {
|
|
22
16
|
const VxeUIModalComponent = VxeUI.getComponent("VxeModal");
|
|
@@ -41,7 +35,7 @@ const TableImportPanelComponent = defineVxeComponent({
|
|
|
41
35
|
const { type, typeList } = storeData;
|
|
42
36
|
if (type) {
|
|
43
37
|
const selectItem = XEUtils.find(typeList, (item) => type === item.value);
|
|
44
|
-
return
|
|
38
|
+
return selectItem ? selectItem.label : "*.*";
|
|
45
39
|
}
|
|
46
40
|
return `*.${typeList.map((item) => item.value).join(", *.")}`;
|
|
47
41
|
});
|
|
@@ -58,8 +52,7 @@ const TableImportPanelComponent = defineVxeComponent({
|
|
|
58
52
|
$xeTable.readFile(defaultOptions).then((params) => {
|
|
59
53
|
const { file } = params;
|
|
60
54
|
Object.assign(storeData, parseFile(file), { file });
|
|
61
|
-
}).catch(() =>
|
|
62
|
-
});
|
|
55
|
+
}).catch((e) => e);
|
|
63
56
|
};
|
|
64
57
|
const showEvent = () => {
|
|
65
58
|
nextTick(() => {
|
|
@@ -7,7 +7,6 @@ import { isEnableConf } from "../../../ui/src/utils.mjs";
|
|
|
7
7
|
import { VxeUI } from "../../../../../@vxe-ui/core/es/index.esm.mjs";
|
|
8
8
|
const { renderer, hooks } = VxeUI;
|
|
9
9
|
const tableFilterMethodKeys = ["openFilter", "setFilter", "clearFilter", "saveFilter", "saveFilterByEvent", "saveFilterPanel", "saveFilterPanelByEvent", "resetFilter", "resetFilterByEvent", "resetFilterPanel", "resetFilterPanelByEvent", "getCheckedFilters", "updateFilterOptionStatus"];
|
|
10
|
-
const sourceType = "table";
|
|
11
10
|
hooks.add("tableFilterModule", {
|
|
12
11
|
setupTable($xeTable) {
|
|
13
12
|
const $xeGrid = $xeTable.xeGrid;
|
|
@@ -26,7 +25,16 @@ hooks.add("tableFilterModule", {
|
|
|
26
25
|
filterStore.isIndeterminate = !filterStore.isAllSelected && filterOptions.some((item) => item._checked);
|
|
27
26
|
}
|
|
28
27
|
},
|
|
29
|
-
|
|
28
|
+
/**
|
|
29
|
+
* 点击筛选事件
|
|
30
|
+
* 当筛选图标被点击时触发
|
|
31
|
+
* 更新选项是否全部状态
|
|
32
|
+
* 打开筛选面板
|
|
33
|
+
* @param {Event} evnt 事件
|
|
34
|
+
* @param {ColumnInfo} column 列配置
|
|
35
|
+
* @param {Object} params 参数
|
|
36
|
+
*/
|
|
37
|
+
triggerFilterEvent(evnt, column, params) {
|
|
30
38
|
const { initStore, filterStore } = reactData;
|
|
31
39
|
const { elemStore } = internalData;
|
|
32
40
|
if (filterStore.column === column && filterStore.visible) {
|
|
@@ -35,9 +43,9 @@ hooks.add("tableFilterModule", {
|
|
|
35
43
|
const tableEl = refElem.value;
|
|
36
44
|
const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode();
|
|
37
45
|
const filterOpts = computeFilterOpts.value;
|
|
38
|
-
const {
|
|
39
|
-
const currEl = btnEl || colEl;
|
|
46
|
+
const { transfer } = filterOpts;
|
|
40
47
|
const tableRect = tableEl.getBoundingClientRect();
|
|
48
|
+
const btnElem = evnt.currentTarget;
|
|
41
49
|
const filterRender = column ? column.filterRender : null;
|
|
42
50
|
const compConf = filterRender && isEnableConf(filterRender) ? renderer.get(filterRender.name) : null;
|
|
43
51
|
$xeTable.handleFilterOptions(column);
|
|
@@ -55,17 +63,17 @@ hooks.add("tableFilterModule", {
|
|
|
55
63
|
if (!filterWrapperElem) {
|
|
56
64
|
return;
|
|
57
65
|
}
|
|
58
|
-
const btnRect =
|
|
66
|
+
const btnRect = btnElem.getBoundingClientRect();
|
|
59
67
|
const filterHeadElem = filterWrapperElem.querySelector(".vxe-table--filter-header");
|
|
60
68
|
const filterFootElem = filterWrapperElem.querySelector(".vxe-table--filter-footer");
|
|
61
69
|
const filterWidth = filterWrapperElem.offsetWidth;
|
|
62
|
-
const centerWidth =
|
|
70
|
+
const centerWidth = filterWidth / 2;
|
|
63
71
|
let left = 0;
|
|
64
72
|
let top = 0;
|
|
65
73
|
let maxHeight = 0;
|
|
66
74
|
if (transfer) {
|
|
67
75
|
left = btnRect.left - centerWidth + scrollLeft;
|
|
68
|
-
top = btnRect.top +
|
|
76
|
+
top = btnRect.top + btnElem.clientHeight + scrollTop;
|
|
69
77
|
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));
|
|
70
78
|
if (left < 16) {
|
|
71
79
|
left = 16;
|
|
@@ -74,7 +82,7 @@ hooks.add("tableFilterModule", {
|
|
|
74
82
|
}
|
|
75
83
|
} else {
|
|
76
84
|
left = btnRect.left - tableRect.left - centerWidth;
|
|
77
|
-
top = btnRect.top - tableRect.top +
|
|
85
|
+
top = btnRect.top - tableRect.top + btnElem.clientHeight;
|
|
78
86
|
maxHeight = Math.max(40, tableEl.clientHeight - top - (filterHeadElem ? filterHeadElem.clientHeight : 0) - (filterFootElem ? filterFootElem.clientHeight : 0) - 14);
|
|
79
87
|
if (left < 1) {
|
|
80
88
|
left = 1;
|
|
@@ -89,43 +97,18 @@ hooks.add("tableFilterModule", {
|
|
|
89
97
|
}
|
|
90
98
|
}
|
|
91
99
|
}
|
|
92
|
-
|
|
100
|
+
filterStore.style = {
|
|
93
101
|
top: toCssUnit(top),
|
|
94
102
|
left: toCssUnit(left)
|
|
95
103
|
};
|
|
96
|
-
if (zIndex) {
|
|
97
|
-
fStys.zIndex = zIndex;
|
|
98
|
-
}
|
|
99
|
-
filterStore.style = fStys;
|
|
100
104
|
if (compConf ? !compConf.tableFilterAutoHeight : false) {
|
|
101
105
|
maxHeight = 0;
|
|
102
|
-
} else {
|
|
103
|
-
if (customMaxHeight) {
|
|
104
|
-
maxHeight = customMaxHeight > maxHeight ? maxHeight : customMaxHeight;
|
|
105
|
-
}
|
|
106
106
|
}
|
|
107
107
|
filterStore.maxHeight = maxHeight;
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
$xeTable.dispatchEvent("filter-visible", { column, field: column.field, property: column.field, filterList: $xeTable.getCheckedFilters(), visible: filterStore.visible }, evnt);
|
|
111
111
|
},
|
|
112
|
-
/**
|
|
113
|
-
* 点击筛选事件
|
|
114
|
-
* 当筛选图标被点击时触发
|
|
115
|
-
* 更新选项是否全部状态
|
|
116
|
-
* 打开筛选面板
|
|
117
|
-
* @param {Event} evnt 事件
|
|
118
|
-
* @param {ColumnInfo} column 列配置
|
|
119
|
-
* @param {Object} params 参数
|
|
120
|
-
*/
|
|
121
|
-
triggerFilterEvent(evnt, column, params) {
|
|
122
|
-
const { elemStore } = internalData;
|
|
123
|
-
const { fixed } = column;
|
|
124
|
-
const headerWrapperElem = getRefElem(elemStore[`${fixed || "main"}-header-wrapper`] || elemStore["main-header-wrapper"]);
|
|
125
|
-
const btnElem = evnt.currentTarget;
|
|
126
|
-
const colEl = headerWrapperElem ? headerWrapperElem.querySelector(`.vxe-header--column.${column.id}`) : null;
|
|
127
|
-
$xeTable.handleOpenFilterColumn(evnt, btnElem, colEl || btnElem, column, params);
|
|
128
|
-
},
|
|
129
112
|
handleClearFilter(column) {
|
|
130
113
|
if (column) {
|
|
131
114
|
const { filters, filterRender } = column;
|
|
@@ -272,39 +255,12 @@ hooks.add("tableFilterModule", {
|
|
|
272
255
|
const column = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
273
256
|
if (column && column.filters) {
|
|
274
257
|
const { elemStore } = internalData;
|
|
275
|
-
const { fixed
|
|
258
|
+
const { fixed } = column;
|
|
276
259
|
return $xeTable.scrollToColumn(column).then(() => {
|
|
277
260
|
const headerWrapperElem = getRefElem(elemStore[`${fixed || "main"}-header-wrapper`] || elemStore["main-header-wrapper"]);
|
|
278
261
|
if (headerWrapperElem) {
|
|
279
262
|
const filterBtnElem = headerWrapperElem.querySelector(`.vxe-header--column.${column.id} .vxe-cell--filter`);
|
|
280
|
-
|
|
281
|
-
triggerEvent(filterBtnElem, "click");
|
|
282
|
-
} else {
|
|
283
|
-
const colEl = headerWrapperElem.querySelector(`.vxe-header--column.${column.id}`);
|
|
284
|
-
if (colEl) {
|
|
285
|
-
let firstFilterOption = null;
|
|
286
|
-
if (filters) {
|
|
287
|
-
firstFilterOption = filters[0];
|
|
288
|
-
}
|
|
289
|
-
const params = {
|
|
290
|
-
$table: $xeTable,
|
|
291
|
-
$grid: $xeGrid,
|
|
292
|
-
$gantt: $xeGantt,
|
|
293
|
-
$rowIndex: -1,
|
|
294
|
-
column,
|
|
295
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
296
|
-
$columnIndex: $xeTable.getVMColumnIndex(column),
|
|
297
|
-
_columnIndex: $xeTable.getVTColumnIndex(column),
|
|
298
|
-
firstFilterOption,
|
|
299
|
-
fixed,
|
|
300
|
-
source: sourceType,
|
|
301
|
-
type: "header"
|
|
302
|
-
// isHidden
|
|
303
|
-
// hasFilter
|
|
304
|
-
};
|
|
305
|
-
$xeTable.handleOpenFilterColumn(new Event("click"), null, colEl, column, params);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
263
|
+
triggerEvent(filterBtnElem, "click");
|
|
308
264
|
}
|
|
309
265
|
});
|
|
310
266
|
}
|
|
@@ -7,7 +7,7 @@ const { hooks } = VxeUI;
|
|
|
7
7
|
hooks.add("tableKeyboardModule", {
|
|
8
8
|
setupTable($xeTable) {
|
|
9
9
|
const { props, reactData, internalData } = $xeTable;
|
|
10
|
-
const { refElem
|
|
10
|
+
const { refElem } = $xeTable.getRefMaps();
|
|
11
11
|
const { computeEditOpts, computeCheckboxOpts, computeMouseOpts, computeTreeOpts, computeRowOpts, computeColumnOpts, computeCellOpts, computeDefaultRowHeight, computeCurrentRowOpts, computeCurrentColumnOpts } = $xeTable.getComputeMaps();
|
|
12
12
|
function getCheckboxRangeRows(evnt, params, targetTrElem, trRect, offsetClientTop, moveRange) {
|
|
13
13
|
const { showOverflow } = props;
|
|
@@ -229,8 +229,8 @@ hooks.add("tableKeyboardModule", {
|
|
|
229
229
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
230
230
|
const mouseOpts = computeMouseOpts.value;
|
|
231
231
|
const editOpts = computeEditOpts.value;
|
|
232
|
-
if (mouseConfig && mouseOpts.area && $xeTable.
|
|
233
|
-
return $xeTable.
|
|
232
|
+
if (mouseConfig && mouseOpts.area && $xeTable.triggerCellAreaModnEvent) {
|
|
233
|
+
return $xeTable.triggerCellAreaModnEvent(evnt, params);
|
|
234
234
|
} else {
|
|
235
235
|
if (checkboxConfig && checkboxOpts.range) {
|
|
236
236
|
handleCheckboxRangeEvent(evnt, params);
|
|
@@ -245,18 +245,9 @@ hooks.add("tableKeyboardModule", {
|
|
|
245
245
|
const handleMoveSelected = (evnt, args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow) => {
|
|
246
246
|
const { afterFullData, visibleColumn } = internalData;
|
|
247
247
|
const params = Object.assign({}, args);
|
|
248
|
-
const
|
|
249
|
-
const
|
|
250
|
-
|
|
251
|
-
const tableBody = refTableBody.value;
|
|
252
|
-
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
253
|
-
const tableWidth = tableBodyElem ? tableBodyElem.clientWidth : 0;
|
|
254
|
-
let colAlign = isLeftArrow || isRightArrow || column.renderWidth < tableWidth;
|
|
255
|
-
if (isLeftArrow && _columnIndex >= 0 || isRightArrow && _columnIndex <= visibleColumn.length - 1) {
|
|
256
|
-
colAlign = false;
|
|
257
|
-
} else {
|
|
258
|
-
evnt.preventDefault();
|
|
259
|
-
}
|
|
248
|
+
const _rowIndex = $xeTable.getVTRowIndex(params.row);
|
|
249
|
+
const _columnIndex = $xeTable.getVTColumnIndex(params.column);
|
|
250
|
+
evnt.preventDefault();
|
|
260
251
|
if (isUpArrow && _rowIndex > 0) {
|
|
261
252
|
params.rowIndex = _rowIndex - 1;
|
|
262
253
|
params.row = afterFullData[params.rowIndex];
|
|
@@ -270,9 +261,7 @@ hooks.add("tableKeyboardModule", {
|
|
|
270
261
|
params.columnIndex = _columnIndex + 1;
|
|
271
262
|
params.column = visibleColumn[params.columnIndex];
|
|
272
263
|
}
|
|
273
|
-
$xeTable.scrollToRow(params.row, params.column
|
|
274
|
-
colAlign
|
|
275
|
-
}).then(() => {
|
|
264
|
+
$xeTable.scrollToRow(params.row, params.column).then(() => {
|
|
276
265
|
params.cell = $xeTable.getCellElement(params.row, params.column);
|
|
277
266
|
$xeTable.handleSelected(params, evnt);
|
|
278
267
|
});
|
|
@@ -21,7 +21,7 @@ hooks.add("tableMenuModule", {
|
|
|
21
21
|
const isContentMenu = computeIsContentMenu.value;
|
|
22
22
|
const menuOpts = computeMenuOpts.value;
|
|
23
23
|
const config = menuOpts[type];
|
|
24
|
-
const {
|
|
24
|
+
const { transfer, visibleMethod } = menuOpts;
|
|
25
25
|
if (config) {
|
|
26
26
|
const { options, disabled } = config;
|
|
27
27
|
if (disabled) {
|
|
@@ -53,7 +53,7 @@ hooks.add("tableMenuModule", {
|
|
|
53
53
|
selectChild: null,
|
|
54
54
|
showChild: false,
|
|
55
55
|
style: {
|
|
56
|
-
zIndex:
|
|
56
|
+
zIndex: internalData.tZindex,
|
|
57
57
|
top: `${top}px`,
|
|
58
58
|
left: `${left}px`
|
|
59
59
|
}
|