vxe-table 3.11.27-beta.0 → 3.11.27
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +1 -1
- package/es/locale/lang/de-DE.js +1 -1
- package/es/locale/lang/en-US.js +1 -1
- package/es/locale/lang/es-ES.js +1 -1
- package/es/locale/lang/fr-FR.js +1 -1
- package/es/locale/lang/hu-HU.js +1 -1
- package/es/locale/lang/hy-AM.js +1 -1
- package/es/locale/lang/ja-JP.js +1 -1
- package/es/locale/lang/ko-KR.js +1 -1
- package/es/locale/lang/nb-NO.js +1 -1
- package/es/locale/lang/pt-BR.js +1 -1
- package/es/locale/lang/ru-RU.js +1 -1
- package/es/locale/lang/ug-CN.js +1 -1
- package/es/locale/lang/uk-UA.js +1 -1
- package/es/locale/lang/vi-VN.js +1 -1
- package/es/locale/lang/zh-CHT.js +1 -1
- package/es/locale/lang/zh-CN.js +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +2 -0
- package/es/table/module/custom/panel.js +436 -231
- package/es/table/src/body.js +1 -1
- package/es/table/src/methods.js +1 -4
- package/es/table/src/table.js +4 -1
- package/es/table/style.css +110 -40
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +1 -0
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +110 -40
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +381 -165
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +1 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +1 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +1 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -1
- package/lib/locale/lang/es-ES.js +1 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -1
- package/lib/locale/lang/fr-FR.js +1 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +1 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -1
- package/lib/locale/lang/hy-AM.js +1 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +1 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -1
- package/lib/locale/lang/ko-KR.js +1 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -1
- package/lib/locale/lang/nb-NO.js +1 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +1 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -1
- package/lib/locale/lang/ru-RU.js +1 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +1 -1
- package/lib/locale/lang/ug-CN.js +1 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +1 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -1
- package/lib/locale/lang/vi-VN.js +1 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +1 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +1 -1
- package/lib/locale/lang/zh-CN.js +1 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +2 -0
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +369 -156
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/body.js +1 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +2 -5
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +4 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +110 -40
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +2 -0
- package/lib/ui/src/dom.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 +110 -40
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +1 -1
- package/packages/locale/lang/de-DE.ts +1 -1
- package/packages/locale/lang/en-US.ts +1 -1
- package/packages/locale/lang/es-ES.ts +1 -1
- package/packages/locale/lang/fr-FR.ts +1 -1
- package/packages/locale/lang/hu-HU.ts +1 -1
- package/packages/locale/lang/hy-AM.ts +1 -1
- package/packages/locale/lang/ja-JP.ts +1 -1
- package/packages/locale/lang/ko-KR.ts +1 -1
- package/packages/locale/lang/nb-NO.ts +1 -1
- package/packages/locale/lang/pt-BR.ts +1 -1
- package/packages/locale/lang/ru-RU.ts +1 -1
- package/packages/locale/lang/ug-CN.ts +1 -1
- package/packages/locale/lang/uk-UA.ts +1 -1
- package/packages/locale/lang/vi-VN.ts +1 -1
- package/packages/locale/lang/zh-CHT.ts +1 -1
- package/packages/locale/lang/zh-CN.ts +1 -1
- package/packages/table/module/custom/mixin.ts +2 -0
- package/packages/table/module/custom/panel.ts +463 -234
- package/packages/table/src/body.ts +1 -1
- package/packages/table/src/methods.ts +1 -5
- package/packages/table/src/table.ts +4 -1
- package/packages/ui/src/dom.ts +2 -0
- package/styles/components/table-module/custom.scss +95 -13
- package/styles/components/table.scss +6 -2
- /package/es/{iconfont.1733931178504.ttf → iconfont.1734055169729.ttf} +0 -0
- /package/es/{iconfont.1733931178504.woff → iconfont.1734055169729.woff} +0 -0
- /package/es/{iconfont.1733931178504.woff2 → iconfont.1734055169729.woff2} +0 -0
- /package/lib/{iconfont.1733931178504.ttf → iconfont.1734055169729.ttf} +0 -0
- /package/lib/{iconfont.1733931178504.woff → iconfont.1734055169729.woff} +0 -0
- /package/lib/{iconfont.1733931178504.woff2 → iconfont.1734055169729.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
|
|
|
2220
2220
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2221
2221
|
|
|
2222
2222
|
|
|
2223
|
-
const version = "3.11.27
|
|
2223
|
+
const version = "3.11.27";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2627,6 +2627,7 @@ var es_array_push = __webpack_require__(4114);
|
|
|
2627
2627
|
|
|
2628
2628
|
const reClsMap = {};
|
|
2629
2629
|
const browse = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
|
|
2630
|
+
const tpImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
|
|
2630
2631
|
function getPropClass(property, params) {
|
|
2631
2632
|
return property ? XEUtils.isFunction(property) ? property(params) : property : '';
|
|
2632
2633
|
}
|
|
@@ -2789,7 +2790,7 @@ function isNodeElement(elem) {
|
|
|
2789
2790
|
const {
|
|
2790
2791
|
log: log_log
|
|
2791
2792
|
} = core_.VxeUI;
|
|
2792
|
-
const log_version = `table v${"3.11.27
|
|
2793
|
+
const log_version = `table v${"3.11.27"}`;
|
|
2793
2794
|
const warnLog = log_log.create('warn', log_version);
|
|
2794
2795
|
const errLog = log_log.create('error', log_version);
|
|
2795
2796
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -4909,7 +4910,6 @@ const {
|
|
|
4909
4910
|
// const isWebkit = browse['-webkit'] && !browse.edge
|
|
4910
4911
|
// const debounceScrollYDuration = browse.msie ? 80 : 20
|
|
4911
4912
|
const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
4912
|
-
const tpImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
|
|
4913
4913
|
// 获取所有的列,排除分组
|
|
4914
4914
|
const getColumnList = columns => {
|
|
4915
4915
|
const result = [];
|
|
@@ -11173,7 +11173,6 @@ const Methods = {
|
|
|
11173
11173
|
const $xeTable = this;
|
|
11174
11174
|
const props = $xeTable;
|
|
11175
11175
|
const reactData = $xeTable;
|
|
11176
|
-
evnt.stopPropagation();
|
|
11177
11176
|
const {
|
|
11178
11177
|
dragConfig
|
|
11179
11178
|
} = props;
|
|
@@ -11445,7 +11444,6 @@ const Methods = {
|
|
|
11445
11444
|
handleHeaderCellDragMousedownEvent(evnt, params) {
|
|
11446
11445
|
const $xeTable = this;
|
|
11447
11446
|
const reactData = $xeTable;
|
|
11448
|
-
evnt.stopPropagation();
|
|
11449
11447
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
11450
11448
|
const {
|
|
11451
11449
|
dragStartMethod
|
|
@@ -14041,7 +14039,7 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
14041
14039
|
rowid
|
|
14042
14040
|
},
|
|
14043
14041
|
style: rowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
|
|
14044
|
-
key: rowKey || rowOpts.useKey || rowOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
14042
|
+
key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || treeConfig ? rowid : $rowIndex,
|
|
14045
14043
|
on: trOn
|
|
14046
14044
|
}, tdVNs));
|
|
14047
14045
|
// 如果行被展开了
|
|
@@ -15645,23 +15643,73 @@ const {
|
|
|
15645
15643
|
getIcon: panel_getIcon,
|
|
15646
15644
|
renderEmptyElement: panel_renderEmptyElement
|
|
15647
15645
|
} = core_.VxeUI;
|
|
15648
|
-
function
|
|
15646
|
+
function panel_showDropTip(_vm, evnt, optEl, showLine, dragPos) {
|
|
15649
15647
|
const {
|
|
15650
|
-
|
|
15648
|
+
prevDragToChild
|
|
15651
15649
|
} = _vm;
|
|
15652
|
-
const
|
|
15653
|
-
|
|
15654
|
-
if (!bodyEl) {
|
|
15650
|
+
const el = _vm.$refs.bodyElemRef;
|
|
15651
|
+
if (!el) {
|
|
15655
15652
|
return;
|
|
15656
15653
|
}
|
|
15657
|
-
|
|
15658
|
-
|
|
15659
|
-
const
|
|
15660
|
-
|
|
15661
|
-
|
|
15662
|
-
|
|
15654
|
+
const wrapperRect = el.getBoundingClientRect();
|
|
15655
|
+
if (optEl) {
|
|
15656
|
+
const dragLineEl = _vm.$refs.refDragLineElem;
|
|
15657
|
+
if (dragLineEl) {
|
|
15658
|
+
if (showLine) {
|
|
15659
|
+
const optRect = optEl.getBoundingClientRect();
|
|
15660
|
+
dragLineEl.style.display = 'block';
|
|
15661
|
+
dragLineEl.style.top = `${Math.max(1, optRect.y - wrapperRect.y)}px`;
|
|
15662
|
+
dragLineEl.style.height = `${optRect.height}px`;
|
|
15663
|
+
dragLineEl.style.width = `${optRect.width}px`;
|
|
15664
|
+
dragLineEl.setAttribute('drag-pos', dragPos);
|
|
15665
|
+
dragLineEl.setAttribute('drag-to-child', prevDragToChild ? 'y' : 'n');
|
|
15666
|
+
} else {
|
|
15667
|
+
dragLineEl.style.display = '';
|
|
15668
|
+
}
|
|
15669
|
+
}
|
|
15670
|
+
}
|
|
15671
|
+
const dragTipEl = _vm.$refs.refDragTipElem;
|
|
15672
|
+
if (dragTipEl) {
|
|
15673
|
+
dragTipEl.style.display = 'block';
|
|
15674
|
+
dragTipEl.style.top = `${Math.min(el.clientHeight - el.scrollTop - dragTipEl.clientHeight, evnt.clientY - wrapperRect.y)}px`;
|
|
15675
|
+
dragTipEl.style.left = `${Math.min(el.clientWidth - el.scrollLeft - dragTipEl.clientWidth - 16, evnt.clientX - wrapperRect.x)}px`;
|
|
15676
|
+
dragTipEl.setAttribute('drag-status', showLine ? prevDragToChild ? 'sub' : 'normal' : 'disabled');
|
|
15677
|
+
}
|
|
15678
|
+
}
|
|
15679
|
+
function panel_hideDropTip(_vm) {
|
|
15680
|
+
const dragTipEl = _vm.$refs.refDragTipElem;
|
|
15681
|
+
const dragLineEl = _vm.$refs.refDragLineElem;
|
|
15682
|
+
if (dragTipEl) {
|
|
15683
|
+
dragTipEl.style.display = '';
|
|
15684
|
+
}
|
|
15685
|
+
if (dragLineEl) {
|
|
15686
|
+
dragLineEl.style.display = '';
|
|
15663
15687
|
}
|
|
15664
15688
|
}
|
|
15689
|
+
const renderDragTip = (h, _vm) => {
|
|
15690
|
+
const {
|
|
15691
|
+
dragCol
|
|
15692
|
+
} = _vm;
|
|
15693
|
+
return h('div', {}, [h('div', {
|
|
15694
|
+
ref: 'refDragLineElem',
|
|
15695
|
+
class: 'vxe-table-custom-popup--drag-line'
|
|
15696
|
+
}), h('div', {
|
|
15697
|
+
ref: 'refDragTipElem',
|
|
15698
|
+
class: 'vxe-table-custom-popup--drag-tip'
|
|
15699
|
+
}, [h('div', {
|
|
15700
|
+
class: 'vxe-table-custom-popup--drag-tip-wrapper'
|
|
15701
|
+
}, [h('div', {
|
|
15702
|
+
class: 'vxe-table-custom-popup--drag-tip-status'
|
|
15703
|
+
}, [h('span', {
|
|
15704
|
+
class: ['vxe-table-custom-popup--drag-tip-normal-status', panel_getIcon().TABLE_DRAG_STATUS_ROW]
|
|
15705
|
+
}), h('span', {
|
|
15706
|
+
class: ['vxe-table-custom-popup--drag-tip-sub-status', panel_getIcon().TABLE_DRAG_STATUS_SUB_ROW]
|
|
15707
|
+
}), h('span', {
|
|
15708
|
+
class: ['vxe-table-custom-popup--drag-tip-disabled-status', panel_getIcon().TABLE_DRAG_DISABLED]
|
|
15709
|
+
})]), h('div', {
|
|
15710
|
+
class: 'vxe-table--drag-tip-content'
|
|
15711
|
+
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : '']))])])]);
|
|
15712
|
+
};
|
|
15665
15713
|
const renderSimplePanel = (h, _vm) => {
|
|
15666
15714
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
15667
15715
|
const props = _vm;
|
|
@@ -15675,6 +15723,10 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15675
15723
|
customColumnList
|
|
15676
15724
|
} = reactData;
|
|
15677
15725
|
const customOpts = $xeTable.computeCustomOpts;
|
|
15726
|
+
const {
|
|
15727
|
+
immediate
|
|
15728
|
+
} = customOpts;
|
|
15729
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
15678
15730
|
const {
|
|
15679
15731
|
maxHeight
|
|
15680
15732
|
} = customStore;
|
|
@@ -15688,6 +15740,9 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15688
15740
|
placement
|
|
15689
15741
|
} = customOpts;
|
|
15690
15742
|
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
15743
|
+
const {
|
|
15744
|
+
isCrossDrag
|
|
15745
|
+
} = columnDragOpts;
|
|
15691
15746
|
const slots = customOpts.slots || {};
|
|
15692
15747
|
const headerSlot = slots.header;
|
|
15693
15748
|
const topSlot = slots.top;
|
|
@@ -15698,7 +15753,6 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15698
15753
|
const customWrapperOns = {};
|
|
15699
15754
|
const isAllChecked = customStore.isAll;
|
|
15700
15755
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
15701
|
-
const dragColumn = _vm.dragColumn;
|
|
15702
15756
|
// hover 触发
|
|
15703
15757
|
if (trigger === 'hover') {
|
|
15704
15758
|
customWrapperOns.mouseenter = _vm.handleWrapperMouseenterEvent;
|
|
@@ -15757,16 +15811,18 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15757
15811
|
}
|
|
15758
15812
|
}, [h('span', {
|
|
15759
15813
|
class: ['vxe-checkbox--icon', isIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
15760
|
-
})]) : panel_renderEmptyElement($xeTable),
|
|
15814
|
+
})]) : panel_renderEmptyElement($xeTable), h('div', {
|
|
15815
|
+
class: 'vxe-table-custom--name-option'
|
|
15816
|
+
}, [allowSort && ((isCrossDrag ? immediate : false) || column.level === 1) ? h('div', {
|
|
15761
15817
|
class: 'vxe-table-custom--sort-option'
|
|
15762
15818
|
}, [h('span', {
|
|
15763
15819
|
class: ['vxe-table-custom--sort-btn', {
|
|
15764
|
-
'is--disabled': isDisabled || isHidden
|
|
15820
|
+
'is--disabled': isDisabled || isHidden || column.renderFixed
|
|
15765
15821
|
}],
|
|
15766
15822
|
attrs: {
|
|
15767
15823
|
title: panel_getI18n('vxe.custom.setting.sortHelpTip')
|
|
15768
15824
|
},
|
|
15769
|
-
on: isDisabled || isHidden ? {} : {
|
|
15825
|
+
on: isDisabled || isHidden || column.renderFixed ? {} : {
|
|
15770
15826
|
mousedown: _vm.sortMousedownEvent,
|
|
15771
15827
|
mouseup: _vm.sortMouseupEvent
|
|
15772
15828
|
}
|
|
@@ -15784,7 +15840,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15784
15840
|
attrs: {
|
|
15785
15841
|
title: colTitle
|
|
15786
15842
|
}
|
|
15787
|
-
}, colTitle), !parent && allowFixed ? h('div', {
|
|
15843
|
+
}, colTitle)]), !parent && allowFixed ? h('div', {
|
|
15788
15844
|
class: 'vxe-table-custom--fixed-option'
|
|
15789
15845
|
}, [h(VxeUIButtonComponent, {
|
|
15790
15846
|
props: {
|
|
@@ -15862,10 +15918,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15862
15918
|
on: customWrapperOns
|
|
15863
15919
|
}, colVNs), bottomSlot ? h('div', {
|
|
15864
15920
|
class: 'vxe-table-custom--panel-bottom'
|
|
15865
|
-
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
15866
|
-
ref: 'dragHintElemRef',
|
|
15867
|
-
class: 'vxe-table-custom-popup--drag-hint'
|
|
15868
|
-
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragColumn && dragColumn.type !== 'html' ? dragColumn.getTitle() : '']))]), customOpts.showFooter ? h('div', {
|
|
15921
|
+
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), renderDragTip(h, _vm)]), customOpts.showFooter ? h('div', {
|
|
15869
15922
|
class: 'vxe-table-custom--footer'
|
|
15870
15923
|
}, footerSlot ? $xeTable.callSlot(footerSlot, params, h) : [h('div', {
|
|
15871
15924
|
class: 'vxe-table-custom--footer-buttons'
|
|
@@ -15878,7 +15931,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15878
15931
|
on: {
|
|
15879
15932
|
click: _vm.resetCustomEvent
|
|
15880
15933
|
}
|
|
15881
|
-
}),
|
|
15934
|
+
}), immediate ? h(VxeUIButtonComponent, {
|
|
15882
15935
|
props: {
|
|
15883
15936
|
mode: 'text',
|
|
15884
15937
|
content: customOpts.closeButtonText || panel_getI18n('vxe.table.customClose')
|
|
@@ -15894,7 +15947,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15894
15947
|
on: {
|
|
15895
15948
|
click: _vm.cancelCustomEvent
|
|
15896
15949
|
}
|
|
15897
|
-
}),
|
|
15950
|
+
}), immediate ? panel_renderEmptyElement($xeTable) : h(VxeUIButtonComponent, {
|
|
15898
15951
|
props: {
|
|
15899
15952
|
mode: 'text',
|
|
15900
15953
|
status: 'primary',
|
|
@@ -15910,7 +15963,6 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15910
15963
|
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
15911
15964
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
15912
15965
|
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeInput');
|
|
15913
|
-
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
15914
15966
|
const $xeTableCustomPanel = _vm;
|
|
15915
15967
|
const props = _vm;
|
|
15916
15968
|
const $xeTable = _vm.$xeTable;
|
|
@@ -15927,6 +15979,10 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15927
15979
|
customColumnList
|
|
15928
15980
|
} = reactData;
|
|
15929
15981
|
const customOpts = $xeTable.computeCustomOpts;
|
|
15982
|
+
const {
|
|
15983
|
+
immediate
|
|
15984
|
+
} = customOpts;
|
|
15985
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
15930
15986
|
const {
|
|
15931
15987
|
mode,
|
|
15932
15988
|
modalOptions,
|
|
@@ -15950,6 +16006,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15950
16006
|
const modalOpts = Object.assign({}, modalOptions);
|
|
15951
16007
|
const drawerOpts = Object.assign({}, drawerOptions);
|
|
15952
16008
|
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
16009
|
+
const {
|
|
16010
|
+
isCrossDrag
|
|
16011
|
+
} = columnDragOpts;
|
|
15953
16012
|
const slots = customOpts.slots || {};
|
|
15954
16013
|
const headerSlot = slots.header;
|
|
15955
16014
|
const topSlot = slots.top;
|
|
@@ -15959,7 +16018,6 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15959
16018
|
const trVNs = [];
|
|
15960
16019
|
const isAllChecked = customStore.isAll;
|
|
15961
16020
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
15962
|
-
const dragColumn = _vm.dragColumn;
|
|
15963
16021
|
const params = {
|
|
15964
16022
|
$table: $xeTable,
|
|
15965
16023
|
$grid: $xeTable.xegrid,
|
|
@@ -16032,40 +16090,43 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16032
16090
|
}
|
|
16033
16091
|
}, [h('span', {
|
|
16034
16092
|
class: ['vxe-checkbox--icon', isIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
16035
|
-
})])]) : panel_renderEmptyElement($xeTable),
|
|
16036
|
-
class: 'vxe-table-custom-popup--column-item col--
|
|
16037
|
-
}, [
|
|
16093
|
+
})])]) : panel_renderEmptyElement($xeTable), h('td', {
|
|
16094
|
+
class: 'vxe-table-custom-popup--column-item col--name'
|
|
16095
|
+
}, [h('div', {
|
|
16096
|
+
class: 'vxe-table-custom-popup--name'
|
|
16097
|
+
}, [allowSort ? (isCrossDrag ? immediate : false) || column.level === 1 ? h('div', {
|
|
16038
16098
|
class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
16039
|
-
'is--disabled': isDisabled || isHidden
|
|
16099
|
+
'is--disabled': isDisabled || isHidden || column.renderFixed
|
|
16040
16100
|
}],
|
|
16041
16101
|
attrs: {
|
|
16042
16102
|
title: panel_getI18n('vxe.custom.setting.sortHelpTip')
|
|
16043
16103
|
},
|
|
16044
|
-
on: isDisabled || isHidden ? {} : {
|
|
16104
|
+
on: isDisabled || isHidden || column.renderFixed ? {} : {
|
|
16045
16105
|
mousedown: _vm.sortMousedownEvent,
|
|
16046
16106
|
mouseup: _vm.sortMouseupEvent
|
|
16047
16107
|
}
|
|
16048
16108
|
}, [h('i', {
|
|
16049
16109
|
class: panel_getIcon().TABLE_CUSTOM_SORT
|
|
16050
|
-
})]) : h('
|
|
16051
|
-
class: 'vxe-table-custom-popup--column-
|
|
16052
|
-
},
|
|
16110
|
+
})]) : h('div', {
|
|
16111
|
+
class: 'vxe-table-custom-popup--column-sort-placeholder'
|
|
16112
|
+
}) : panel_renderEmptyElement($xeTable), column.type === 'html' ? h('div', {
|
|
16053
16113
|
key: '1',
|
|
16054
|
-
class: 'vxe-table-custom-popup--
|
|
16114
|
+
class: 'vxe-table-custom-popup--title',
|
|
16055
16115
|
domProps: {
|
|
16056
16116
|
innerHTML: colTitle
|
|
16057
16117
|
}
|
|
16058
16118
|
}) : h('div', {
|
|
16059
16119
|
key: '0',
|
|
16060
|
-
class: 'vxe-table-custom-popup--
|
|
16120
|
+
class: 'vxe-table-custom-popup--title',
|
|
16061
16121
|
attrs: {
|
|
16062
16122
|
title: colTitle
|
|
16063
16123
|
}
|
|
16064
|
-
}, colTitle)]), allowResizable ? h('td', {
|
|
16124
|
+
}, colTitle)])]), allowResizable ? h('td', {
|
|
16065
16125
|
class: 'vxe-table-custom-popup--column-item col--resizable'
|
|
16066
16126
|
}, [column.children && column.children.length || !(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? h('span', '-') : VxeUINumberInputComponent ? h(VxeUINumberInputComponent, {
|
|
16067
16127
|
props: {
|
|
16068
16128
|
type: 'integer',
|
|
16129
|
+
immediate: false,
|
|
16069
16130
|
disabled: isDisabled || isHidden,
|
|
16070
16131
|
value: column.renderResizeWidth,
|
|
16071
16132
|
min: customMinWidth || undefined,
|
|
@@ -16074,6 +16135,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16074
16135
|
on: {
|
|
16075
16136
|
modelValue(value) {
|
|
16076
16137
|
column.renderResizeWidth = Math.max(0, Number(value));
|
|
16138
|
+
},
|
|
16139
|
+
change() {
|
|
16140
|
+
_vm.changeColumnWidth(column);
|
|
16077
16141
|
}
|
|
16078
16142
|
}
|
|
16079
16143
|
}) : panel_renderEmptyElement($xeTableCustomPanel)]) : panel_renderEmptyElement($xeTable), allowFixed ? h('td', {
|
|
@@ -16100,7 +16164,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16100
16164
|
},
|
|
16101
16165
|
on: {
|
|
16102
16166
|
input(value) {
|
|
16103
|
-
column
|
|
16167
|
+
_vm.changeFixedOption(column, value);
|
|
16104
16168
|
}
|
|
16105
16169
|
}
|
|
16106
16170
|
})]) : panel_renderEmptyElement($xeTable)]));
|
|
@@ -16120,8 +16184,6 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16120
16184
|
class: 'vxe-table-custom-popup--table-wrapper'
|
|
16121
16185
|
}, [h('table', {}, [h('colgroup', {}, [allowVisible ? h('col', {
|
|
16122
16186
|
class: 'vxe-table-custom-popup--table-col-seq'
|
|
16123
|
-
}) : panel_renderEmptyElement($xeTable), allowSort ? h('col', {
|
|
16124
|
-
class: 'vxe-table-custom-popup--table-col-sort'
|
|
16125
16187
|
}) : panel_renderEmptyElement($xeTable), h('col', {
|
|
16126
16188
|
class: 'vxe-table-custom-popup--table-col-title'
|
|
16127
16189
|
}), allowResizable ? h('col', {
|
|
@@ -16143,22 +16205,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16143
16205
|
class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
16144
16206
|
}), h('span', {
|
|
16145
16207
|
class: 'vxe-checkbox--label'
|
|
16146
|
-
}, panel_getI18n('vxe.toolbar.customAll'))])]) : panel_renderEmptyElement($xeTable),
|
|
16147
|
-
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
16148
|
-
}, panel_getI18n('vxe.custom.setting.colSort')), VxeUITooltipComponent ? h(VxeUITooltipComponent, {
|
|
16149
|
-
props: {
|
|
16150
|
-
enterable: true,
|
|
16151
|
-
content: panel_getI18n('vxe.custom.setting.sortHelpTip'),
|
|
16152
|
-
popupClassName: 'vxe-table--ignore-clear'
|
|
16153
|
-
},
|
|
16154
|
-
scopedSlots: {
|
|
16155
|
-
default: () => {
|
|
16156
|
-
return h('i', {
|
|
16157
|
-
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
16158
|
-
});
|
|
16159
|
-
}
|
|
16160
|
-
}
|
|
16161
|
-
}) : panel_renderEmptyElement($xeTableCustomPanel)]) : panel_renderEmptyElement($xeTable), h('th', {}, panel_getI18n('vxe.custom.setting.colTitle')), allowResizable ? h('th', {}, panel_getI18n('vxe.custom.setting.colResizable')) : panel_renderEmptyElement($xeTable), allowFixed ? h('th', {}, panel_getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])) : panel_renderEmptyElement($xeTable)])]), h('transition-group', {
|
|
16208
|
+
}, panel_getI18n('vxe.toolbar.customAll'))])]) : panel_renderEmptyElement($xeTable), h('th', {}, panel_getI18n('vxe.custom.setting.colTitle')), allowResizable ? h('th', {}, panel_getI18n('vxe.custom.setting.colResizable')) : panel_renderEmptyElement($xeTable), allowFixed ? h('th', {}, panel_getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])) : panel_renderEmptyElement($xeTable)])]), h('transition-group', {
|
|
16162
16209
|
class: 'vxe-table-custom--panel-list',
|
|
16163
16210
|
props: {
|
|
16164
16211
|
tag: 'tbody',
|
|
@@ -16166,10 +16213,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16166
16213
|
}
|
|
16167
16214
|
}, trVNs)])]), bottomSlot ? h('div', {
|
|
16168
16215
|
class: 'vxe-table-custom-popup--table-bottom'
|
|
16169
|
-
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), h
|
|
16170
|
-
ref: 'dragHintElemRef',
|
|
16171
|
-
class: 'vxe-table-custom-popup--drag-hint'
|
|
16172
|
-
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragColumn ? dragColumn.getTitle() : '']))]);
|
|
16216
|
+
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), renderDragTip(h, _vm)]);
|
|
16173
16217
|
},
|
|
16174
16218
|
footer: () => {
|
|
16175
16219
|
if (footerSlot) {
|
|
@@ -16185,14 +16229,21 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16185
16229
|
on: {
|
|
16186
16230
|
click: _vm.resetCustomEvent
|
|
16187
16231
|
}
|
|
16188
|
-
}), h(VxeUIButtonComponent, {
|
|
16232
|
+
}), immediate ? h(VxeUIButtonComponent, {
|
|
16233
|
+
props: {
|
|
16234
|
+
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.customClose')
|
|
16235
|
+
},
|
|
16236
|
+
on: {
|
|
16237
|
+
click: _vm.cancelCloseEvent
|
|
16238
|
+
}
|
|
16239
|
+
}) : h(VxeUIButtonComponent, {
|
|
16189
16240
|
props: {
|
|
16190
16241
|
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmCancel')
|
|
16191
16242
|
},
|
|
16192
16243
|
on: {
|
|
16193
16244
|
click: _vm.cancelCustomEvent
|
|
16194
16245
|
}
|
|
16195
|
-
}), h(VxeUIButtonComponent, {
|
|
16246
|
+
}), immediate ? panel_renderEmptyElement($xeTable) : h(VxeUIButtonComponent, {
|
|
16196
16247
|
props: {
|
|
16197
16248
|
status: 'primary',
|
|
16198
16249
|
content: customOpts.confirmButtonText || panel_getI18n('vxe.custom.cstmConfirm')
|
|
@@ -16276,7 +16327,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16276
16327
|
},
|
|
16277
16328
|
data() {
|
|
16278
16329
|
return {
|
|
16279
|
-
|
|
16330
|
+
prevDragCol: undefined,
|
|
16331
|
+
prevDragToChild: false,
|
|
16332
|
+
prevDragPos: null
|
|
16280
16333
|
};
|
|
16281
16334
|
},
|
|
16282
16335
|
computed: {},
|
|
@@ -16286,7 +16339,6 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16286
16339
|
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
16287
16340
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
16288
16341
|
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
|
|
16289
|
-
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
16290
16342
|
const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
|
|
16291
16343
|
this.$nextTick(() => {
|
|
16292
16344
|
const {
|
|
@@ -16310,9 +16362,6 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16310
16362
|
if (!VxeUINumberInputComponent) {
|
|
16311
16363
|
errLog('vxe.error.reqComp', ['vxe-input']);
|
|
16312
16364
|
}
|
|
16313
|
-
if (!VxeUITooltipComponent) {
|
|
16314
|
-
errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
16315
|
-
}
|
|
16316
16365
|
if (!VxeUIRadioGroupComponent) {
|
|
16317
16366
|
errLog('vxe.error.reqComp', ['vxe-radio-group']);
|
|
16318
16367
|
}
|
|
@@ -16359,6 +16408,8 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16359
16408
|
$event
|
|
16360
16409
|
}) {
|
|
16361
16410
|
const $xeTable = this.$xeTable;
|
|
16411
|
+
const reactData = $xeTable;
|
|
16412
|
+
reactData.isCustomStatus = true;
|
|
16362
16413
|
$xeTable.saveCustom();
|
|
16363
16414
|
$xeTable.closeCustom();
|
|
16364
16415
|
$xeTable.emitCustomEvent('confirm', $event);
|
|
@@ -16436,12 +16487,11 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16436
16487
|
}
|
|
16437
16488
|
},
|
|
16438
16489
|
changeCheckboxOption(column) {
|
|
16439
|
-
const
|
|
16440
|
-
|
|
16441
|
-
} = this;
|
|
16490
|
+
const $xeTable = this.$xetable;
|
|
16491
|
+
const reactData = $xeTable;
|
|
16442
16492
|
const {
|
|
16443
16493
|
customOpts
|
|
16444
|
-
} = $
|
|
16494
|
+
} = $xeTable.customOpts;
|
|
16445
16495
|
const isChecked = !column.renderVisible;
|
|
16446
16496
|
if (customOpts.immediate) {
|
|
16447
16497
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], item => {
|
|
@@ -16449,8 +16499,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16449
16499
|
item.renderVisible = isChecked;
|
|
16450
16500
|
item.halfVisible = false;
|
|
16451
16501
|
});
|
|
16452
|
-
|
|
16453
|
-
$
|
|
16502
|
+
reactData.isCustomStatus = true;
|
|
16503
|
+
$xeTable.handleCustom();
|
|
16504
|
+
$xeTable.saveCustomStore('update:visible');
|
|
16454
16505
|
} else {
|
|
16455
16506
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], item => {
|
|
16456
16507
|
item.renderVisible = isChecked;
|
|
@@ -16458,16 +16509,27 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16458
16509
|
});
|
|
16459
16510
|
}
|
|
16460
16511
|
this.handleOptionCheck(column);
|
|
16461
|
-
$
|
|
16512
|
+
$xeTable.checkCustomStatus();
|
|
16513
|
+
},
|
|
16514
|
+
changeColumnWidth(column) {
|
|
16515
|
+
const $xeTable = this.$xetable;
|
|
16516
|
+
const reactData = $xeTable;
|
|
16517
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
16518
|
+
if (customOpts.immediate) {
|
|
16519
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
16520
|
+
column.resizeWidth = column.renderResizeWidth;
|
|
16521
|
+
column.renderWidth = column.renderResizeWidth;
|
|
16522
|
+
reactData.isCustomStatus = true;
|
|
16523
|
+
$xeTable.handleCustom();
|
|
16524
|
+
$xeTable.saveCustomStore('update:width');
|
|
16525
|
+
}
|
|
16526
|
+
}
|
|
16462
16527
|
},
|
|
16463
16528
|
changeFixedOption(column, colFixed) {
|
|
16464
|
-
const
|
|
16465
|
-
|
|
16466
|
-
|
|
16467
|
-
const
|
|
16468
|
-
isMaxFixedColumn,
|
|
16469
|
-
customOpts
|
|
16470
|
-
} = $xetable;
|
|
16529
|
+
const $xeTable = this.$xetable;
|
|
16530
|
+
const reactData = $xeTable;
|
|
16531
|
+
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
16532
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
16471
16533
|
if (customOpts.immediate) {
|
|
16472
16534
|
if (column.renderFixed === colFixed) {
|
|
16473
16535
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
|
|
@@ -16482,8 +16544,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16482
16544
|
});
|
|
16483
16545
|
}
|
|
16484
16546
|
}
|
|
16485
|
-
|
|
16486
|
-
$
|
|
16547
|
+
reactData.isCustomStatus = true;
|
|
16548
|
+
$xeTable.handleCustom();
|
|
16549
|
+
$xeTable.saveCustomStore('update:fixed');
|
|
16487
16550
|
} else {
|
|
16488
16551
|
if (column.renderFixed === colFixed) {
|
|
16489
16552
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([column], col => {
|
|
@@ -16505,113 +16568,261 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
16505
16568
|
$xetable.toggleCustomAllCheckbox();
|
|
16506
16569
|
},
|
|
16507
16570
|
sortMousedownEvent(evnt) {
|
|
16508
|
-
const
|
|
16509
|
-
$xetable
|
|
16510
|
-
} = this;
|
|
16571
|
+
const $xeTable = this.$xetable;
|
|
16511
16572
|
const btnEl = evnt.currentTarget;
|
|
16512
|
-
const
|
|
16513
|
-
const
|
|
16573
|
+
const cellEl = btnEl.parentElement;
|
|
16574
|
+
const tdEl = cellEl.parentElement;
|
|
16575
|
+
const trEl = tdEl.parentElement;
|
|
16514
16576
|
const colid = trEl.getAttribute('colid');
|
|
16515
|
-
const column = $
|
|
16577
|
+
const column = $xeTable.getColumnById(colid);
|
|
16516
16578
|
trEl.draggable = true;
|
|
16517
|
-
this.
|
|
16579
|
+
this.dragCol = column;
|
|
16518
16580
|
addClass(trEl, 'active--drag-origin');
|
|
16519
|
-
updateDropHint(this, evnt);
|
|
16520
16581
|
},
|
|
16521
16582
|
sortMouseupEvent(evnt) {
|
|
16522
16583
|
const btnEl = evnt.currentTarget;
|
|
16523
|
-
const
|
|
16524
|
-
const
|
|
16525
|
-
const
|
|
16584
|
+
const cellEl = btnEl.parentElement;
|
|
16585
|
+
const tdEl = cellEl.parentElement;
|
|
16586
|
+
const trEl = tdEl.parentElement;
|
|
16587
|
+
panel_hideDropTip(this);
|
|
16526
16588
|
trEl.draggable = false;
|
|
16527
|
-
this.
|
|
16589
|
+
this.dragCol = null;
|
|
16528
16590
|
removeClass(trEl, 'active--drag-origin');
|
|
16529
|
-
if (dragHintEl) {
|
|
16530
|
-
dragHintEl.style.display = '';
|
|
16531
|
-
}
|
|
16532
16591
|
},
|
|
16533
16592
|
sortDragstartEvent(evnt) {
|
|
16534
|
-
const img = new Image();
|
|
16535
16593
|
if (evnt.dataTransfer) {
|
|
16594
|
+
const img = new Image();
|
|
16595
|
+
img.src = tpImg;
|
|
16536
16596
|
evnt.dataTransfer.setDragImage(img, 0, 0);
|
|
16537
16597
|
}
|
|
16538
16598
|
},
|
|
16539
16599
|
sortDragendEvent(evnt) {
|
|
16600
|
+
const $xeTable = this.$xetable;
|
|
16601
|
+
const tableProps = $xeTable;
|
|
16602
|
+
const reactData = $xeTable;
|
|
16603
|
+
const internalData = $xeTable;
|
|
16540
16604
|
const {
|
|
16541
|
-
|
|
16542
|
-
|
|
16605
|
+
dragCol,
|
|
16606
|
+
prevDragPos,
|
|
16607
|
+
prevDragCol,
|
|
16608
|
+
prevDragToChild
|
|
16543
16609
|
} = this;
|
|
16544
16610
|
const {
|
|
16545
|
-
|
|
16546
|
-
|
|
16547
|
-
|
|
16611
|
+
mouseConfig
|
|
16612
|
+
} = tableProps;
|
|
16613
|
+
const {
|
|
16614
|
+
customColumnList
|
|
16615
|
+
} = reactData;
|
|
16616
|
+
const {
|
|
16617
|
+
collectColumn
|
|
16618
|
+
} = internalData;
|
|
16619
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
16620
|
+
const {
|
|
16621
|
+
immediate
|
|
16622
|
+
} = customOpts;
|
|
16548
16623
|
const trEl = evnt.currentTarget;
|
|
16549
|
-
const
|
|
16550
|
-
|
|
16624
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
16625
|
+
const {
|
|
16626
|
+
isCrossDrag,
|
|
16627
|
+
isSelfToChildDrag,
|
|
16628
|
+
isToChildDrag,
|
|
16629
|
+
dragEndMethod
|
|
16630
|
+
} = columnDragOpts;
|
|
16631
|
+
const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
|
|
16632
|
+
if (prevDragCol && dragCol) {
|
|
16551
16633
|
// 判断是否有拖动
|
|
16552
|
-
if (
|
|
16553
|
-
const
|
|
16554
|
-
const
|
|
16555
|
-
|
|
16556
|
-
|
|
16557
|
-
|
|
16558
|
-
|
|
16559
|
-
|
|
16560
|
-
|
|
16561
|
-
|
|
16562
|
-
|
|
16563
|
-
|
|
16564
|
-
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16569
|
-
|
|
16634
|
+
if (prevDragCol !== dragCol) {
|
|
16635
|
+
const oldColumn = dragCol;
|
|
16636
|
+
const newColumn = prevDragCol;
|
|
16637
|
+
Promise.resolve(dragEndMethod ? dragEndMethod({
|
|
16638
|
+
oldColumn,
|
|
16639
|
+
newColumn,
|
|
16640
|
+
dragPos: prevDragPos,
|
|
16641
|
+
offsetIndex: dragOffsetIndex
|
|
16642
|
+
}) : true).then(status => {
|
|
16643
|
+
if (!status) {
|
|
16644
|
+
return;
|
|
16645
|
+
}
|
|
16646
|
+
let oafIndex = -1;
|
|
16647
|
+
let nafIndex = -1;
|
|
16648
|
+
const oldAllMaps = {};
|
|
16649
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([oldColumn], column => {
|
|
16650
|
+
oldAllMaps[column.id] = column;
|
|
16651
|
+
});
|
|
16652
|
+
let isSelfToChildStatus = false;
|
|
16653
|
+
// 只有实时拖拽支持跨层级
|
|
16654
|
+
if (immediate) {
|
|
16655
|
+
if (oldColumn.parentId && newColumn.parentId) {
|
|
16656
|
+
// 子到子
|
|
16657
|
+
if (!isCrossDrag) {
|
|
16658
|
+
return;
|
|
16659
|
+
}
|
|
16660
|
+
if (oldAllMaps[newColumn.id]) {
|
|
16661
|
+
isSelfToChildStatus = true;
|
|
16662
|
+
if (!isSelfToChildDrag) {
|
|
16663
|
+
if (core_.VxeUI.modal) {
|
|
16664
|
+
core_.VxeUI.modal.message({
|
|
16665
|
+
status: 'error',
|
|
16666
|
+
content: panel_getI18n('vxe.error.treeDragChild')
|
|
16667
|
+
});
|
|
16668
|
+
}
|
|
16669
|
+
return;
|
|
16670
|
+
}
|
|
16671
|
+
}
|
|
16672
|
+
} else if (oldColumn.parentId) {
|
|
16673
|
+
// 子到根
|
|
16674
|
+
if (!isCrossDrag) {
|
|
16675
|
+
return;
|
|
16676
|
+
}
|
|
16677
|
+
} else if (newColumn.parentId) {
|
|
16678
|
+
// 根到子
|
|
16679
|
+
if (!isCrossDrag) {
|
|
16680
|
+
return;
|
|
16681
|
+
}
|
|
16682
|
+
if (oldAllMaps[newColumn.id]) {
|
|
16683
|
+
isSelfToChildStatus = true;
|
|
16684
|
+
if (!isSelfToChildDrag) {
|
|
16685
|
+
if (core_.VxeUI.modal) {
|
|
16686
|
+
core_.VxeUI.modal.message({
|
|
16687
|
+
status: 'error',
|
|
16688
|
+
content: panel_getI18n('vxe.error.treeDragChild')
|
|
16689
|
+
});
|
|
16690
|
+
}
|
|
16691
|
+
return;
|
|
16692
|
+
}
|
|
16693
|
+
}
|
|
16694
|
+
} else {
|
|
16695
|
+
// 根到根
|
|
16696
|
+
}
|
|
16697
|
+
const oldewMatchRest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(collectColumn, item => item.id === oldColumn.id);
|
|
16698
|
+
// 改变层级
|
|
16699
|
+
if (isSelfToChildStatus && isSelfToChildDrag) {
|
|
16700
|
+
if (oldewMatchRest) {
|
|
16701
|
+
const {
|
|
16702
|
+
items: oCols,
|
|
16703
|
+
index: oIndex
|
|
16704
|
+
} = oldewMatchRest;
|
|
16705
|
+
const childList = oldColumn.children || [];
|
|
16706
|
+
childList.forEach(column => {
|
|
16707
|
+
column.parentId = oldColumn.parentId;
|
|
16708
|
+
});
|
|
16709
|
+
oCols.splice(oIndex, 1, ...childList);
|
|
16710
|
+
oldColumn.children = [];
|
|
16711
|
+
}
|
|
16712
|
+
} else {
|
|
16713
|
+
if (oldewMatchRest) {
|
|
16714
|
+
const {
|
|
16715
|
+
items: oCols,
|
|
16716
|
+
index: oIndex,
|
|
16717
|
+
parent: oParent
|
|
16718
|
+
} = oldewMatchRest;
|
|
16719
|
+
oCols.splice(oIndex, 1);
|
|
16720
|
+
if (!oParent) {
|
|
16721
|
+
oafIndex = oIndex;
|
|
16722
|
+
}
|
|
16723
|
+
}
|
|
16724
|
+
}
|
|
16725
|
+
const newMatchRest = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findTree(collectColumn, item => item.id === newColumn.id);
|
|
16726
|
+
if (newMatchRest) {
|
|
16727
|
+
const {
|
|
16728
|
+
items: nCols,
|
|
16729
|
+
index: nIndex,
|
|
16730
|
+
parent: nParent
|
|
16731
|
+
} = newMatchRest;
|
|
16732
|
+
// 转子级
|
|
16733
|
+
if (isToChildDrag && prevDragToChild) {
|
|
16734
|
+
oldColumn.parentId = newColumn.id;
|
|
16735
|
+
newColumn.children = (newColumn.children || []).concat([oldColumn]);
|
|
16736
|
+
} else {
|
|
16737
|
+
oldColumn.parentId = newColumn.parentId;
|
|
16738
|
+
nCols.splice(nIndex + dragOffsetIndex, 0, oldColumn);
|
|
16739
|
+
}
|
|
16740
|
+
if (!nParent) {
|
|
16741
|
+
nafIndex = nIndex;
|
|
16742
|
+
}
|
|
16743
|
+
}
|
|
16744
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, (column, index, items, path, parent) => {
|
|
16745
|
+
if (!parent) {
|
|
16746
|
+
const sortIndex = index + 1;
|
|
16747
|
+
column.renderSortNumber = sortIndex;
|
|
16748
|
+
}
|
|
16749
|
+
});
|
|
16750
|
+
} else {
|
|
16751
|
+
oafIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(customColumnList, item => item.id === oldColumn.id);
|
|
16752
|
+
customColumnList.splice(oafIndex, 1);
|
|
16753
|
+
nafIndex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().findIndexOf(customColumnList, item => item.id === newColumn.id);
|
|
16754
|
+
customColumnList.splice(nafIndex + dragOffsetIndex, 0, oldColumn);
|
|
16755
|
+
}
|
|
16756
|
+
reactData.isDragColMove = true;
|
|
16757
|
+
if (mouseConfig) {
|
|
16758
|
+
if ($xeTable.clearSelected) {
|
|
16759
|
+
$xeTable.clearSelected();
|
|
16760
|
+
}
|
|
16761
|
+
if ($xeTable.clearCellAreas) {
|
|
16762
|
+
$xeTable.clearCellAreas();
|
|
16763
|
+
$xeTable.clearCopyCellArea();
|
|
16764
|
+
}
|
|
16765
|
+
}
|
|
16766
|
+
$xeTable.dispatchEvent('column-dragend', {
|
|
16767
|
+
oldColumn,
|
|
16768
|
+
newColumn,
|
|
16769
|
+
dragPos: prevDragPos,
|
|
16770
|
+
offsetIndex: dragOffsetIndex,
|
|
16771
|
+
_index: {
|
|
16772
|
+
newIndex: nafIndex,
|
|
16773
|
+
oldIndex: oafIndex
|
|
16774
|
+
}
|
|
16775
|
+
}, evnt);
|
|
16776
|
+
if (immediate) {
|
|
16777
|
+
reactData.customColumnList = collectColumn.slice(0);
|
|
16778
|
+
$xeTable.refreshColumn(true).then(() => {
|
|
16779
|
+
$xeTable.updateCellAreas();
|
|
16780
|
+
$xeTable.handleCustom();
|
|
16781
|
+
$xeTable.saveCustomStore('update:sort');
|
|
16782
|
+
});
|
|
16783
|
+
}
|
|
16784
|
+
}).catch(() => {});
|
|
16570
16785
|
}
|
|
16571
|
-
prevDropTrEl.draggable = false;
|
|
16572
|
-
prevDropTrEl.removeAttribute('drag-pos');
|
|
16573
|
-
removeClass(prevDropTrEl, 'active--drag-target');
|
|
16574
16786
|
}
|
|
16575
|
-
this
|
|
16787
|
+
panel_hideDropTip(this);
|
|
16788
|
+
this.dragCol.value = null;
|
|
16576
16789
|
trEl.draggable = false;
|
|
16577
16790
|
trEl.removeAttribute('drag-pos');
|
|
16578
|
-
if (dragHintEl) {
|
|
16579
|
-
dragHintEl.style.display = '';
|
|
16580
|
-
}
|
|
16581
16791
|
removeClass(trEl, 'active--drag-target');
|
|
16582
16792
|
removeClass(trEl, 'active--drag-origin');
|
|
16583
|
-
if (customOpts.immediate) {
|
|
16584
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
16585
|
-
if (!parent) {
|
|
16586
|
-
const sortIndex = index + 1;
|
|
16587
|
-
column.renderSortNumber = sortIndex;
|
|
16588
|
-
}
|
|
16589
|
-
});
|
|
16590
|
-
$xetable.handleCustom();
|
|
16591
|
-
$xetable.saveCustomStore('update:sort');
|
|
16592
|
-
}
|
|
16593
16793
|
},
|
|
16594
16794
|
sortDragoverEvent(evnt) {
|
|
16795
|
+
const $xeTable = this.$xetable;
|
|
16595
16796
|
const {
|
|
16596
|
-
|
|
16597
|
-
prevDropTrEl
|
|
16797
|
+
dragCol
|
|
16598
16798
|
} = this;
|
|
16599
|
-
const
|
|
16600
|
-
|
|
16601
|
-
|
|
16602
|
-
}
|
|
16603
|
-
const
|
|
16604
|
-
const
|
|
16605
|
-
|
|
16606
|
-
|
|
16799
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
16800
|
+
const {
|
|
16801
|
+
immediate
|
|
16802
|
+
} = customOpts;
|
|
16803
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
16804
|
+
const {
|
|
16805
|
+
isCrossDrag,
|
|
16806
|
+
isToChildDrag
|
|
16807
|
+
} = columnDragOpts;
|
|
16808
|
+
const optEl = evnt.currentTarget;
|
|
16809
|
+
const hasCtrlKey = evnt.ctrlKey;
|
|
16810
|
+
const colid = optEl.getAttribute('colid');
|
|
16811
|
+
const column = $xeTable.getColumnById(colid);
|
|
16812
|
+
// 是否移入有效列
|
|
16813
|
+
if (column && (isCrossDrag || column.level === 1)) {
|
|
16607
16814
|
evnt.preventDefault();
|
|
16608
|
-
const offsetY = evnt.clientY -
|
|
16609
|
-
const
|
|
16610
|
-
|
|
16611
|
-
|
|
16612
|
-
|
|
16815
|
+
const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
|
|
16816
|
+
const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom';
|
|
16817
|
+
if (dragCol && dragCol.id === column.id || !isCrossDrag && column.level > 1 || !immediate && column.level > 1 || column.renderFixed) {
|
|
16818
|
+
panel_showDropTip(this, evnt, optEl, false, dragPos);
|
|
16819
|
+
return;
|
|
16820
|
+
}
|
|
16821
|
+
this.prevDragToChild = !!(isToChildDrag && hasCtrlKey && immediate);
|
|
16822
|
+
this.prevDragCol = column;
|
|
16823
|
+
this.prevDragPos = dragPos;
|
|
16824
|
+
panel_showDropTip(this, evnt, optEl, true, dragPos);
|
|
16613
16825
|
}
|
|
16614
|
-
updateDropHint(this, evnt);
|
|
16615
16826
|
}
|
|
16616
16827
|
}
|
|
16617
16828
|
});
|
|
@@ -22519,6 +22730,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
22519
22730
|
},
|
|
22520
22731
|
_setCustomAllCheckbox(checked) {
|
|
22521
22732
|
const $xeTable = this;
|
|
22733
|
+
const reactData = $xeTable;
|
|
22522
22734
|
const {
|
|
22523
22735
|
customStore
|
|
22524
22736
|
} = this;
|
|
@@ -22548,6 +22760,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
22548
22760
|
column.halfVisible = false;
|
|
22549
22761
|
});
|
|
22550
22762
|
customStore.isAll = isAll;
|
|
22763
|
+
reactData.isCustomStatus = true;
|
|
22551
22764
|
$xeTable.handleCustom();
|
|
22552
22765
|
$xeTable.saveCustomStore('update:visible');
|
|
22553
22766
|
} else {
|
|
@@ -22781,7 +22994,7 @@ const renderDragTipContents = (h, $xeTable) => {
|
|
|
22781
22994
|
}
|
|
22782
22995
|
return [h('span', dragTipText)];
|
|
22783
22996
|
};
|
|
22784
|
-
const
|
|
22997
|
+
const table_renderDragTip = (h, $xeTable) => {
|
|
22785
22998
|
const reactData = $xeTable;
|
|
22786
22999
|
const {
|
|
22787
23000
|
dragRow
|
|
@@ -23464,7 +23677,7 @@ function handleUupdateResize(_vm) {
|
|
|
23464
23677
|
});
|
|
23465
23678
|
},
|
|
23466
23679
|
staticColumns(value) {
|
|
23467
|
-
this.handleColumn(value);
|
|
23680
|
+
this.handleColumn(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(value));
|
|
23468
23681
|
},
|
|
23469
23682
|
tableColumn() {
|
|
23470
23683
|
this.analyColumnWidth();
|
|
@@ -23931,6 +24144,9 @@ function handleUupdateResize(_vm) {
|
|
|
23931
24144
|
'is--virtual-x': scrollXLoad,
|
|
23932
24145
|
'is--virtual-y': scrollYLoad
|
|
23933
24146
|
}],
|
|
24147
|
+
style: {
|
|
24148
|
+
'--vxe-ui-table-drag-column-move-delay': `${Math.max(0.05, Math.min(0.3, tableData.length / 800))}s`
|
|
24149
|
+
},
|
|
23934
24150
|
attrs: {
|
|
23935
24151
|
spellcheck: false
|
|
23936
24152
|
},
|
|
@@ -24124,7 +24340,7 @@ function handleUupdateResize(_vm) {
|
|
|
24124
24340
|
/**
|
|
24125
24341
|
* 拖拽提示
|
|
24126
24342
|
*/
|
|
24127
|
-
|
|
24343
|
+
table_renderDragTip(h, this), h('div', {}, [
|
|
24128
24344
|
/**
|
|
24129
24345
|
* 提示相关
|
|
24130
24346
|
*/
|
|
@@ -27650,7 +27866,7 @@ const Toolbar = VxeToolbar;
|
|
|
27650
27866
|
setting: {
|
|
27651
27867
|
colSort: '排序',
|
|
27652
27868
|
sortHelpTip: '点击并拖动图标可以调整列的排序',
|
|
27653
|
-
colTitle: '
|
|
27869
|
+
colTitle: '列标题',
|
|
27654
27870
|
colResizable: '列宽(像素)',
|
|
27655
27871
|
colVisible: '是否显示',
|
|
27656
27872
|
colFixed: '冻结列',
|