vxe-table 3.15.44 → 3.15.45
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/{iconfont.1750386589726.ttf → iconfont.1750641764687.ttf} +0 -0
- package/es/iconfont.1750641764687.woff +0 -0
- package/es/iconfont.1750641764687.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +9 -0
- package/es/table/module/custom/panel.js +395 -300
- package/es/table/module/edit/mixin.js +27 -10
- package/es/table/module/export/mixin.js +19 -6
- package/es/table/src/cell.js +4 -4
- package/es/table/src/methods.js +3 -3
- package/es/table/style.css +37 -9
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +5 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +37 -9
- package/es/vxe-table/style.min.css +1 -1
- package/lib/{iconfont.1750386589726.ttf → iconfont.1750641764687.ttf} +0 -0
- package/lib/iconfont.1750641764687.woff +0 -0
- package/lib/iconfont.1750641764687.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +326 -145
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +11 -0
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +234 -122
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +49 -10
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/mixin.js +19 -4
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/src/cell.js +4 -4
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/methods.js +3 -3
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +37 -9
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +5 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +37 -9
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/table/module/custom/mixin.ts +10 -0
- package/packages/table/module/custom/panel.ts +413 -313
- package/packages/table/module/edit/mixin.ts +28 -10
- package/packages/table/module/export/mixin.ts +18 -6
- package/packages/table/src/cell.ts +4 -4
- package/packages/table/src/methods.ts +3 -3
- package/packages/ui/index.ts +4 -0
- package/styles/components/icon.scss +9 -1
- package/styles/components/table-module/custom.scss +26 -3
- package/styles/helpers/baseMixin.scss +16 -2
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/es/iconfont.1750386589726.woff +0 -0
- package/es/iconfont.1750386589726.woff2 +0 -0
- package/lib/iconfont.1750386589726.woff +0 -0
- package/lib/iconfont.1750386589726.woff2 +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2002,7 +2002,7 @@ function getClass(property, params) {
|
|
|
2002
2002
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2003
2003
|
|
|
2004
2004
|
|
|
2005
|
-
const version = "3.15.
|
|
2005
|
+
const version = "3.15.45";
|
|
2006
2006
|
core_.VxeUI.version = version;
|
|
2007
2007
|
core_.VxeUI.tableVersion = version;
|
|
2008
2008
|
core_.VxeUI.setConfig({
|
|
@@ -2298,14 +2298,18 @@ core_.VxeUI.setIcon({
|
|
|
2298
2298
|
TABLE_CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked-fill',
|
|
2299
2299
|
TABLE_CHECKBOX_UNCHECKED: iconPrefix + 'checkbox-unchecked',
|
|
2300
2300
|
TABLE_CHECKBOX_INDETERMINATE: iconPrefix + 'checkbox-indeterminate-fill',
|
|
2301
|
+
TABLE_CHECKBOX_DISABLED_UNCHECKED: iconPrefix + 'checkbox-unchecked-fill',
|
|
2301
2302
|
TABLE_RADIO_CHECKED: iconPrefix + 'radio-checked-fill',
|
|
2302
2303
|
TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
|
|
2304
|
+
TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
|
|
2303
2305
|
TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
|
|
2304
2306
|
TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
|
|
2305
2307
|
TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
|
|
2306
2308
|
TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
|
|
2307
2309
|
TABLE_DRAG_STATUS_ROW: iconPrefix + 'sort',
|
|
2308
2310
|
TABLE_DRAG_STATUS_SUB_ROW: iconPrefix + 'add-sub',
|
|
2311
|
+
TABLE_DRAG_STATUS_AGG_GROUP: iconPrefix + 'grouping',
|
|
2312
|
+
TABLE_DRAG_STATUS_AGG_VALUES: iconPrefix + 'values',
|
|
2309
2313
|
TABLE_DRAG_STATUS_COLUMN: iconPrefix + 'swap',
|
|
2310
2314
|
TABLE_DRAG_DISABLED: iconPrefix + 'no-drop',
|
|
2311
2315
|
TABLE_ROW_GROUP_OPEN: iconPrefix + 'arrow-right rotate90',
|
|
@@ -2658,7 +2662,7 @@ function isNodeElement(elem) {
|
|
|
2658
2662
|
const {
|
|
2659
2663
|
log: log_log
|
|
2660
2664
|
} = core_.VxeUI;
|
|
2661
|
-
const log_version = `table v${"3.15.
|
|
2665
|
+
const log_version = `table v${"3.15.45"}`;
|
|
2662
2666
|
const warnLog = log_log.create('warn', log_version);
|
|
2663
2667
|
const errLog = log_log.create('error', log_version);
|
|
2664
2668
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -4262,7 +4266,7 @@ const Cell = {
|
|
|
4262
4266
|
const radioVNs = [];
|
|
4263
4267
|
if (isVisible) {
|
|
4264
4268
|
radioVNs.push(h('span', {
|
|
4265
|
-
class: ['vxe-radio--icon', isChecked ? cell_getIcon().TABLE_RADIO_CHECKED : cell_getIcon().TABLE_RADIO_UNCHECKED]
|
|
4269
|
+
class: ['vxe-radio--icon', isChecked ? cell_getIcon().TABLE_RADIO_CHECKED : isDisabled ? cell_getIcon().TABLE_RADIO_DISABLED_UNCHECKED : cell_getIcon().TABLE_RADIO_UNCHECKED]
|
|
4266
4270
|
}));
|
|
4267
4271
|
}
|
|
4268
4272
|
if (defaultSlot || labelField) {
|
|
@@ -4341,7 +4345,7 @@ const Cell = {
|
|
|
4341
4345
|
},
|
|
4342
4346
|
on: ons
|
|
4343
4347
|
}, [h('span', {
|
|
4344
|
-
class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
4348
|
+
class: ['vxe-checkbox--icon', isAllCheckboxIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? cell_getIcon().TABLE_CHECKBOX_CHECKED : isAllCheckboxDisabled ? cell_getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
4345
4349
|
})].concat(titleSlot || colTitle ? [h('span', {
|
|
4346
4350
|
class: 'vxe-checkbox--label'
|
|
4347
4351
|
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams, h) : colTitle)] : []))]));
|
|
@@ -4417,7 +4421,7 @@ const Cell = {
|
|
|
4417
4421
|
const checkVNs = [];
|
|
4418
4422
|
if (isVisible) {
|
|
4419
4423
|
checkVNs.push(h('span', {
|
|
4420
|
-
class: ['vxe-checkbox--icon', indeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
4424
|
+
class: ['vxe-checkbox--icon', indeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : isDisabled ? cell_getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
4421
4425
|
}));
|
|
4422
4426
|
}
|
|
4423
4427
|
if (defaultSlot || labelField) {
|
|
@@ -4510,7 +4514,7 @@ const Cell = {
|
|
|
4510
4514
|
const checkVNs = [];
|
|
4511
4515
|
if (isVisible) {
|
|
4512
4516
|
checkVNs.push(h('span', {
|
|
4513
|
-
class: ['vxe-checkbox--icon', isIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
4517
|
+
class: ['vxe-checkbox--icon', isIndeterminate ? cell_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? cell_getIcon().TABLE_CHECKBOX_CHECKED : isDisabled ? cell_getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : cell_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
4514
4518
|
}));
|
|
4515
4519
|
}
|
|
4516
4520
|
if (defaultSlot || labelField) {
|
|
@@ -13139,7 +13143,7 @@ const Methods = {
|
|
|
13139
13143
|
}
|
|
13140
13144
|
vLen++;
|
|
13141
13145
|
});
|
|
13142
|
-
const isSelected = sLen >= vLen;
|
|
13146
|
+
const isSelected = selectCheckboxMaps[rowid] || sLen >= vLen && (vLen >= 1 || hLen >= 1);
|
|
13143
13147
|
const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
|
|
13144
13148
|
if (checkField) {
|
|
13145
13149
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().set(row, checkField, isSelected);
|
|
@@ -17195,7 +17199,7 @@ const Methods = {
|
|
|
17195
17199
|
}
|
|
17196
17200
|
};
|
|
17197
17201
|
// Module methods
|
|
17198
|
-
const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,saveFilterPanelByEvent,resetFilterPanel,resetFilterPanelByEvent,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
|
|
17202
|
+
const funcs = 'setFilter,openFilter,clearFilter,saveFilterPanel,saveFilterPanelByEvent,resetFilterPanel,resetFilterPanelByEvent,getCheckedFilters,updateFilterOptionStatus,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFNR,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,insertNextAt,insertChild,insertChildAt,insertChildNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getEditCell,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,fullValidateField,validateField,openExport,closeExport,openPrint,closePrint,getPrintHtml,exportData,openImport,closeImport,importData,saveFile,readFile,importByFile,print,openCustom,closeCustom,toggleCustom,saveCustom,cancelCustom,resetCustom,toggleCustomAllCheckbox,setCustomAllCheckbox'.split(',');
|
|
17199
17203
|
funcs.forEach(name => {
|
|
17200
17204
|
Methods[name] = function (...args) {
|
|
17201
17205
|
if (!this[`_${name}`]) {
|
|
@@ -17205,7 +17209,7 @@ funcs.forEach(name => {
|
|
|
17205
17209
|
errLog('vxe.error.reqModule', ['Validator']);
|
|
17206
17210
|
} else if ('setFilter,openFilter,clearFilter,getCheckedFilters'.split(',').includes(name)) {
|
|
17207
17211
|
errLog('vxe.error.reqModule', ['Filter']);
|
|
17208
|
-
} else if ('insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell'.split(',').includes(name)) {
|
|
17212
|
+
} else if ('insert,insertAt,insertNextAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,getEditRecord,getEditCell,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell'.split(',').includes(name)) {
|
|
17209
17213
|
errLog('vxe.error.reqModule', ['Edit']);
|
|
17210
17214
|
} else if ('openCustom'.split(',').includes(name)) {
|
|
17211
17215
|
errLog('vxe.error.reqModule', ['Custom']);
|
|
@@ -19455,22 +19459,29 @@ const {
|
|
|
19455
19459
|
getIcon: panel_getIcon,
|
|
19456
19460
|
renderEmptyElement: panel_renderEmptyElement
|
|
19457
19461
|
} = core_.VxeUI;
|
|
19458
|
-
function panel_showDropTip(
|
|
19459
|
-
const
|
|
19460
|
-
|
|
19461
|
-
|
|
19462
|
-
const el = _vm.$refs.bodyElemRef;
|
|
19463
|
-
if (!el) {
|
|
19462
|
+
function panel_showDropTip($xeTableCustomPanel, evnt, optEl, showLine, dragPos) {
|
|
19463
|
+
const customPanelInternalData = $xeTableCustomPanel.internalData;
|
|
19464
|
+
const bodyWrapperElem = $xeTableCustomPanel.$refs.refBodyWrapperElem;
|
|
19465
|
+
if (!bodyWrapperElem) {
|
|
19464
19466
|
return;
|
|
19465
19467
|
}
|
|
19466
|
-
const
|
|
19468
|
+
const customBodyElem = $xeTableCustomPanel.$refs.refCustomBodyElem;
|
|
19469
|
+
if (!customBodyElem) {
|
|
19470
|
+
return;
|
|
19471
|
+
}
|
|
19472
|
+
const {
|
|
19473
|
+
prevDragToChild
|
|
19474
|
+
} = customPanelInternalData;
|
|
19475
|
+
const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect();
|
|
19476
|
+
const customBodyRect = customBodyElem.getBoundingClientRect();
|
|
19467
19477
|
if (optEl) {
|
|
19468
|
-
const dragLineEl =
|
|
19478
|
+
const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
|
|
19469
19479
|
if (dragLineEl) {
|
|
19470
19480
|
if (showLine) {
|
|
19471
19481
|
const optRect = optEl.getBoundingClientRect();
|
|
19472
19482
|
dragLineEl.style.display = 'block';
|
|
19473
|
-
dragLineEl.style.
|
|
19483
|
+
dragLineEl.style.left = `${Math.max(0, customBodyRect.x - bodyWrapperRect.x)}px`;
|
|
19484
|
+
dragLineEl.style.top = `${Math.max(1, optRect.y + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
|
|
19474
19485
|
dragLineEl.style.height = `${optRect.height}px`;
|
|
19475
19486
|
dragLineEl.style.width = `${optRect.width}px`;
|
|
19476
19487
|
dragLineEl.setAttribute('drag-pos', dragPos);
|
|
@@ -19480,17 +19491,17 @@ function panel_showDropTip(_vm, evnt, optEl, showLine, dragPos) {
|
|
|
19480
19491
|
}
|
|
19481
19492
|
}
|
|
19482
19493
|
}
|
|
19483
|
-
const dragTipEl =
|
|
19494
|
+
const dragTipEl = $xeTableCustomPanel.$refs.refDragTipElem;
|
|
19484
19495
|
if (dragTipEl) {
|
|
19485
19496
|
dragTipEl.style.display = 'block';
|
|
19486
|
-
dragTipEl.style.top = `${Math.min(
|
|
19487
|
-
dragTipEl.style.left = `${Math.min(
|
|
19497
|
+
dragTipEl.style.top = `${Math.min(bodyWrapperElem.clientHeight + bodyWrapperElem.scrollTop - dragTipEl.clientHeight, evnt.clientY + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
|
|
19498
|
+
dragTipEl.style.left = `${Math.min(bodyWrapperElem.clientWidth + bodyWrapperElem.scrollLeft - dragTipEl.clientWidth, evnt.clientX + bodyWrapperElem.scrollLeft - bodyWrapperRect.x)}px`;
|
|
19488
19499
|
dragTipEl.setAttribute('drag-status', showLine ? prevDragToChild ? 'sub' : 'normal' : 'disabled');
|
|
19489
19500
|
}
|
|
19490
19501
|
}
|
|
19491
|
-
function panel_hideDropTip(
|
|
19492
|
-
const dragTipEl =
|
|
19493
|
-
const dragLineEl =
|
|
19502
|
+
function panel_hideDropTip($xeTableCustomPanel) {
|
|
19503
|
+
const dragTipEl = $xeTableCustomPanel.$refs.refDragTipElem;
|
|
19504
|
+
const dragLineEl = $xeTableCustomPanel.$refs.refDragLineElem;
|
|
19494
19505
|
if (dragTipEl) {
|
|
19495
19506
|
dragTipEl.style.display = '';
|
|
19496
19507
|
}
|
|
@@ -19498,9 +19509,12 @@ function panel_hideDropTip(_vm) {
|
|
|
19498
19509
|
dragLineEl.style.display = '';
|
|
19499
19510
|
}
|
|
19500
19511
|
}
|
|
19501
|
-
const renderDragTip = (h,
|
|
19502
|
-
const $xeTable =
|
|
19503
|
-
const
|
|
19512
|
+
const renderDragTip = (h, $xeTableCustomPanel) => {
|
|
19513
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
19514
|
+
const customPanelReactData = $xeTableCustomPanel.reactData;
|
|
19515
|
+
const {
|
|
19516
|
+
dragTipText
|
|
19517
|
+
} = customPanelReactData;
|
|
19504
19518
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
19505
19519
|
return h('div', {}, [h('div', {
|
|
19506
19520
|
ref: 'refDragLineElem',
|
|
@@ -19518,18 +19532,22 @@ const renderDragTip = (h, _vm) => {
|
|
|
19518
19532
|
class: ['vxe-table-custom-popup--drag-tip-normal-status', panel_getIcon().TABLE_DRAG_STATUS_ROW]
|
|
19519
19533
|
}), h('span', {
|
|
19520
19534
|
class: ['vxe-table-custom-popup--drag-tip-sub-status', panel_getIcon().TABLE_DRAG_STATUS_SUB_ROW]
|
|
19535
|
+
}), h('span', {
|
|
19536
|
+
class: ['vxe-table-custom-popup--drag-tip-group-status', panel_getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
|
|
19537
|
+
}), h('span', {
|
|
19538
|
+
class: ['vxe-table-custom-popup--drag-tip-values-status', panel_getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
|
|
19521
19539
|
}), h('span', {
|
|
19522
19540
|
class: ['vxe-table-custom-popup--drag-tip-disabled-status', panel_getIcon().TABLE_DRAG_DISABLED]
|
|
19523
19541
|
})]), h('div', {
|
|
19524
19542
|
class: 'vxe-table-custom-popup--drag-tip-content'
|
|
19525
|
-
},
|
|
19543
|
+
}, `${dragTipText || ''}`)])])]);
|
|
19526
19544
|
};
|
|
19527
19545
|
const renderSimplePanel = (h, _vm) => {
|
|
19528
19546
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
19529
19547
|
const props = _vm;
|
|
19530
19548
|
const $xeTable = _vm.$xeTable;
|
|
19531
19549
|
const tableProps = $xeTable;
|
|
19532
|
-
const
|
|
19550
|
+
const tableReactData = $xeTable;
|
|
19533
19551
|
const $xeGrid = $xeTable.$xeGrid;
|
|
19534
19552
|
const {
|
|
19535
19553
|
customStore
|
|
@@ -19542,7 +19560,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
19542
19560
|
const {
|
|
19543
19561
|
isCustomStatus,
|
|
19544
19562
|
customColumnList
|
|
19545
|
-
} =
|
|
19563
|
+
} = tableReactData;
|
|
19546
19564
|
const customOpts = $xeTable.computeCustomOpts;
|
|
19547
19565
|
const {
|
|
19548
19566
|
immediate
|
|
@@ -19626,9 +19644,9 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
19626
19644
|
title: panel_getI18n('vxe.custom.setting.colVisible')
|
|
19627
19645
|
},
|
|
19628
19646
|
on: {
|
|
19629
|
-
click:
|
|
19647
|
+
click: evnt => {
|
|
19630
19648
|
if (!isDisabled) {
|
|
19631
|
-
_vm.changeCheckboxOption(column);
|
|
19649
|
+
_vm.changeCheckboxOption(column, evnt);
|
|
19632
19650
|
}
|
|
19633
19651
|
}
|
|
19634
19652
|
}
|
|
@@ -19674,8 +19692,10 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
19674
19692
|
title: panel_getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
|
|
19675
19693
|
},
|
|
19676
19694
|
on: {
|
|
19677
|
-
click: (
|
|
19678
|
-
|
|
19695
|
+
click: ({
|
|
19696
|
+
$event
|
|
19697
|
+
}) => {
|
|
19698
|
+
_vm.changeFixedOption(column, 'left', $event);
|
|
19679
19699
|
}
|
|
19680
19700
|
}
|
|
19681
19701
|
}), h(VxeUIButtonComponent, {
|
|
@@ -19687,8 +19707,10 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
19687
19707
|
title: panel_getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
|
|
19688
19708
|
},
|
|
19689
19709
|
on: {
|
|
19690
|
-
click: (
|
|
19691
|
-
|
|
19710
|
+
click: ({
|
|
19711
|
+
$event
|
|
19712
|
+
}) => {
|
|
19713
|
+
_vm.changeFixedOption(column, 'right', $event);
|
|
19692
19714
|
}
|
|
19693
19715
|
}
|
|
19694
19716
|
})]) : panel_renderEmptyElement($xeTable)]));
|
|
@@ -19702,11 +19724,15 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
19702
19724
|
style: maxHeight && !['left', 'right'].includes(placement || '') ? {
|
|
19703
19725
|
maxHeight: `${maxHeight}px`
|
|
19704
19726
|
} : {}
|
|
19705
|
-
}, customStore.visible ? [
|
|
19727
|
+
}, customStore.visible ? [h('div', {
|
|
19728
|
+
ref: 'refBodyWrapperElem',
|
|
19729
|
+
class: 'vxe-table-custom-body-wrapper'
|
|
19730
|
+
}, [!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? h($xeTable.getPivotTableAggregateSimplePanel(), {
|
|
19706
19731
|
props: {
|
|
19707
19732
|
customStore
|
|
19708
19733
|
}
|
|
19709
19734
|
}) : panel_renderEmptyElement($xeTable), h('div', {
|
|
19735
|
+
ref: 'refCustomBodyElem',
|
|
19710
19736
|
class: 'vxe-table-custom--handle-wrapper'
|
|
19711
19737
|
}, [h('div', {
|
|
19712
19738
|
class: 'vxe-table-custom--header'
|
|
@@ -19732,7 +19758,6 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
19732
19758
|
}, panel_getI18n('vxe.toolbar.customAll'))]) : h('span', {
|
|
19733
19759
|
class: 'vxe-checkbox--label'
|
|
19734
19760
|
}, panel_getI18n('vxe.table.customTitle'))])])]), h('div', {
|
|
19735
|
-
ref: 'bodyElemRef',
|
|
19736
19761
|
class: 'vxe-table-custom--body'
|
|
19737
19762
|
}, [topSlot ? h('div', {
|
|
19738
19763
|
class: 'vxe-table-custom--panel-top'
|
|
@@ -19747,7 +19772,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
19747
19772
|
on: customWrapperOns
|
|
19748
19773
|
}, colVNs), bottomSlot ? h('div', {
|
|
19749
19774
|
class: 'vxe-table-custom--panel-bottom'
|
|
19750
|
-
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable)
|
|
19775
|
+
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable)]), customOpts.showFooter ? h('div', {
|
|
19751
19776
|
class: 'vxe-table-custom--footer'
|
|
19752
19777
|
}, footerSlot ? $xeTable.callSlot(footerSlot, params, h) : [h('div', {
|
|
19753
19778
|
class: 'vxe-table-custom--footer-buttons'
|
|
@@ -19785,18 +19810,18 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
19785
19810
|
on: {
|
|
19786
19811
|
click: _vm.confirmCustomEvent
|
|
19787
19812
|
}
|
|
19788
|
-
})])]) : null])] : []);
|
|
19813
|
+
})])]) : null]), renderDragTip(h, _vm)])] : []);
|
|
19789
19814
|
};
|
|
19790
|
-
const renderPopupPanel = (h,
|
|
19815
|
+
const renderPopupPanel = (h, $xeTableCustomPanel) => {
|
|
19791
19816
|
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
19792
19817
|
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
19793
19818
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
19794
19819
|
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeInput');
|
|
19795
|
-
const
|
|
19796
|
-
const props =
|
|
19797
|
-
const $xeTable =
|
|
19820
|
+
const _vm = $xeTableCustomPanel;
|
|
19821
|
+
const props = $xeTableCustomPanel;
|
|
19822
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
19798
19823
|
const tableProps = $xeTable;
|
|
19799
|
-
const
|
|
19824
|
+
const tableReactData = $xeTable;
|
|
19800
19825
|
const $xeGrid = $xeTable.$xeGrid;
|
|
19801
19826
|
const {
|
|
19802
19827
|
customStore
|
|
@@ -19807,7 +19832,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
19807
19832
|
const {
|
|
19808
19833
|
isCustomStatus,
|
|
19809
19834
|
customColumnList
|
|
19810
|
-
} =
|
|
19835
|
+
} = tableReactData;
|
|
19811
19836
|
const customOpts = $xeTable.computeCustomOpts;
|
|
19812
19837
|
const {
|
|
19813
19838
|
immediate
|
|
@@ -19914,9 +19939,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
19914
19939
|
title: panel_getI18n('vxe.custom.setting.colVisible')
|
|
19915
19940
|
},
|
|
19916
19941
|
on: {
|
|
19917
|
-
click:
|
|
19942
|
+
click: evnt => {
|
|
19918
19943
|
if (!isDisabled) {
|
|
19919
|
-
_vm.changeCheckboxOption(column);
|
|
19944
|
+
_vm.changeCheckboxOption(column, evnt);
|
|
19920
19945
|
}
|
|
19921
19946
|
}
|
|
19922
19947
|
}
|
|
@@ -19995,8 +20020,11 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
19995
20020
|
}]
|
|
19996
20021
|
},
|
|
19997
20022
|
on: {
|
|
19998
|
-
|
|
19999
|
-
|
|
20023
|
+
change({
|
|
20024
|
+
label,
|
|
20025
|
+
$event
|
|
20026
|
+
}) {
|
|
20027
|
+
_vm.changeFixedOption(column, label, $event);
|
|
20000
20028
|
}
|
|
20001
20029
|
}
|
|
20002
20030
|
})]) : panel_renderEmptyElement($xeTable)]));
|
|
@@ -20004,12 +20032,12 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20004
20032
|
});
|
|
20005
20033
|
const scopedSlots = {
|
|
20006
20034
|
default: () => {
|
|
20007
|
-
if (defaultSlot) {
|
|
20008
|
-
return $xeTable.callSlot(defaultSlot, params, h);
|
|
20009
|
-
}
|
|
20010
20035
|
return h('div', {
|
|
20011
|
-
ref: '
|
|
20012
|
-
class: 'vxe-table-custom-popup--body'
|
|
20036
|
+
ref: 'refBodyWrapperElem',
|
|
20037
|
+
class: 'vxe-table-custom-popup--body-wrapper'
|
|
20038
|
+
}, defaultSlot ? $xeTable.callSlot(defaultSlot, params, h) : [h('div', {
|
|
20039
|
+
ref: 'refCustomBodyElem',
|
|
20040
|
+
class: 'vxe-table-custom-popup--handle-wrapper'
|
|
20013
20041
|
}, [topSlot ? h('div', {
|
|
20014
20042
|
class: 'vxe-table-custom-popup--table-top'
|
|
20015
20043
|
}, $xeTable.callSlot(topSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
@@ -20045,7 +20073,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20045
20073
|
}
|
|
20046
20074
|
}, trVNs)])]), bottomSlot ? h('div', {
|
|
20047
20075
|
class: 'vxe-table-custom-popup--table-bottom'
|
|
20048
|
-
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), renderDragTip(h, _vm)]);
|
|
20076
|
+
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), renderDragTip(h, _vm)])]);
|
|
20049
20077
|
},
|
|
20050
20078
|
footer: () => {
|
|
20051
20079
|
if (footerSlot) {
|
|
@@ -20149,27 +20177,44 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20149
20177
|
default: () => ({})
|
|
20150
20178
|
}
|
|
20151
20179
|
},
|
|
20180
|
+
provide() {
|
|
20181
|
+
const $xeTableCustomPanel = this;
|
|
20182
|
+
return {
|
|
20183
|
+
$xeTableCustomPanel
|
|
20184
|
+
};
|
|
20185
|
+
},
|
|
20152
20186
|
inject: {
|
|
20153
20187
|
$xeTable: {
|
|
20154
20188
|
default: null
|
|
20155
20189
|
}
|
|
20156
20190
|
},
|
|
20157
20191
|
data() {
|
|
20192
|
+
const reactData = {
|
|
20193
|
+
dragCol: null,
|
|
20194
|
+
dragGroup: null,
|
|
20195
|
+
dragValues: null,
|
|
20196
|
+
dragTipText: ''
|
|
20197
|
+
};
|
|
20198
|
+
const internalData = {
|
|
20199
|
+
// prevDragCol: undefined,
|
|
20200
|
+
// prevDragToChild: false,
|
|
20201
|
+
// prevDragPos: null
|
|
20202
|
+
};
|
|
20158
20203
|
return {
|
|
20159
|
-
|
|
20160
|
-
|
|
20161
|
-
prevDragPos: null
|
|
20204
|
+
reactData,
|
|
20205
|
+
internalData
|
|
20162
20206
|
};
|
|
20163
20207
|
},
|
|
20164
20208
|
computed: {},
|
|
20165
20209
|
created() {
|
|
20210
|
+
const $xeTableCustomPanel = this;
|
|
20166
20211
|
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
20167
20212
|
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
20168
20213
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
20169
20214
|
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
|
|
20170
20215
|
const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
|
|
20171
|
-
|
|
20172
|
-
const $xeTable =
|
|
20216
|
+
$xeTableCustomPanel.$nextTick(() => {
|
|
20217
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20173
20218
|
const {
|
|
20174
20219
|
customOpts
|
|
20175
20220
|
} = $xeTable;
|
|
@@ -20194,16 +20239,18 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20194
20239
|
});
|
|
20195
20240
|
},
|
|
20196
20241
|
render(h) {
|
|
20197
|
-
const $
|
|
20242
|
+
const $xeTableCustomPanel = this;
|
|
20243
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20198
20244
|
const customOpts = $xeTable.computeCustomOpts;
|
|
20199
20245
|
if (['modal', 'drawer', 'popup'].includes(`${customOpts.mode}`)) {
|
|
20200
|
-
return renderPopupPanel(h,
|
|
20246
|
+
return renderPopupPanel(h, $xeTableCustomPanel);
|
|
20201
20247
|
}
|
|
20202
|
-
return renderSimplePanel(h,
|
|
20248
|
+
return renderSimplePanel(h, $xeTableCustomPanel);
|
|
20203
20249
|
},
|
|
20204
20250
|
methods: {
|
|
20205
20251
|
handleWrapperMouseenterEvent(evnt) {
|
|
20206
|
-
const $
|
|
20252
|
+
const $xeTableCustomPanel = this;
|
|
20253
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20207
20254
|
const {
|
|
20208
20255
|
customStore
|
|
20209
20256
|
} = this;
|
|
@@ -20211,10 +20258,12 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20211
20258
|
$xeTable.customOpenEvent(evnt);
|
|
20212
20259
|
},
|
|
20213
20260
|
handleWrapperMouseleaveEvent(evnt) {
|
|
20214
|
-
const $
|
|
20261
|
+
const $xeTableCustomPanel = this;
|
|
20262
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20263
|
+
const props = $xeTableCustomPanel;
|
|
20215
20264
|
const {
|
|
20216
20265
|
customStore
|
|
20217
|
-
} =
|
|
20266
|
+
} = props;
|
|
20218
20267
|
customStore.activeWrapper = false;
|
|
20219
20268
|
setTimeout(() => {
|
|
20220
20269
|
if (!customStore.activeBtn && !customStore.activeWrapper) {
|
|
@@ -20228,9 +20277,10 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20228
20277
|
confirmCustomEvent({
|
|
20229
20278
|
$event
|
|
20230
20279
|
}) {
|
|
20231
|
-
const $
|
|
20232
|
-
const
|
|
20233
|
-
|
|
20280
|
+
const $xeTableCustomPanel = this;
|
|
20281
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20282
|
+
const tableReactData = $xeTable;
|
|
20283
|
+
tableReactData.isCustomStatus = true;
|
|
20234
20284
|
$xeTable.saveCustom();
|
|
20235
20285
|
$xeTable.closeCustom();
|
|
20236
20286
|
$xeTable.emitCustomEvent('confirm', $event);
|
|
@@ -20238,20 +20288,23 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20238
20288
|
cancelCloseEvent({
|
|
20239
20289
|
$event
|
|
20240
20290
|
}) {
|
|
20241
|
-
const $
|
|
20291
|
+
const $xeTableCustomPanel = this;
|
|
20292
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20242
20293
|
$xeTable.closeCustom();
|
|
20243
20294
|
$xeTable.emitCustomEvent('close', $event);
|
|
20244
20295
|
},
|
|
20245
20296
|
cancelCustomEvent({
|
|
20246
20297
|
$event
|
|
20247
20298
|
}) {
|
|
20248
|
-
const $
|
|
20299
|
+
const $xeTableCustomPanel = this;
|
|
20300
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20249
20301
|
$xeTable.cancelCustom();
|
|
20250
20302
|
$xeTable.closeCustom();
|
|
20251
20303
|
$xeTable.emitCustomEvent('cancel', $event);
|
|
20252
20304
|
},
|
|
20253
20305
|
handleResetCustomEvent(evnt) {
|
|
20254
|
-
const $
|
|
20306
|
+
const $xeTableCustomPanel = this;
|
|
20307
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20255
20308
|
$xeTable.resetCustom(true);
|
|
20256
20309
|
$xeTable.closeCustom();
|
|
20257
20310
|
$xeTable.emitCustomEvent('reset', evnt);
|
|
@@ -20271,27 +20324,13 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20271
20324
|
this.handleResetCustomEvent(evnt);
|
|
20272
20325
|
}
|
|
20273
20326
|
},
|
|
20274
|
-
resetPopupCustomEvent(evnt) {
|
|
20275
|
-
if (core_.VxeUI.modal) {
|
|
20276
|
-
core_.VxeUI.modal.confirm({
|
|
20277
|
-
content: panel_getI18n('vxe.custom.cstmConfirmRestore'),
|
|
20278
|
-
className: 'vxe-table--ignore-clear',
|
|
20279
|
-
escClosable: true
|
|
20280
|
-
}).then(type => {
|
|
20281
|
-
if (type === 'confirm') {
|
|
20282
|
-
this.resetCustomEvent(evnt);
|
|
20283
|
-
}
|
|
20284
|
-
});
|
|
20285
|
-
} else {
|
|
20286
|
-
this.resetCustomEvent(evnt);
|
|
20287
|
-
}
|
|
20288
|
-
},
|
|
20289
20327
|
handleOptionCheck(column) {
|
|
20290
|
-
const $
|
|
20291
|
-
const
|
|
20328
|
+
const $xeTableCustomPanel = this;
|
|
20329
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20330
|
+
const tableReactData = $xeTable;
|
|
20292
20331
|
const {
|
|
20293
20332
|
customColumnList
|
|
20294
|
-
} =
|
|
20333
|
+
} = tableReactData;
|
|
20295
20334
|
const matchObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(customColumnList, item => item === column);
|
|
20296
20335
|
if (matchObj && matchObj.parent) {
|
|
20297
20336
|
const {
|
|
@@ -20304,9 +20343,10 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20304
20343
|
}
|
|
20305
20344
|
}
|
|
20306
20345
|
},
|
|
20307
|
-
changeCheckboxOption(column) {
|
|
20308
|
-
const $
|
|
20309
|
-
const
|
|
20346
|
+
changeCheckboxOption(column, evnt) {
|
|
20347
|
+
const $xeTableCustomPanel = this;
|
|
20348
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20349
|
+
const tableReactData = $xeTable;
|
|
20310
20350
|
const customOpts = $xeTable.computeCustomOpts;
|
|
20311
20351
|
const isChecked = !column.renderVisible;
|
|
20312
20352
|
if (customOpts.immediate) {
|
|
@@ -20315,7 +20355,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20315
20355
|
item.renderVisible = isChecked;
|
|
20316
20356
|
item.halfVisible = false;
|
|
20317
20357
|
});
|
|
20318
|
-
|
|
20358
|
+
tableReactData.isCustomStatus = true;
|
|
20319
20359
|
$xeTable.handleCustom();
|
|
20320
20360
|
$xeTable.saveCustomStore('update:visible');
|
|
20321
20361
|
} else {
|
|
@@ -20326,63 +20366,114 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20326
20366
|
}
|
|
20327
20367
|
this.handleOptionCheck(column);
|
|
20328
20368
|
$xeTable.checkCustomStatus();
|
|
20369
|
+
$xeTable.dispatchEvent('custom-visible-change', {
|
|
20370
|
+
column,
|
|
20371
|
+
checked: isChecked
|
|
20372
|
+
}, evnt);
|
|
20329
20373
|
},
|
|
20330
20374
|
changeColumnWidth(column) {
|
|
20331
|
-
const $
|
|
20332
|
-
const
|
|
20375
|
+
const $xeTableCustomPanel = this;
|
|
20376
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20377
|
+
const tableReactData = $xeTable;
|
|
20333
20378
|
const customOpts = $xeTable.computeCustomOpts;
|
|
20334
20379
|
if (customOpts.immediate) {
|
|
20335
20380
|
if (column.renderResizeWidth !== column.renderWidth) {
|
|
20336
20381
|
column.resizeWidth = column.renderResizeWidth;
|
|
20337
20382
|
column.renderWidth = column.renderResizeWidth;
|
|
20338
|
-
|
|
20383
|
+
tableReactData.isCustomStatus = true;
|
|
20339
20384
|
$xeTable.handleCustom();
|
|
20340
20385
|
$xeTable.saveCustomStore('update:width');
|
|
20341
20386
|
}
|
|
20342
20387
|
}
|
|
20343
20388
|
},
|
|
20344
|
-
changeFixedOption(column, colFixed) {
|
|
20345
|
-
const $
|
|
20346
|
-
const
|
|
20389
|
+
changeFixedOption(column, colFixed, evnt) {
|
|
20390
|
+
const $xeTableCustomPanel = this;
|
|
20391
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20392
|
+
const tableReactData = $xeTable;
|
|
20347
20393
|
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
20348
20394
|
const customOpts = $xeTable.computeCustomOpts;
|
|
20395
|
+
let targetFixed = null;
|
|
20349
20396
|
if (customOpts.immediate) {
|
|
20350
20397
|
if (column.renderFixed === colFixed) {
|
|
20398
|
+
targetFixed = '';
|
|
20351
20399
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
|
|
20352
20400
|
col.fixed = '';
|
|
20353
20401
|
col.renderFixed = '';
|
|
20354
20402
|
});
|
|
20355
20403
|
} else {
|
|
20356
20404
|
if (!isMaxFixedColumn || column.renderFixed) {
|
|
20405
|
+
targetFixed = colFixed;
|
|
20357
20406
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
|
|
20358
20407
|
col.fixed = colFixed;
|
|
20359
20408
|
col.renderFixed = colFixed;
|
|
20360
20409
|
});
|
|
20361
20410
|
}
|
|
20362
20411
|
}
|
|
20363
|
-
|
|
20412
|
+
tableReactData.isCustomStatus = true;
|
|
20364
20413
|
$xeTable.handleCustom();
|
|
20365
20414
|
$xeTable.saveCustomStore('update:fixed');
|
|
20366
20415
|
} else {
|
|
20367
20416
|
if (column.renderFixed === colFixed) {
|
|
20417
|
+
targetFixed = '';
|
|
20368
20418
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
|
|
20369
20419
|
col.renderFixed = '';
|
|
20370
20420
|
});
|
|
20371
20421
|
} else {
|
|
20372
20422
|
if (!isMaxFixedColumn || column.renderFixed) {
|
|
20423
|
+
targetFixed = colFixed;
|
|
20373
20424
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
|
|
20374
20425
|
col.renderFixed = colFixed;
|
|
20375
20426
|
});
|
|
20376
20427
|
}
|
|
20377
20428
|
}
|
|
20378
20429
|
}
|
|
20430
|
+
if (!targetFixed !== null) {
|
|
20431
|
+
$xeTable.dispatchEvent('custom-fixed-change', {
|
|
20432
|
+
column,
|
|
20433
|
+
fixed: targetFixed
|
|
20434
|
+
}, evnt);
|
|
20435
|
+
}
|
|
20379
20436
|
},
|
|
20380
|
-
allOptionEvent() {
|
|
20381
|
-
const $
|
|
20437
|
+
allOptionEvent(evnt) {
|
|
20438
|
+
const $xeTableCustomPanel = this;
|
|
20439
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20440
|
+
const tableReactData = $xeTable;
|
|
20441
|
+
const {
|
|
20442
|
+
customStore
|
|
20443
|
+
} = tableReactData;
|
|
20444
|
+
const isAll = !customStore.isAll;
|
|
20382
20445
|
$xeTable.toggleCustomAllCheckbox();
|
|
20446
|
+
$xeTable.dispatchEvent('custom-visible-all', {
|
|
20447
|
+
checked: isAll
|
|
20448
|
+
}, evnt);
|
|
20449
|
+
},
|
|
20450
|
+
updateColDropTipContent() {
|
|
20451
|
+
const $xeTableCustomPanel = this;
|
|
20452
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20453
|
+
const customPanelReactData = $xeTableCustomPanel.reactData;
|
|
20454
|
+
const {
|
|
20455
|
+
dragCol
|
|
20456
|
+
} = customPanelReactData;
|
|
20457
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
20458
|
+
const {
|
|
20459
|
+
tooltipMethod
|
|
20460
|
+
} = columnDragOpts;
|
|
20461
|
+
let tipContent = '';
|
|
20462
|
+
if (tooltipMethod) {
|
|
20463
|
+
const dtParams = {
|
|
20464
|
+
$table: $xeTable,
|
|
20465
|
+
column: dragCol
|
|
20466
|
+
};
|
|
20467
|
+
tipContent = `${tooltipMethod(dtParams) || ''}`;
|
|
20468
|
+
} else {
|
|
20469
|
+
tipContent = panel_getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']);
|
|
20470
|
+
}
|
|
20471
|
+
customPanelReactData.dragTipText = tipContent;
|
|
20383
20472
|
},
|
|
20384
20473
|
sortMousedownEvent(evnt) {
|
|
20385
|
-
const $
|
|
20474
|
+
const $xeTableCustomPanel = this;
|
|
20475
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20476
|
+
const customPanelReactData = $xeTableCustomPanel.reactData;
|
|
20386
20477
|
const btnEl = evnt.currentTarget;
|
|
20387
20478
|
const cellEl = btnEl.parentElement;
|
|
20388
20479
|
const tdEl = cellEl.parentElement;
|
|
@@ -20390,44 +20481,48 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20390
20481
|
const colid = trEl.getAttribute('colid');
|
|
20391
20482
|
const column = $xeTable.getColumnById(colid);
|
|
20392
20483
|
trEl.draggable = true;
|
|
20393
|
-
|
|
20484
|
+
customPanelReactData.dragCol = column;
|
|
20485
|
+
this.updateColDropTipContent();
|
|
20394
20486
|
addClass(trEl, 'active--drag-origin');
|
|
20395
20487
|
},
|
|
20396
20488
|
sortMouseupEvent(evnt) {
|
|
20489
|
+
const $xeTableCustomPanel = this;
|
|
20490
|
+
const customPanelReactData = $xeTableCustomPanel.reactData;
|
|
20397
20491
|
const btnEl = evnt.currentTarget;
|
|
20398
20492
|
const cellEl = btnEl.parentElement;
|
|
20399
20493
|
const tdEl = cellEl.parentElement;
|
|
20400
20494
|
const trEl = tdEl.parentElement;
|
|
20401
|
-
panel_hideDropTip(
|
|
20495
|
+
panel_hideDropTip($xeTableCustomPanel);
|
|
20402
20496
|
trEl.draggable = false;
|
|
20403
|
-
|
|
20497
|
+
customPanelReactData.dragCol = null;
|
|
20404
20498
|
removeClass(trEl, 'active--drag-origin');
|
|
20405
20499
|
},
|
|
20406
20500
|
sortDragstartEvent(evnt) {
|
|
20501
|
+
const $xeTableCustomPanel = this;
|
|
20502
|
+
const customPanelReactData = $xeTableCustomPanel.reactData;
|
|
20407
20503
|
if (evnt.dataTransfer) {
|
|
20408
20504
|
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
|
|
20409
20505
|
}
|
|
20506
|
+
customPanelReactData.dragGroup = null;
|
|
20507
|
+
customPanelReactData.dragValues = null;
|
|
20410
20508
|
},
|
|
20411
20509
|
sortDragendEvent(evnt) {
|
|
20412
|
-
const $
|
|
20510
|
+
const $xeTableCustomPanel = this;
|
|
20511
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20413
20512
|
const tableProps = $xeTable;
|
|
20414
|
-
const
|
|
20415
|
-
const
|
|
20416
|
-
const
|
|
20417
|
-
|
|
20418
|
-
prevDragPos,
|
|
20419
|
-
prevDragCol,
|
|
20420
|
-
prevDragToChild
|
|
20421
|
-
} = this;
|
|
20513
|
+
const tableReactData = $xeTable;
|
|
20514
|
+
const tableInternalData = $xeTable;
|
|
20515
|
+
const customPanelReactData = $xeTableCustomPanel.reactData;
|
|
20516
|
+
const customPanelInternalData = $xeTableCustomPanel.internalData;
|
|
20422
20517
|
const {
|
|
20423
20518
|
mouseConfig
|
|
20424
20519
|
} = tableProps;
|
|
20425
20520
|
const {
|
|
20426
20521
|
customColumnList
|
|
20427
|
-
} =
|
|
20522
|
+
} = tableReactData;
|
|
20428
20523
|
const {
|
|
20429
20524
|
collectColumn
|
|
20430
|
-
} =
|
|
20525
|
+
} = tableInternalData;
|
|
20431
20526
|
const customOpts = $xeTable.computeCustomOpts;
|
|
20432
20527
|
const {
|
|
20433
20528
|
immediate
|
|
@@ -20440,8 +20535,22 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20440
20535
|
isToChildDrag,
|
|
20441
20536
|
dragEndMethod
|
|
20442
20537
|
} = columnDragOpts;
|
|
20538
|
+
const {
|
|
20539
|
+
dragCol,
|
|
20540
|
+
dragGroup,
|
|
20541
|
+
dragValues
|
|
20542
|
+
} = customPanelReactData;
|
|
20543
|
+
const {
|
|
20544
|
+
prevDragCol,
|
|
20545
|
+
prevDragPos,
|
|
20546
|
+
prevDragToChild
|
|
20547
|
+
} = customPanelInternalData;
|
|
20443
20548
|
const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
|
|
20444
|
-
if (
|
|
20549
|
+
if (dragGroup || dragValues) {
|
|
20550
|
+
if ($xeTable.handlePivotTableAggregatePanelDragendEvent) {
|
|
20551
|
+
$xeTable.handlePivotTableAggregatePanelDragendEvent(evnt);
|
|
20552
|
+
}
|
|
20553
|
+
} else if (prevDragCol && dragCol) {
|
|
20445
20554
|
// 判断是否有拖动
|
|
20446
20555
|
if (prevDragCol !== dragCol) {
|
|
20447
20556
|
const dragColumn = dragCol;
|
|
@@ -20567,7 +20676,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20567
20676
|
nafIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(customColumnList, item => item.id === newColumn.id);
|
|
20568
20677
|
customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
|
|
20569
20678
|
}
|
|
20570
|
-
|
|
20679
|
+
tableReactData.isDragColMove = true;
|
|
20571
20680
|
if (mouseConfig) {
|
|
20572
20681
|
if ($xeTable.clearSelected) {
|
|
20573
20682
|
$xeTable.clearSelected();
|
|
@@ -20589,24 +20698,29 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20589
20698
|
}
|
|
20590
20699
|
}, evnt);
|
|
20591
20700
|
if (immediate) {
|
|
20592
|
-
|
|
20701
|
+
tableReactData.customColumnList = collectColumn.slice(0);
|
|
20593
20702
|
$xeTable.handleColDragSwapColumn();
|
|
20594
20703
|
}
|
|
20595
20704
|
}).catch(() => {});
|
|
20596
20705
|
}
|
|
20597
20706
|
}
|
|
20598
|
-
panel_hideDropTip(
|
|
20599
|
-
|
|
20707
|
+
panel_hideDropTip($xeTableCustomPanel);
|
|
20708
|
+
customPanelReactData.dragCol = null;
|
|
20709
|
+
customPanelReactData.dragGroup = null;
|
|
20710
|
+
customPanelReactData.dragValues = null;
|
|
20600
20711
|
trEl.draggable = false;
|
|
20601
20712
|
trEl.removeAttribute('drag-pos');
|
|
20602
20713
|
removeClass(trEl, 'active--drag-target');
|
|
20603
20714
|
removeClass(trEl, 'active--drag-origin');
|
|
20604
20715
|
},
|
|
20605
20716
|
sortDragoverEvent(evnt) {
|
|
20606
|
-
const $
|
|
20717
|
+
const $xeTableCustomPanel = this;
|
|
20718
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
20719
|
+
const customPanelReactData = $xeTableCustomPanel.reactData;
|
|
20720
|
+
const customPanelInternalData = $xeTableCustomPanel.internalData;
|
|
20607
20721
|
const {
|
|
20608
20722
|
dragCol
|
|
20609
|
-
} =
|
|
20723
|
+
} = customPanelReactData;
|
|
20610
20724
|
const customOpts = $xeTable.computeCustomOpts;
|
|
20611
20725
|
const {
|
|
20612
20726
|
immediate
|
|
@@ -20620,19 +20734,21 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
20620
20734
|
const isControlKey = hasControlKey(evnt);
|
|
20621
20735
|
const colid = optEl.getAttribute('colid');
|
|
20622
20736
|
const column = $xeTable.getColumnById(colid);
|
|
20737
|
+
customPanelReactData.dragGroup = null;
|
|
20738
|
+
customPanelReactData.dragValues = null;
|
|
20623
20739
|
// 是否移入有效列
|
|
20624
20740
|
if (column && (isCrossDrag || column.level === 1)) {
|
|
20625
20741
|
evnt.preventDefault();
|
|
20626
20742
|
const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
|
|
20627
20743
|
const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom';
|
|
20628
20744
|
if (dragCol && dragCol.id === column.id || !isCrossDrag && column.level > 1 || !immediate && column.level > 1 || column.renderFixed) {
|
|
20629
|
-
panel_showDropTip(
|
|
20745
|
+
panel_showDropTip($xeTableCustomPanel, evnt, optEl, false, dragPos);
|
|
20630
20746
|
return;
|
|
20631
20747
|
}
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
panel_showDropTip(
|
|
20748
|
+
customPanelInternalData.prevDragToChild = !!(isCrossDrag && isToChildDrag && isControlKey && immediate);
|
|
20749
|
+
customPanelInternalData.prevDragCol = column;
|
|
20750
|
+
customPanelInternalData.prevDragPos = dragPos;
|
|
20751
|
+
panel_showDropTip($xeTableCustomPanel, evnt, optEl, true, dragPos);
|
|
20636
20752
|
}
|
|
20637
20753
|
}
|
|
20638
20754
|
}
|
|
@@ -23496,27 +23612,63 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
|
|
|
23496
23612
|
},
|
|
23497
23613
|
_getActiveRecord() {
|
|
23498
23614
|
const $xeTable = this;
|
|
23499
|
-
|
|
23500
|
-
|
|
23501
|
-
|
|
23615
|
+
const reactData = $xeTable;
|
|
23616
|
+
const internalData = $xeTable;
|
|
23617
|
+
warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditCell']);
|
|
23618
|
+
const {
|
|
23619
|
+
editStore
|
|
23620
|
+
} = reactData;
|
|
23621
|
+
const {
|
|
23622
|
+
fullAllDataRowIdData
|
|
23623
|
+
} = internalData;
|
|
23624
|
+
const {
|
|
23625
|
+
args,
|
|
23626
|
+
row
|
|
23627
|
+
} = editStore.actived;
|
|
23628
|
+
if (args && row && fullAllDataRowIdData[getRowid($xeTable, row)]) {
|
|
23629
|
+
return Object.assign({}, args, {
|
|
23630
|
+
row
|
|
23631
|
+
});
|
|
23632
|
+
}
|
|
23633
|
+
return null;
|
|
23502
23634
|
},
|
|
23503
23635
|
_getEditRecord() {
|
|
23504
23636
|
const $xeTable = this;
|
|
23505
23637
|
const reactData = $xeTable;
|
|
23506
23638
|
const internalData = $xeTable;
|
|
23639
|
+
warnLog('vxe.error.delFunc', ['getEditRecord', 'getEditCell']);
|
|
23507
23640
|
const {
|
|
23508
23641
|
editStore
|
|
23509
23642
|
} = reactData;
|
|
23510
23643
|
const {
|
|
23511
|
-
|
|
23644
|
+
fullAllDataRowIdData
|
|
23512
23645
|
} = internalData;
|
|
23513
|
-
const el = $xeTable.$refs.refElem;
|
|
23514
23646
|
const {
|
|
23515
23647
|
args,
|
|
23516
23648
|
row
|
|
23517
23649
|
} = editStore.actived;
|
|
23518
|
-
if (args && $xeTable
|
|
23519
|
-
return Object.assign({}, args
|
|
23650
|
+
if (args && row && fullAllDataRowIdData[getRowid($xeTable, row)]) {
|
|
23651
|
+
return Object.assign({}, args, {
|
|
23652
|
+
row
|
|
23653
|
+
});
|
|
23654
|
+
}
|
|
23655
|
+
return null;
|
|
23656
|
+
},
|
|
23657
|
+
_getEditCell() {
|
|
23658
|
+
const $xeTable = this;
|
|
23659
|
+
const reactData = $xeTable;
|
|
23660
|
+
const {
|
|
23661
|
+
editStore
|
|
23662
|
+
} = reactData;
|
|
23663
|
+
const {
|
|
23664
|
+
row,
|
|
23665
|
+
column
|
|
23666
|
+
} = editStore.actived;
|
|
23667
|
+
if (column && row) {
|
|
23668
|
+
return {
|
|
23669
|
+
row,
|
|
23670
|
+
column
|
|
23671
|
+
};
|
|
23520
23672
|
}
|
|
23521
23673
|
return null;
|
|
23522
23674
|
},
|
|
@@ -23721,11 +23873,14 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
|
|
|
23721
23873
|
editStore
|
|
23722
23874
|
} = reactData;
|
|
23723
23875
|
const {
|
|
23724
|
-
|
|
23876
|
+
row,
|
|
23725
23877
|
column
|
|
23726
23878
|
} = editStore.selected;
|
|
23727
|
-
if (
|
|
23728
|
-
return
|
|
23879
|
+
if (row && column) {
|
|
23880
|
+
return {
|
|
23881
|
+
row,
|
|
23882
|
+
column
|
|
23883
|
+
};
|
|
23729
23884
|
}
|
|
23730
23885
|
return null;
|
|
23731
23886
|
},
|
|
@@ -23864,11 +24019,20 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
23864
24019
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
23865
24020
|
// 如果是树表格只允许导出数据源
|
|
23866
24021
|
const rest = [];
|
|
23867
|
-
const expandMaps =
|
|
24022
|
+
const expandMaps = {};
|
|
24023
|
+
const useMaps = {};
|
|
24024
|
+
const {
|
|
24025
|
+
handleGetRowId
|
|
24026
|
+
} = createHandleGetRowId($xeTable);
|
|
23868
24027
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(datas, (item, $rowIndex, items, path, parent, nodes) => {
|
|
23869
24028
|
const row = item._row || item;
|
|
24029
|
+
const rowid = handleGetRowId(row);
|
|
24030
|
+
if (useMaps[rowid]) {
|
|
24031
|
+
return;
|
|
24032
|
+
}
|
|
23870
24033
|
const parentRow = parent && parent._row ? parent._row : parent;
|
|
23871
|
-
|
|
24034
|
+
const pRowid = parentRow ? handleGetRowId(parentRow) : '';
|
|
24035
|
+
if (isAllExpand || !parentRow || expandMaps[pRowid] && $xeTable.isTreeExpandByRow(parentRow)) {
|
|
23872
24036
|
const hasRowChild = hasTreeChildren($xeTable, row);
|
|
23873
24037
|
const item = {
|
|
23874
24038
|
_row: row,
|
|
@@ -23939,7 +24103,10 @@ function getBodyLabelData($xeTable, opts, columns, datas) {
|
|
|
23939
24103
|
}
|
|
23940
24104
|
item[column.id] = toStringValue(cellValue);
|
|
23941
24105
|
});
|
|
23942
|
-
|
|
24106
|
+
useMaps[rowid] = true;
|
|
24107
|
+
if (pRowid) {
|
|
24108
|
+
expandMaps[pRowid] = true;
|
|
24109
|
+
}
|
|
23943
24110
|
rest.push(Object.assign(item, row));
|
|
23944
24111
|
}
|
|
23945
24112
|
}, {
|
|
@@ -25092,6 +25259,7 @@ const convertToRows = originColumns => {
|
|
|
25092
25259
|
const {
|
|
25093
25260
|
tableFullColumn,
|
|
25094
25261
|
afterFullData,
|
|
25262
|
+
afterTreeFullData,
|
|
25095
25263
|
collectColumn,
|
|
25096
25264
|
mergeBodyList,
|
|
25097
25265
|
mergeFooterList
|
|
@@ -25367,8 +25535,10 @@ const convertToRows = originColumns => {
|
|
|
25367
25535
|
}
|
|
25368
25536
|
}
|
|
25369
25537
|
} else if (mode === 'current') {
|
|
25370
|
-
handleOptions.data = afterFullData;
|
|
25538
|
+
handleOptions.data = treeConfig ? afterTreeFullData : afterFullData;
|
|
25371
25539
|
}
|
|
25540
|
+
} else {
|
|
25541
|
+
handleOptions._isCustomData = true;
|
|
25372
25542
|
}
|
|
25373
25543
|
return handleExport($xeTable, handleOptions);
|
|
25374
25544
|
},
|
|
@@ -26951,6 +27121,17 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
26951
27121
|
}
|
|
26952
27122
|
return $xeTable.$nextTick();
|
|
26953
27123
|
},
|
|
27124
|
+
_toggleCustom() {
|
|
27125
|
+
const $xeTable = this;
|
|
27126
|
+
const reactData = $xeTable;
|
|
27127
|
+
const {
|
|
27128
|
+
customStore
|
|
27129
|
+
} = reactData;
|
|
27130
|
+
if (customStore.visible) {
|
|
27131
|
+
return $xeTable.closeCustom();
|
|
27132
|
+
}
|
|
27133
|
+
return $xeTable.openCustom();
|
|
27134
|
+
},
|
|
26954
27135
|
_saveCustom() {
|
|
26955
27136
|
const $xeTable = this;
|
|
26956
27137
|
const reactData = $xeTable;
|