vxe-table 3.11.21 → 3.11.22
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.1733469864818.ttf → iconfont.1733702408214.ttf} +0 -0
- package/es/iconfont.1733702408214.woff +0 -0
- package/es/iconfont.1733702408214.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +2 -0
- package/es/locale/lang/de-DE.js +2 -0
- package/es/locale/lang/en-US.js +3 -1
- package/es/locale/lang/es-ES.js +2 -0
- package/es/locale/lang/fr-FR.js +2 -0
- package/es/locale/lang/hu-HU.js +2 -0
- package/es/locale/lang/hy-AM.js +2 -0
- package/es/locale/lang/ja-JP.js +2 -0
- package/es/locale/lang/ko-KR.js +2 -0
- package/es/locale/lang/nb-NO.js +2 -0
- package/es/locale/lang/pt-BR.js +2 -0
- package/es/locale/lang/ru-RU.js +2 -0
- package/es/locale/lang/ug-CN.js +2 -0
- package/es/locale/lang/uk-UA.js +2 -0
- package/es/locale/lang/vi-VN.js +2 -0
- package/es/locale/lang/zh-CHT.js +2 -0
- package/es/locale/lang/zh-CN.js +2 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +8 -3
- package/es/table/module/custom/panel.js +44 -27
- package/es/table/src/body.js +2 -2
- package/es/table/src/cell.js +7 -2
- package/es/table/src/header.js +1 -1
- package/es/table/src/methods.js +175 -43
- package/es/table/src/table.js +31 -4
- package/es/table/style.css +62 -4
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +4 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +62 -4
- package/es/vxe-table/style.min.css +1 -1
- package/lib/{iconfont.1733469864818.ttf → iconfont.1733702408214.ttf} +0 -0
- package/lib/iconfont.1733702408214.woff +0 -0
- package/lib/iconfont.1733702408214.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +297 -92
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +2 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/de-DE.js +2 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/en-US.js +3 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +3 -1
- package/lib/locale/lang/es-ES.js +2 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -0
- package/lib/locale/lang/fr-FR.js +2 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/hu-HU.js +2 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +2 -0
- package/lib/locale/lang/hy-AM.js +2 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/ja-JP.js +2 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -0
- package/lib/locale/lang/ko-KR.js +2 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +2 -0
- package/lib/locale/lang/nb-NO.js +2 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/pt-BR.js +2 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -0
- package/lib/locale/lang/ru-RU.js +2 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +2 -0
- package/lib/locale/lang/ug-CN.js +2 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/uk-UA.js +2 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +2 -0
- package/lib/locale/lang/vi-VN.js +2 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +2 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +2 -0
- package/lib/locale/lang/zh-CN.js +2 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +8 -3
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +49 -37
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/body.js +2 -2
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +6 -1
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/header.js +1 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +199 -43
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +25 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +62 -4
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +4 -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 +62 -4
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +2 -0
- package/packages/locale/lang/de-DE.ts +2 -0
- package/packages/locale/lang/en-US.ts +3 -1
- package/packages/locale/lang/es-ES.ts +2 -0
- package/packages/locale/lang/fr-FR.ts +2 -0
- package/packages/locale/lang/hu-HU.ts +2 -0
- package/packages/locale/lang/hy-AM.ts +2 -0
- package/packages/locale/lang/ja-JP.ts +2 -0
- package/packages/locale/lang/ko-KR.ts +2 -0
- package/packages/locale/lang/nb-NO.ts +2 -0
- package/packages/locale/lang/pt-BR.ts +2 -0
- package/packages/locale/lang/ru-RU.ts +2 -0
- package/packages/locale/lang/ug-CN.ts +2 -0
- package/packages/locale/lang/uk-UA.ts +2 -0
- package/packages/locale/lang/vi-VN.ts +2 -0
- package/packages/locale/lang/zh-CHT.ts +2 -0
- package/packages/locale/lang/zh-CN.ts +2 -0
- package/packages/table/module/custom/mixin.ts +9 -3
- package/packages/table/module/custom/panel.ts +48 -27
- package/packages/table/src/body.ts +2 -2
- package/packages/table/src/cell.ts +8 -2
- package/packages/table/src/header.ts +1 -1
- package/packages/table/src/methods.ts +187 -45
- package/packages/table/src/table.ts +34 -4
- package/packages/ui/index.ts +3 -0
- package/styles/components/icon.scss +13 -1
- package/styles/components/table.scss +53 -3
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/theme/dark.scss +1 -0
- package/styles/theme/light.scss +1 -0
- package/styles/variable.scss +1 -0
- package/es/iconfont.1733469864818.woff +0 -0
- package/es/iconfont.1733469864818.woff2 +0 -0
- package/lib/iconfont.1733469864818.woff +0 -0
- package/lib/iconfont.1733469864818.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.
|
|
2223
|
+
const version = "3.11.22";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2468,6 +2468,9 @@ core_.VxeUI.setIcon({
|
|
|
2468
2468
|
TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
|
|
2469
2469
|
TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
|
|
2470
2470
|
TABLE_DRAG_COLUMN: iconPrefix + 'drag-handle',
|
|
2471
|
+
TABLE_DRAG_STATUS_ROW: iconPrefix + 'sort',
|
|
2472
|
+
TABLE_DRAG_STATUS_COLUMN: iconPrefix + 'swap',
|
|
2473
|
+
TABLE_DRAG_DISABLED: iconPrefix + 'no-drop',
|
|
2471
2474
|
// toolbar
|
|
2472
2475
|
TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
|
|
2473
2476
|
TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'repeat roll',
|
|
@@ -2785,7 +2788,7 @@ function isNodeElement(elem) {
|
|
|
2785
2788
|
const {
|
|
2786
2789
|
log: log_log
|
|
2787
2790
|
} = core_.VxeUI;
|
|
2788
|
-
const log_version = `table v${"3.11.
|
|
2791
|
+
const log_version = `table v${"3.11.22"}`;
|
|
2789
2792
|
const warnLog = log_log.create('warn', log_version);
|
|
2790
2793
|
const errLog = log_log.create('error', log_version);
|
|
2791
2794
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -3599,12 +3602,17 @@ function renderCellBaseVNs(h, params, content) {
|
|
|
3599
3602
|
const rowDragOpts = $table.computeRowDragOpts;
|
|
3600
3603
|
const {
|
|
3601
3604
|
showIcon,
|
|
3605
|
+
isCrossDrag,
|
|
3602
3606
|
visibleMethod
|
|
3603
3607
|
} = rowDragOpts;
|
|
3604
3608
|
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
|
|
3605
3609
|
const vns = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(content) ? content : [content];
|
|
3606
3610
|
if (dragSort && rowOpts.drag && (showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params))) {
|
|
3607
|
-
if (
|
|
3611
|
+
if (treeConfig) {
|
|
3612
|
+
if (isCrossDrag || !level) {
|
|
3613
|
+
vns.unshift(renderCellDragIcon(h, params));
|
|
3614
|
+
}
|
|
3615
|
+
} else {
|
|
3608
3616
|
vns.unshift(renderCellDragIcon(h, params));
|
|
3609
3617
|
}
|
|
3610
3618
|
}
|
|
@@ -5340,7 +5348,7 @@ const updateColDropTipContent = ($xeTable, tdEl) => {
|
|
|
5340
5348
|
}
|
|
5341
5349
|
reactData.dragTipText = tipContent;
|
|
5342
5350
|
};
|
|
5343
|
-
function showDropTip($xeTable, evnt, trEl, thEl, dragPos) {
|
|
5351
|
+
function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
|
|
5344
5352
|
const reactData = $xeTable;
|
|
5345
5353
|
const el = $xeTable.$refs.refElem;
|
|
5346
5354
|
if (!el) {
|
|
@@ -5354,26 +5362,30 @@ function showDropTip($xeTable, evnt, trEl, thEl, dragPos) {
|
|
|
5354
5362
|
if (trEl) {
|
|
5355
5363
|
const rdLineEl = $xeTable.$refs.refDragRowLineElem;
|
|
5356
5364
|
if (rdLineEl) {
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
top = Math.
|
|
5365
|
+
if (showLine) {
|
|
5366
|
+
const trRect = trEl.getBoundingClientRect();
|
|
5367
|
+
rdLineEl.style.display = 'block';
|
|
5368
|
+
rdLineEl.style.top = `${Math.max(1, trRect.y - wrapperRect.y)}px`;
|
|
5369
|
+
rdLineEl.style.height = `${trRect.height}px`;
|
|
5370
|
+
rdLineEl.style.width = `${wrapperRect.width - scrollbarWidth}px`;
|
|
5371
|
+
rdLineEl.setAttribute('drag-pos', dragPos);
|
|
5372
|
+
} else {
|
|
5373
|
+
rdLineEl.style.display = '';
|
|
5361
5374
|
}
|
|
5362
|
-
rdLineEl.style.top = `${top}px`;
|
|
5363
|
-
rdLineEl.style.width = `${wrapperRect.width - scrollbarWidth}px`;
|
|
5364
|
-
rdLineEl.style.display = 'block';
|
|
5365
5375
|
}
|
|
5366
5376
|
} else if (thEl) {
|
|
5367
5377
|
const cdLineEl = $xeTable.$refs.refDragColLineElem;
|
|
5368
5378
|
if (cdLineEl) {
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
left = Math.
|
|
5379
|
+
if (showLine) {
|
|
5380
|
+
const thRect = thEl.getBoundingClientRect();
|
|
5381
|
+
cdLineEl.style.display = 'block';
|
|
5382
|
+
cdLineEl.style.left = `${Math.max(1, thRect.x - wrapperRect.x)}px`;
|
|
5383
|
+
cdLineEl.style.width = `${thRect.width}px`;
|
|
5384
|
+
cdLineEl.style.height = `${wrapperRect.height - scrollbarHeight}px`;
|
|
5385
|
+
cdLineEl.setAttribute('drag-pos', dragPos);
|
|
5386
|
+
} else {
|
|
5387
|
+
cdLineEl.style.display = '';
|
|
5373
5388
|
}
|
|
5374
|
-
cdLineEl.style.left = `${left}px`;
|
|
5375
|
-
cdLineEl.style.height = `${wrapperRect.height - scrollbarHeight}px`;
|
|
5376
|
-
cdLineEl.style.display = 'block';
|
|
5377
5389
|
}
|
|
5378
5390
|
}
|
|
5379
5391
|
const rdTipEl = $xeTable.$refs.refDragTipElem;
|
|
@@ -5381,6 +5393,7 @@ function showDropTip($xeTable, evnt, trEl, thEl, dragPos) {
|
|
|
5381
5393
|
rdTipEl.style.display = 'block';
|
|
5382
5394
|
rdTipEl.style.top = `${Math.min(el.clientHeight - el.scrollTop - rdTipEl.clientHeight, evnt.clientY - wrapperRect.y)}px`;
|
|
5383
5395
|
rdTipEl.style.left = `${Math.min(el.clientWidth - el.scrollLeft - rdTipEl.clientWidth - 16, evnt.clientX - wrapperRect.x)}px`;
|
|
5396
|
+
rdTipEl.setAttribute('drag-status', showLine ? 'normal' : 'disabled');
|
|
5384
5397
|
}
|
|
5385
5398
|
}
|
|
5386
5399
|
const hideDropTip = $xeTable => {
|
|
@@ -5932,6 +5945,7 @@ const Methods = {
|
|
|
5932
5945
|
};
|
|
5933
5946
|
}
|
|
5934
5947
|
if (isSource) {
|
|
5948
|
+
cacheItem.level = level;
|
|
5935
5949
|
cacheItem.index = treeConfig && parent ? -1 : index;
|
|
5936
5950
|
fullDataRowIdMaps[rowid] = cacheItem;
|
|
5937
5951
|
}
|
|
@@ -6735,6 +6749,17 @@ const Methods = {
|
|
|
6735
6749
|
tableColumn: this.tableColumn.slice(0)
|
|
6736
6750
|
};
|
|
6737
6751
|
},
|
|
6752
|
+
/**
|
|
6753
|
+
* 获取表格的全量列
|
|
6754
|
+
*/
|
|
6755
|
+
getFullColumns() {
|
|
6756
|
+
const $xeTable = this;
|
|
6757
|
+
const internalData = $xeTable;
|
|
6758
|
+
const {
|
|
6759
|
+
collectColumn
|
|
6760
|
+
} = internalData;
|
|
6761
|
+
return collectColumn.slice(0);
|
|
6762
|
+
},
|
|
6738
6763
|
/**
|
|
6739
6764
|
* 获取数据,和 data 的行为一致,也可以指定索引获取数据
|
|
6740
6765
|
*/
|
|
@@ -7265,6 +7290,38 @@ const Methods = {
|
|
|
7265
7290
|
footerData: footerTableData.slice(0)
|
|
7266
7291
|
};
|
|
7267
7292
|
},
|
|
7293
|
+
/**
|
|
7294
|
+
* 获取表格的全量数据,如果是 tree-config 则返回带层级的树结构
|
|
7295
|
+
*/
|
|
7296
|
+
getFullData() {
|
|
7297
|
+
const $xeTable = this;
|
|
7298
|
+
const props = $xeTable;
|
|
7299
|
+
const internalData = $xeTable;
|
|
7300
|
+
const {
|
|
7301
|
+
treeConfig
|
|
7302
|
+
} = props;
|
|
7303
|
+
const {
|
|
7304
|
+
tableFullData,
|
|
7305
|
+
tableFullTreeData
|
|
7306
|
+
} = internalData;
|
|
7307
|
+
if (treeConfig) {
|
|
7308
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
7309
|
+
const {
|
|
7310
|
+
transform,
|
|
7311
|
+
mapChildrenField
|
|
7312
|
+
} = treeOpts;
|
|
7313
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
7314
|
+
if (transform) {
|
|
7315
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toTreeArray(tableFullTreeData, {
|
|
7316
|
+
children: mapChildrenField
|
|
7317
|
+
}), {
|
|
7318
|
+
children: childrenField
|
|
7319
|
+
});
|
|
7320
|
+
}
|
|
7321
|
+
return tableFullTreeData.slice(0);
|
|
7322
|
+
}
|
|
7323
|
+
return tableFullData.slice(0);
|
|
7324
|
+
},
|
|
7268
7325
|
/**
|
|
7269
7326
|
* 处理数据加载默认行为
|
|
7270
7327
|
* 默认执行一次,除非被重置
|
|
@@ -7466,9 +7523,12 @@ const Methods = {
|
|
|
7466
7523
|
return this.refreshColumn(true);
|
|
7467
7524
|
},
|
|
7468
7525
|
handleCustomRestore(storeData) {
|
|
7526
|
+
const $xetable = this;
|
|
7527
|
+
const reactData = $xetable;
|
|
7528
|
+
const internalData = $xetable;
|
|
7469
7529
|
let {
|
|
7470
7530
|
collectColumn
|
|
7471
|
-
} =
|
|
7531
|
+
} = internalData;
|
|
7472
7532
|
const {
|
|
7473
7533
|
resizableData,
|
|
7474
7534
|
sortData,
|
|
@@ -7500,9 +7560,12 @@ const Methods = {
|
|
|
7500
7560
|
// 如果自定义了顺序
|
|
7501
7561
|
if (hasCustomSort) {
|
|
7502
7562
|
collectColumn = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(collectColumn, 'renderSortNumber');
|
|
7503
|
-
|
|
7504
|
-
|
|
7563
|
+
internalData.collectColumn = collectColumn;
|
|
7564
|
+
internalData.tableFullColumn = getColumnList(collectColumn);
|
|
7505
7565
|
}
|
|
7566
|
+
reactData.isCustomStatus = true;
|
|
7567
|
+
} else {
|
|
7568
|
+
reactData.isCustomStatus = false;
|
|
7506
7569
|
}
|
|
7507
7570
|
},
|
|
7508
7571
|
/**
|
|
@@ -10774,20 +10837,26 @@ const Methods = {
|
|
|
10774
10837
|
} = props;
|
|
10775
10838
|
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
10776
10839
|
const {
|
|
10840
|
+
fullAllDataRowIdData
|
|
10841
|
+
} = internalData;
|
|
10842
|
+
const {
|
|
10843
|
+
isCrossDrag,
|
|
10844
|
+
isSelfToChildDrag,
|
|
10777
10845
|
dragEndMethod
|
|
10778
10846
|
} = rowDragOpts;
|
|
10779
10847
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
10780
10848
|
const {
|
|
10781
|
-
transform
|
|
10849
|
+
transform,
|
|
10850
|
+
mapChildrenField,
|
|
10851
|
+
parentField
|
|
10782
10852
|
} = treeOpts;
|
|
10853
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
10783
10854
|
const {
|
|
10784
10855
|
dragRow
|
|
10785
10856
|
} = reactData;
|
|
10786
10857
|
const {
|
|
10787
10858
|
afterFullData,
|
|
10788
|
-
afterTreeFullData,
|
|
10789
10859
|
tableFullData,
|
|
10790
|
-
tableFullTreeData,
|
|
10791
10860
|
prevDragRow,
|
|
10792
10861
|
prevDragPos
|
|
10793
10862
|
} = internalData;
|
|
@@ -10807,26 +10876,102 @@ const Methods = {
|
|
|
10807
10876
|
}
|
|
10808
10877
|
let oafIndex = -1;
|
|
10809
10878
|
let nafIndex = -1;
|
|
10879
|
+
// 如果为树结构
|
|
10810
10880
|
if (treeConfig) {
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10881
|
+
if (transform) {
|
|
10882
|
+
// 移出源位置
|
|
10883
|
+
const oldRowid = getRowid($xeTable, dragRow);
|
|
10884
|
+
const oldRest = fullAllDataRowIdData[oldRowid];
|
|
10885
|
+
const newRowid = getRowid($xeTable, prevDragRow);
|
|
10886
|
+
const newRest = fullAllDataRowIdData[newRowid];
|
|
10887
|
+
if (oldRest && newRest) {
|
|
10888
|
+
const {
|
|
10889
|
+
level: oldLevel
|
|
10890
|
+
} = oldRest;
|
|
10891
|
+
const {
|
|
10892
|
+
level: newLevel
|
|
10893
|
+
} = newRest;
|
|
10894
|
+
const oldAllMaps = {};
|
|
10895
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([dragRow], item => {
|
|
10896
|
+
oldAllMaps[getRowid($xeTable, item)] = item;
|
|
10897
|
+
}, {
|
|
10898
|
+
children: mapChildrenField
|
|
10899
|
+
});
|
|
10900
|
+
let isSelfToChildStatus = false;
|
|
10901
|
+
if (oldLevel && newLevel) {
|
|
10902
|
+
// 子到子
|
|
10903
|
+
if (!isCrossDrag) {
|
|
10904
|
+
return;
|
|
10905
|
+
}
|
|
10906
|
+
if (oldAllMaps[newRowid]) {
|
|
10907
|
+
if (!isSelfToChildDrag) {
|
|
10908
|
+
isSelfToChildStatus = true;
|
|
10909
|
+
if (core_.VxeUI.modal) {
|
|
10910
|
+
core_.VxeUI.modal.message({
|
|
10911
|
+
status: 'error',
|
|
10912
|
+
content: methods_getI18n('vxe.error.treeDragChild')
|
|
10913
|
+
});
|
|
10914
|
+
}
|
|
10915
|
+
return;
|
|
10916
|
+
}
|
|
10917
|
+
}
|
|
10918
|
+
} else if (oldLevel) {
|
|
10919
|
+
// 子到根
|
|
10920
|
+
if (!isCrossDrag) {
|
|
10921
|
+
return;
|
|
10922
|
+
}
|
|
10923
|
+
} else if (newLevel) {
|
|
10924
|
+
// 根到子
|
|
10925
|
+
if (!isCrossDrag) {
|
|
10926
|
+
return;
|
|
10927
|
+
}
|
|
10928
|
+
if (oldAllMaps[newRowid]) {
|
|
10929
|
+
isSelfToChildStatus = true;
|
|
10930
|
+
if (!isSelfToChildDrag) {
|
|
10931
|
+
if (core_.VxeUI.modal) {
|
|
10932
|
+
core_.VxeUI.modal.message({
|
|
10933
|
+
status: 'error',
|
|
10934
|
+
content: methods_getI18n('vxe.error.treeDragChild')
|
|
10935
|
+
});
|
|
10936
|
+
}
|
|
10937
|
+
return;
|
|
10938
|
+
}
|
|
10939
|
+
}
|
|
10940
|
+
} else {
|
|
10941
|
+
// 根到根
|
|
10942
|
+
}
|
|
10943
|
+
const fullList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toTreeArray(internalData.afterTreeFullData, {
|
|
10944
|
+
children: childrenField
|
|
10945
|
+
});
|
|
10946
|
+
// 移出
|
|
10947
|
+
const otfIndex = $xeTable.findRowIndexOf(fullList, dragRow);
|
|
10948
|
+
fullList.splice(otfIndex, 1);
|
|
10949
|
+
// 插入
|
|
10950
|
+
const ptfIndex = $xeTable.findRowIndexOf(fullList, prevDragRow);
|
|
10951
|
+
const ntfIndex = ptfIndex + dragOffsetIndex;
|
|
10952
|
+
fullList.splice(ntfIndex, 0, dragRow);
|
|
10953
|
+
// 改变层级
|
|
10954
|
+
if (isSelfToChildStatus && isSelfToChildDrag) {
|
|
10955
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(dragRow[childrenField], childRow => {
|
|
10956
|
+
childRow[parentField] = dragRow[parentField];
|
|
10957
|
+
});
|
|
10958
|
+
}
|
|
10959
|
+
dragRow[parentField] = prevDragRow[parentField];
|
|
10960
|
+
internalData.tableFullTreeData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(fullList, {
|
|
10961
|
+
key: treeOpts.rowField,
|
|
10962
|
+
parentKey: treeOpts.parentField,
|
|
10963
|
+
children: childrenField,
|
|
10964
|
+
mapChildren: treeOpts.mapChildrenField
|
|
10965
|
+
});
|
|
10966
|
+
}
|
|
10967
|
+
}
|
|
10823
10968
|
} else {
|
|
10824
|
-
//
|
|
10969
|
+
// 移出
|
|
10825
10970
|
oafIndex = $xeTable.findRowIndexOf(afterFullData, dragRow);
|
|
10826
10971
|
const otfIndex = $xeTable.findRowIndexOf(tableFullData, dragRow);
|
|
10827
10972
|
afterFullData.splice(oafIndex, 1);
|
|
10828
10973
|
tableFullData.splice(otfIndex, 1);
|
|
10829
|
-
//
|
|
10974
|
+
// 插入
|
|
10830
10975
|
const pafIndex = $xeTable.findRowIndexOf(afterFullData, prevDragRow);
|
|
10831
10976
|
const ptfIndex = $xeTable.findRowIndexOf(tableFullData, prevDragRow);
|
|
10832
10977
|
nafIndex = pafIndex + dragOffsetIndex;
|
|
@@ -10835,9 +10980,9 @@ const Methods = {
|
|
|
10835
10980
|
tableFullData.splice(ntfIndex, 0, dragRow);
|
|
10836
10981
|
}
|
|
10837
10982
|
reactData.isDragRowMove = true;
|
|
10838
|
-
$xeTable.cacheRowMap();
|
|
10839
|
-
$xeTable.updateScrollYStatus();
|
|
10840
10983
|
$xeTable.handleTableData(treeConfig && transform);
|
|
10984
|
+
$xeTable.cacheRowMap(true);
|
|
10985
|
+
$xeTable.updateScrollYStatus();
|
|
10841
10986
|
if (!(treeConfig && transform)) {
|
|
10842
10987
|
$xeTable.updateAfterDataIndex();
|
|
10843
10988
|
}
|
|
@@ -10872,29 +11017,44 @@ const Methods = {
|
|
|
10872
11017
|
},
|
|
10873
11018
|
handleRowDragDragoverEvent(evnt) {
|
|
10874
11019
|
const $xeTable = this;
|
|
11020
|
+
const props = $xeTable;
|
|
10875
11021
|
const internalData = $xeTable;
|
|
10876
11022
|
const reactData = $xeTable;
|
|
11023
|
+
const {
|
|
11024
|
+
treeConfig
|
|
11025
|
+
} = props;
|
|
11026
|
+
const {
|
|
11027
|
+
fullAllDataRowIdData
|
|
11028
|
+
} = internalData;
|
|
10877
11029
|
const {
|
|
10878
11030
|
dragRow
|
|
10879
11031
|
} = reactData;
|
|
11032
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
11033
|
+
const {
|
|
11034
|
+
isCrossDrag
|
|
11035
|
+
} = rowDragOpts;
|
|
10880
11036
|
if (!dragRow) {
|
|
10881
11037
|
evnt.preventDefault();
|
|
10882
11038
|
return;
|
|
10883
11039
|
}
|
|
10884
11040
|
const trEl = evnt.currentTarget;
|
|
10885
|
-
const rowid = trEl.getAttribute('rowid');
|
|
10886
|
-
const
|
|
10887
|
-
if (
|
|
10888
|
-
|
|
11041
|
+
const rowid = trEl.getAttribute('rowid') || '';
|
|
11042
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
11043
|
+
if (rest) {
|
|
11044
|
+
const row = rest.row;
|
|
10889
11045
|
evnt.preventDefault();
|
|
10890
11046
|
const {
|
|
10891
11047
|
dragRow
|
|
10892
11048
|
} = reactData;
|
|
10893
11049
|
const offsetY = evnt.clientY - trEl.getBoundingClientRect().y;
|
|
10894
11050
|
const dragPos = offsetY < trEl.clientHeight / 2 ? 'top' : 'bottom';
|
|
11051
|
+
if ($xeTable.eqRow(dragRow, row) || !isCrossDrag && treeConfig && rest.level) {
|
|
11052
|
+
showDropTip($xeTable, evnt, trEl, null, false, dragPos);
|
|
11053
|
+
return;
|
|
11054
|
+
}
|
|
10895
11055
|
internalData.prevDragRow = row;
|
|
10896
11056
|
internalData.prevDragPos = dragPos;
|
|
10897
|
-
showDropTip($xeTable, evnt, trEl, null, dragPos);
|
|
11057
|
+
showDropTip($xeTable, evnt, trEl, null, true, dragPos);
|
|
10898
11058
|
$xeTable.dispatchEvent('row-dragover', {
|
|
10899
11059
|
oldRow: dragRow,
|
|
10900
11060
|
targetRow: row,
|
|
@@ -11063,9 +11223,13 @@ const Methods = {
|
|
|
11063
11223
|
} = reactData;
|
|
11064
11224
|
const offsetX = evnt.clientX - thEl.getBoundingClientRect().x;
|
|
11065
11225
|
const dragPos = offsetX < thEl.clientWidth / 2 ? 'left' : 'right';
|
|
11226
|
+
if (dragCol.id === column.id || column.parentId) {
|
|
11227
|
+
showDropTip($xeTable, evnt, null, thEl, false, dragPos);
|
|
11228
|
+
return;
|
|
11229
|
+
}
|
|
11066
11230
|
internalData.prevDragCol = column;
|
|
11067
11231
|
internalData.prevDragPos = dragPos;
|
|
11068
|
-
showDropTip($xeTable, evnt, null, thEl, dragPos);
|
|
11232
|
+
showDropTip($xeTable, evnt, null, thEl, true, dragPos);
|
|
11069
11233
|
$xeTable.dispatchEvent('column-dragover', {
|
|
11070
11234
|
oldColumn: dragCol,
|
|
11071
11235
|
targetColumn: column,
|
|
@@ -13573,12 +13737,12 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
13573
13737
|
if (editConfig) {
|
|
13574
13738
|
isNewRow = $xeTable.isInsertByRow(row);
|
|
13575
13739
|
}
|
|
13576
|
-
if (treeConfig && !scrollYLoad && !
|
|
13740
|
+
if (treeConfig && !scrollYLoad && !transform) {
|
|
13577
13741
|
rowChildren = row[childrenField];
|
|
13578
13742
|
isExpandTree = rowChildren && rowChildren.length && !!treeExpandedMaps[rowid];
|
|
13579
13743
|
}
|
|
13580
13744
|
// 拖拽行事件
|
|
13581
|
-
if (rowOpts.drag && !
|
|
13745
|
+
if (rowOpts.drag && (!treeConfig || transform)) {
|
|
13582
13746
|
trOn.dragstart = evnt => {
|
|
13583
13747
|
$xeTable.handleRowDragDragstartEvent(evnt);
|
|
13584
13748
|
};
|
|
@@ -14186,7 +14350,7 @@ const header_renderRows = (h, _vm, cols, $rowIndex) => {
|
|
|
14186
14350
|
thOns.mousedown = evnt => $xetable.triggerHeaderCellMousedownEvent(evnt, params);
|
|
14187
14351
|
}
|
|
14188
14352
|
// 拖拽行事件
|
|
14189
|
-
if (columnOpts.drag
|
|
14353
|
+
if (columnOpts.drag) {
|
|
14190
14354
|
thOns.dragstart = $xetable.handleHeaderCellDragDragstartEvent;
|
|
14191
14355
|
thOns.dragend = $xetable.handleHeaderCellDragDragendEvent;
|
|
14192
14356
|
thOns.dragover = $xetable.handleHeaderCellDragDragoverEvent;
|
|
@@ -15243,17 +15407,17 @@ function updateDropHint(_vm, evnt) {
|
|
|
15243
15407
|
}
|
|
15244
15408
|
const renderSimplePanel = (h, _vm) => {
|
|
15245
15409
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
15410
|
+
const props = _vm;
|
|
15246
15411
|
const $xeTable = _vm.$xeTable;
|
|
15412
|
+
const reactData = $xeTable;
|
|
15247
15413
|
const {
|
|
15248
|
-
|
|
15249
|
-
|
|
15250
|
-
dragColumn
|
|
15251
|
-
} = _vm;
|
|
15414
|
+
customStore
|
|
15415
|
+
} = props;
|
|
15252
15416
|
const {
|
|
15253
|
-
|
|
15254
|
-
|
|
15255
|
-
|
|
15256
|
-
|
|
15417
|
+
isCustomStatus,
|
|
15418
|
+
customColumnList
|
|
15419
|
+
} = reactData;
|
|
15420
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
15257
15421
|
const {
|
|
15258
15422
|
maxHeight
|
|
15259
15423
|
} = customStore;
|
|
@@ -15266,6 +15430,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15266
15430
|
trigger,
|
|
15267
15431
|
placement
|
|
15268
15432
|
} = customOpts;
|
|
15433
|
+
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
15269
15434
|
const slots = customOpts.slots || {};
|
|
15270
15435
|
const headerSlot = slots.header;
|
|
15271
15436
|
const topSlot = slots.top;
|
|
@@ -15274,19 +15439,21 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15274
15439
|
const footerSlot = slots.footer;
|
|
15275
15440
|
const colVNs = [];
|
|
15276
15441
|
const customWrapperOns = {};
|
|
15442
|
+
const isAllChecked = customStore.isAll;
|
|
15443
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
15444
|
+
const dragColumn = _vm.dragColumn;
|
|
15277
15445
|
// hover 触发
|
|
15278
15446
|
if (trigger === 'hover') {
|
|
15279
15447
|
customWrapperOns.mouseenter = _vm.handleWrapperMouseenterEvent;
|
|
15280
15448
|
customWrapperOns.mouseleave = _vm.handleWrapperMouseleaveEvent;
|
|
15281
15449
|
}
|
|
15282
|
-
const isAllChecked = customStore.isAll;
|
|
15283
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
15284
15450
|
const params = {
|
|
15285
15451
|
$table: $xeTable,
|
|
15286
15452
|
$grid: $xeTable.xegrid,
|
|
15287
15453
|
columns: customColumnList,
|
|
15288
15454
|
isAllChecked,
|
|
15289
|
-
isAllIndeterminate
|
|
15455
|
+
isAllIndeterminate,
|
|
15456
|
+
isCustomStatus
|
|
15290
15457
|
};
|
|
15291
15458
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
15292
15459
|
const isVisible = visibleMethod ? visibleMethod({
|
|
@@ -15333,7 +15500,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15333
15500
|
}
|
|
15334
15501
|
}, [h('span', {
|
|
15335
15502
|
class: ['vxe-checkbox--icon', isIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
15336
|
-
})]) :
|
|
15503
|
+
})]) : panel_renderEmptyElement($xeTable), allowSort && column.level === 1 ? h('div', {
|
|
15337
15504
|
class: 'vxe-table-custom--sort-option'
|
|
15338
15505
|
}, [h('span', {
|
|
15339
15506
|
class: ['vxe-table-custom--sort-btn', {
|
|
@@ -15348,7 +15515,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15348
15515
|
}
|
|
15349
15516
|
}, [h('i', {
|
|
15350
15517
|
class: panel_getIcon().TABLE_CUSTOM_SORT
|
|
15351
|
-
})])]) :
|
|
15518
|
+
})])]) : panel_renderEmptyElement($xeTable), column.type === 'html' ? h('div', {
|
|
15352
15519
|
key: '1',
|
|
15353
15520
|
class: 'vxe-table-custom--checkbox-label',
|
|
15354
15521
|
domProps: {
|
|
@@ -15388,7 +15555,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15388
15555
|
_vm.changeFixedOption(column, 'right');
|
|
15389
15556
|
}
|
|
15390
15557
|
}
|
|
15391
|
-
})]) :
|
|
15558
|
+
})]) : panel_renderEmptyElement($xeTable)]));
|
|
15392
15559
|
}
|
|
15393
15560
|
});
|
|
15394
15561
|
return h('div', {
|
|
@@ -15448,7 +15615,8 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15448
15615
|
}, [h(VxeUIButtonComponent, {
|
|
15449
15616
|
props: {
|
|
15450
15617
|
mode: 'text',
|
|
15451
|
-
content: customOpts.resetButtonText || panel_getI18n('vxe.table.customRestore')
|
|
15618
|
+
content: customOpts.resetButtonText || panel_getI18n('vxe.table.customRestore'),
|
|
15619
|
+
disabled: !isCustomStatus
|
|
15452
15620
|
},
|
|
15453
15621
|
on: {
|
|
15454
15622
|
click: _vm.resetCustomEvent
|
|
@@ -15469,7 +15637,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15469
15637
|
on: {
|
|
15470
15638
|
click: _vm.cancelCustomEvent
|
|
15471
15639
|
}
|
|
15472
|
-
}), customOpts.immediate ?
|
|
15640
|
+
}), customOpts.immediate ? panel_renderEmptyElement($xeTable) : h(VxeUIButtonComponent, {
|
|
15473
15641
|
props: {
|
|
15474
15642
|
mode: 'text',
|
|
15475
15643
|
status: 'primary',
|
|
@@ -15487,18 +15655,21 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15487
15655
|
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeInput');
|
|
15488
15656
|
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
15489
15657
|
const $xeTableCustomPanel = _vm;
|
|
15658
|
+
const props = _vm;
|
|
15490
15659
|
const $xeTable = _vm.$xeTable;
|
|
15660
|
+
const tableProps = $xeTable;
|
|
15661
|
+
const reactData = $xeTable;
|
|
15491
15662
|
const {
|
|
15492
|
-
_e,
|
|
15493
15663
|
customStore
|
|
15494
|
-
} =
|
|
15664
|
+
} = props;
|
|
15495
15665
|
const {
|
|
15496
|
-
resizable: allResizable
|
|
15497
|
-
|
|
15498
|
-
|
|
15499
|
-
|
|
15500
|
-
|
|
15501
|
-
} =
|
|
15666
|
+
resizable: allResizable
|
|
15667
|
+
} = tableProps;
|
|
15668
|
+
const {
|
|
15669
|
+
isCustomStatus,
|
|
15670
|
+
customColumnList
|
|
15671
|
+
} = reactData;
|
|
15672
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
15502
15673
|
const {
|
|
15503
15674
|
mode,
|
|
15504
15675
|
modalOptions,
|
|
@@ -15510,6 +15681,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15510
15681
|
checkMethod,
|
|
15511
15682
|
visibleMethod
|
|
15512
15683
|
} = customOpts;
|
|
15684
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
15513
15685
|
const {
|
|
15514
15686
|
maxFixedSize
|
|
15515
15687
|
} = columnOpts;
|
|
@@ -15520,6 +15692,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15520
15692
|
} = resizableOpts;
|
|
15521
15693
|
const modalOpts = Object.assign({}, modalOptions);
|
|
15522
15694
|
const drawerOpts = Object.assign({}, drawerOptions);
|
|
15695
|
+
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
15523
15696
|
const slots = customOpts.slots || {};
|
|
15524
15697
|
const headerSlot = slots.header;
|
|
15525
15698
|
const topSlot = slots.top;
|
|
@@ -15529,12 +15702,14 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15529
15702
|
const trVNs = [];
|
|
15530
15703
|
const isAllChecked = customStore.isAll;
|
|
15531
15704
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
15705
|
+
const dragColumn = _vm.dragColumn;
|
|
15532
15706
|
const params = {
|
|
15533
15707
|
$table: $xeTable,
|
|
15534
15708
|
$grid: $xeTable.xegrid,
|
|
15535
15709
|
columns: customColumnList,
|
|
15536
15710
|
isAllChecked,
|
|
15537
|
-
isAllIndeterminate
|
|
15711
|
+
isAllIndeterminate,
|
|
15712
|
+
isCustomStatus
|
|
15538
15713
|
};
|
|
15539
15714
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
15540
15715
|
const isVisible = visibleMethod ? visibleMethod({
|
|
@@ -15600,7 +15775,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15600
15775
|
}
|
|
15601
15776
|
}, [h('span', {
|
|
15602
15777
|
class: ['vxe-checkbox--icon', isIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
15603
|
-
})])]) :
|
|
15778
|
+
})])]) : panel_renderEmptyElement($xeTable), allowSort ? h('td', {
|
|
15604
15779
|
class: 'vxe-table-custom-popup--column-item col--sort'
|
|
15605
15780
|
}, [column.level === 1 ? h('span', {
|
|
15606
15781
|
class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
@@ -15615,7 +15790,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15615
15790
|
}
|
|
15616
15791
|
}, [h('i', {
|
|
15617
15792
|
class: panel_getIcon().TABLE_CUSTOM_SORT
|
|
15618
|
-
})]) : h('span', '-')]) :
|
|
15793
|
+
})]) : h('span', '-')]) : panel_renderEmptyElement($xeTable), h('td', {
|
|
15619
15794
|
class: 'vxe-table-custom-popup--column-item col--name'
|
|
15620
15795
|
}, [column.type === 'html' ? h('div', {
|
|
15621
15796
|
key: '1',
|
|
@@ -15644,7 +15819,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15644
15819
|
column.renderResizeWidth = Math.max(0, Number(value));
|
|
15645
15820
|
}
|
|
15646
15821
|
}
|
|
15647
|
-
}) : panel_renderEmptyElement($xeTableCustomPanel)]) :
|
|
15822
|
+
}) : panel_renderEmptyElement($xeTableCustomPanel)]) : panel_renderEmptyElement($xeTable), allowFixed ? h('td', {
|
|
15648
15823
|
class: 'vxe-table-custom-popup--column-item col--fixed'
|
|
15649
15824
|
}, [parent ? h('span', '-') : h('vxe-radio-group', {
|
|
15650
15825
|
props: {
|
|
@@ -15671,7 +15846,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15671
15846
|
column.renderFixed = value;
|
|
15672
15847
|
}
|
|
15673
15848
|
}
|
|
15674
|
-
})]) :
|
|
15849
|
+
})]) : panel_renderEmptyElement($xeTable)]));
|
|
15675
15850
|
}
|
|
15676
15851
|
});
|
|
15677
15852
|
const scopedSlots = {
|
|
@@ -15688,15 +15863,15 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15688
15863
|
class: 'vxe-table-custom-popup--table-wrapper'
|
|
15689
15864
|
}, [h('table', {}, [h('colgroup', {}, [allowVisible ? h('col', {
|
|
15690
15865
|
class: 'vxe-table-custom-popup--table-col-seq'
|
|
15691
|
-
}) :
|
|
15866
|
+
}) : panel_renderEmptyElement($xeTable), allowSort ? h('col', {
|
|
15692
15867
|
class: 'vxe-table-custom-popup--table-col-sort'
|
|
15693
|
-
}) :
|
|
15868
|
+
}) : panel_renderEmptyElement($xeTable), h('col', {
|
|
15694
15869
|
class: 'vxe-table-custom-popup--table-col-title'
|
|
15695
15870
|
}), allowResizable ? h('col', {
|
|
15696
15871
|
class: 'vxe-table-custom-popup--table-col-width'
|
|
15697
|
-
}) :
|
|
15872
|
+
}) : panel_renderEmptyElement($xeTable), allowFixed ? h('col', {
|
|
15698
15873
|
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
15699
|
-
}) :
|
|
15874
|
+
}) : panel_renderEmptyElement($xeTable)]), h('thead', {}, [h('tr', {}, [allowVisible ? h('th', {}, [h('div', {
|
|
15700
15875
|
class: ['vxe-table-custom--checkbox-option', {
|
|
15701
15876
|
'is--checked': isAllChecked,
|
|
15702
15877
|
'is--indeterminate': isAllIndeterminate
|
|
@@ -15711,7 +15886,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15711
15886
|
class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
15712
15887
|
}), h('span', {
|
|
15713
15888
|
class: 'vxe-checkbox--label'
|
|
15714
|
-
}, panel_getI18n('vxe.toolbar.customAll'))])]) :
|
|
15889
|
+
}, panel_getI18n('vxe.toolbar.customAll'))])]) : panel_renderEmptyElement($xeTable), allowSort ? h('th', {}, [h('span', {
|
|
15715
15890
|
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
15716
15891
|
}, panel_getI18n('vxe.custom.setting.colSort')), VxeUITooltipComponent ? h(VxeUITooltipComponent, {
|
|
15717
15892
|
props: {
|
|
@@ -15726,7 +15901,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15726
15901
|
});
|
|
15727
15902
|
}
|
|
15728
15903
|
}
|
|
15729
|
-
}) : panel_renderEmptyElement($xeTableCustomPanel)]) :
|
|
15904
|
+
}) : 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', {
|
|
15730
15905
|
class: 'vxe-table-custom--panel-list',
|
|
15731
15906
|
props: {
|
|
15732
15907
|
tag: 'tbody',
|
|
@@ -15737,7 +15912,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15737
15912
|
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
15738
15913
|
ref: 'dragHintElemRef',
|
|
15739
15914
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
15740
|
-
}, panel_getI18n('vxe.custom.cstmDragTarget', [
|
|
15915
|
+
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragColumn ? dragColumn.getTitle() : '']))]);
|
|
15741
15916
|
},
|
|
15742
15917
|
footer: () => {
|
|
15743
15918
|
if (footerSlot) {
|
|
@@ -15747,7 +15922,8 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15747
15922
|
class: 'vxe-table-custom-popup--footer'
|
|
15748
15923
|
}, [h(VxeUIButtonComponent, {
|
|
15749
15924
|
props: {
|
|
15750
|
-
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmRestore')
|
|
15925
|
+
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmRestore'),
|
|
15926
|
+
disabled: !isCustomStatus
|
|
15751
15927
|
},
|
|
15752
15928
|
on: {
|
|
15753
15929
|
click: _vm.resetCustomEvent
|
|
@@ -21973,6 +22149,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
21973
22149
|
column.visible = column.renderVisible;
|
|
21974
22150
|
}
|
|
21975
22151
|
});
|
|
22152
|
+
reactData.isCustomStatus = true;
|
|
21976
22153
|
reactData.isDragColMove = true;
|
|
21977
22154
|
setTimeout(() => {
|
|
21978
22155
|
reactData.isDragColMove = false;
|
|
@@ -22021,10 +22198,13 @@ function validErrorRuleValue(rule, val) {
|
|
|
22021
22198
|
return $xeTable.$nextTick();
|
|
22022
22199
|
},
|
|
22023
22200
|
_resetCustom(options) {
|
|
22201
|
+
const $xeTable = this;
|
|
22202
|
+
const reactData = $xeTable;
|
|
22203
|
+
const internalData = $xeTable;
|
|
22024
22204
|
const {
|
|
22025
22205
|
collectColumn,
|
|
22026
22206
|
customOpts
|
|
22027
|
-
} =
|
|
22207
|
+
} = internalData;
|
|
22028
22208
|
const {
|
|
22029
22209
|
checkMethod
|
|
22030
22210
|
} = customOpts;
|
|
@@ -22051,8 +22231,9 @@ function validErrorRuleValue(rule, val) {
|
|
|
22051
22231
|
}
|
|
22052
22232
|
column.renderResizeWidth = column.renderWidth;
|
|
22053
22233
|
});
|
|
22054
|
-
|
|
22055
|
-
|
|
22234
|
+
reactData.isCustomStatus = false;
|
|
22235
|
+
$xeTable.saveCustomStore('reset');
|
|
22236
|
+
return $xeTable.handleCustom();
|
|
22056
22237
|
},
|
|
22057
22238
|
_toggleCustomAllCheckbox() {
|
|
22058
22239
|
const {
|
|
@@ -22212,6 +22393,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
22212
22393
|
|
|
22213
22394
|
const {
|
|
22214
22395
|
getConfig: table_getConfig,
|
|
22396
|
+
getIcon: table_getIcon,
|
|
22215
22397
|
getI18n: table_getI18n,
|
|
22216
22398
|
renderer: table_renderer,
|
|
22217
22399
|
globalResize: table_globalResize,
|
|
@@ -22325,21 +22507,41 @@ const renderDragTipContents = (h, $xeTable) => {
|
|
|
22325
22507
|
return [h('span', dragTipText)];
|
|
22326
22508
|
};
|
|
22327
22509
|
const renderDragTip = (h, $xeTable) => {
|
|
22510
|
+
const reactData = $xeTable;
|
|
22511
|
+
const {
|
|
22512
|
+
dragRow
|
|
22513
|
+
} = reactData;
|
|
22328
22514
|
const rowOpts = $xeTable.computeRowOpts;
|
|
22329
22515
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
22516
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
22517
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
22330
22518
|
if (rowOpts.drag || columnOpts.drag) {
|
|
22331
22519
|
return h('div', {
|
|
22332
22520
|
class: 'vxe-table--drag-wrapper'
|
|
22333
22521
|
}, [h('div', {
|
|
22334
22522
|
ref: 'refDragRowLineElem',
|
|
22335
|
-
class: 'vxe-table--drag-row-line'
|
|
22523
|
+
class: ['vxe-table--drag-row-line', {
|
|
22524
|
+
'is--guides': rowDragOpts.showGuidesStatus
|
|
22525
|
+
}]
|
|
22336
22526
|
}), h('div', {
|
|
22337
22527
|
ref: 'refDragColLineElem',
|
|
22338
|
-
class: 'vxe-table--drag-col-line'
|
|
22528
|
+
class: ['vxe-table--drag-col-line', {
|
|
22529
|
+
'is--guides': columnDragOpts.showGuidesStatus
|
|
22530
|
+
}]
|
|
22339
22531
|
}), h('div', {
|
|
22340
22532
|
ref: 'refDragTipElem',
|
|
22341
22533
|
class: 'vxe-table--drag-sort-tip'
|
|
22342
|
-
},
|
|
22534
|
+
}, [h('div', {
|
|
22535
|
+
class: 'vxe-table--drag-sort-tip-wrapper'
|
|
22536
|
+
}, [h('div', {
|
|
22537
|
+
class: 'vxe-table--drag-sort-tip-status'
|
|
22538
|
+
}, [h('span', {
|
|
22539
|
+
class: ['vxe-table--drag-sort-tip-normal-status', dragRow ? table_getIcon().TABLE_DRAG_STATUS_ROW : table_getIcon().TABLE_DRAG_STATUS_COLUMN]
|
|
22540
|
+
}), h('span', {
|
|
22541
|
+
class: ['vxe-table--drag-sort-tip-disabled-status', table_getIcon().TABLE_DRAG_DISABLED]
|
|
22542
|
+
})]), h('div', {
|
|
22543
|
+
class: 'vxe-table--drag-sort-tip-content'
|
|
22544
|
+
}, renderDragTipContents(h, $xeTable))])])]);
|
|
22343
22545
|
}
|
|
22344
22546
|
return table_renderEmptyElement($xeTable);
|
|
22345
22547
|
};
|
|
@@ -22589,6 +22791,7 @@ function handleUupdateResize(_vm) {
|
|
|
22589
22791
|
isFooter: false
|
|
22590
22792
|
},
|
|
22591
22793
|
scrollVMLoading: false,
|
|
22794
|
+
isCustomStatus: false,
|
|
22592
22795
|
isDragRowMove: false,
|
|
22593
22796
|
dragRow: null,
|
|
22594
22797
|
isDragColMove: false,
|
|
@@ -27056,6 +27259,8 @@ const Toolbar = VxeToolbar;
|
|
|
27056
27259
|
notExp: '该浏览器不支持导入/导出功能',
|
|
27057
27260
|
impFields: '导入失败,请检查字段名和数据格式是否正确',
|
|
27058
27261
|
treeNotImp: '树表格不支持导入',
|
|
27262
|
+
treeCrossDrag: '只能拖拽第一层级的数据',
|
|
27263
|
+
treeDragChild: '父级数据不能拖拽到子级中',
|
|
27059
27264
|
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
|
|
27060
27265
|
},
|
|
27061
27266
|
table: {
|