vxe-table 3.11.19 → 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.1733392637838.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 +47 -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 +10 -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.1733392637838.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 +306 -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 +52 -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 +10 -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 +51 -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 +9 -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.1733392637838.woff +0 -0
- package/es/iconfont.1733392637838.woff2 +0 -0
- package/lib/iconfont.1733392637838.woff +0 -0
- package/lib/iconfont.1733392637838.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({
|
|
@@ -2304,6 +2304,12 @@ core_.VxeUI.setConfig({
|
|
|
2304
2304
|
lockView: true,
|
|
2305
2305
|
resize: true,
|
|
2306
2306
|
escClosable: true
|
|
2307
|
+
},
|
|
2308
|
+
drawerOptions: {
|
|
2309
|
+
mask: true,
|
|
2310
|
+
lockView: true,
|
|
2311
|
+
escClosable: true,
|
|
2312
|
+
resize: true
|
|
2307
2313
|
}
|
|
2308
2314
|
},
|
|
2309
2315
|
sortConfig: {
|
|
@@ -2462,6 +2468,9 @@ core_.VxeUI.setIcon({
|
|
|
2462
2468
|
TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
|
|
2463
2469
|
TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
|
|
2464
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',
|
|
2465
2474
|
// toolbar
|
|
2466
2475
|
TOOLBAR_TOOLS_REFRESH: iconPrefix + 'repeat',
|
|
2467
2476
|
TOOLBAR_TOOLS_REFRESH_LOADING: iconPrefix + 'repeat roll',
|
|
@@ -2779,7 +2788,7 @@ function isNodeElement(elem) {
|
|
|
2779
2788
|
const {
|
|
2780
2789
|
log: log_log
|
|
2781
2790
|
} = core_.VxeUI;
|
|
2782
|
-
const log_version = `table v${"3.11.
|
|
2791
|
+
const log_version = `table v${"3.11.22"}`;
|
|
2783
2792
|
const warnLog = log_log.create('warn', log_version);
|
|
2784
2793
|
const errLog = log_log.create('error', log_version);
|
|
2785
2794
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -3593,12 +3602,17 @@ function renderCellBaseVNs(h, params, content) {
|
|
|
3593
3602
|
const rowDragOpts = $table.computeRowDragOpts;
|
|
3594
3603
|
const {
|
|
3595
3604
|
showIcon,
|
|
3605
|
+
isCrossDrag,
|
|
3596
3606
|
visibleMethod
|
|
3597
3607
|
} = rowDragOpts;
|
|
3598
3608
|
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
|
|
3599
3609
|
const vns = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(content) ? content : [content];
|
|
3600
3610
|
if (dragSort && rowOpts.drag && (showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params))) {
|
|
3601
|
-
if (
|
|
3611
|
+
if (treeConfig) {
|
|
3612
|
+
if (isCrossDrag || !level) {
|
|
3613
|
+
vns.unshift(renderCellDragIcon(h, params));
|
|
3614
|
+
}
|
|
3615
|
+
} else {
|
|
3602
3616
|
vns.unshift(renderCellDragIcon(h, params));
|
|
3603
3617
|
}
|
|
3604
3618
|
}
|
|
@@ -5334,7 +5348,7 @@ const updateColDropTipContent = ($xeTable, tdEl) => {
|
|
|
5334
5348
|
}
|
|
5335
5349
|
reactData.dragTipText = tipContent;
|
|
5336
5350
|
};
|
|
5337
|
-
function showDropTip($xeTable, evnt, trEl, thEl, dragPos) {
|
|
5351
|
+
function showDropTip($xeTable, evnt, trEl, thEl, showLine, dragPos) {
|
|
5338
5352
|
const reactData = $xeTable;
|
|
5339
5353
|
const el = $xeTable.$refs.refElem;
|
|
5340
5354
|
if (!el) {
|
|
@@ -5348,26 +5362,30 @@ function showDropTip($xeTable, evnt, trEl, thEl, dragPos) {
|
|
|
5348
5362
|
if (trEl) {
|
|
5349
5363
|
const rdLineEl = $xeTable.$refs.refDragRowLineElem;
|
|
5350
5364
|
if (rdLineEl) {
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
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 = '';
|
|
5355
5374
|
}
|
|
5356
|
-
rdLineEl.style.top = `${top}px`;
|
|
5357
|
-
rdLineEl.style.width = `${wrapperRect.width - scrollbarWidth}px`;
|
|
5358
|
-
rdLineEl.style.display = 'block';
|
|
5359
5375
|
}
|
|
5360
5376
|
} else if (thEl) {
|
|
5361
5377
|
const cdLineEl = $xeTable.$refs.refDragColLineElem;
|
|
5362
5378
|
if (cdLineEl) {
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
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 = '';
|
|
5367
5388
|
}
|
|
5368
|
-
cdLineEl.style.left = `${left}px`;
|
|
5369
|
-
cdLineEl.style.height = `${wrapperRect.height - scrollbarHeight}px`;
|
|
5370
|
-
cdLineEl.style.display = 'block';
|
|
5371
5389
|
}
|
|
5372
5390
|
}
|
|
5373
5391
|
const rdTipEl = $xeTable.$refs.refDragTipElem;
|
|
@@ -5375,6 +5393,7 @@ function showDropTip($xeTable, evnt, trEl, thEl, dragPos) {
|
|
|
5375
5393
|
rdTipEl.style.display = 'block';
|
|
5376
5394
|
rdTipEl.style.top = `${Math.min(el.clientHeight - el.scrollTop - rdTipEl.clientHeight, evnt.clientY - wrapperRect.y)}px`;
|
|
5377
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');
|
|
5378
5397
|
}
|
|
5379
5398
|
}
|
|
5380
5399
|
const hideDropTip = $xeTable => {
|
|
@@ -5926,6 +5945,7 @@ const Methods = {
|
|
|
5926
5945
|
};
|
|
5927
5946
|
}
|
|
5928
5947
|
if (isSource) {
|
|
5948
|
+
cacheItem.level = level;
|
|
5929
5949
|
cacheItem.index = treeConfig && parent ? -1 : index;
|
|
5930
5950
|
fullDataRowIdMaps[rowid] = cacheItem;
|
|
5931
5951
|
}
|
|
@@ -6729,6 +6749,17 @@ const Methods = {
|
|
|
6729
6749
|
tableColumn: this.tableColumn.slice(0)
|
|
6730
6750
|
};
|
|
6731
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
|
+
},
|
|
6732
6763
|
/**
|
|
6733
6764
|
* 获取数据,和 data 的行为一致,也可以指定索引获取数据
|
|
6734
6765
|
*/
|
|
@@ -7259,6 +7290,38 @@ const Methods = {
|
|
|
7259
7290
|
footerData: footerTableData.slice(0)
|
|
7260
7291
|
};
|
|
7261
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
|
+
},
|
|
7262
7325
|
/**
|
|
7263
7326
|
* 处理数据加载默认行为
|
|
7264
7327
|
* 默认执行一次,除非被重置
|
|
@@ -7460,9 +7523,12 @@ const Methods = {
|
|
|
7460
7523
|
return this.refreshColumn(true);
|
|
7461
7524
|
},
|
|
7462
7525
|
handleCustomRestore(storeData) {
|
|
7526
|
+
const $xetable = this;
|
|
7527
|
+
const reactData = $xetable;
|
|
7528
|
+
const internalData = $xetable;
|
|
7463
7529
|
let {
|
|
7464
7530
|
collectColumn
|
|
7465
|
-
} =
|
|
7531
|
+
} = internalData;
|
|
7466
7532
|
const {
|
|
7467
7533
|
resizableData,
|
|
7468
7534
|
sortData,
|
|
@@ -7494,9 +7560,12 @@ const Methods = {
|
|
|
7494
7560
|
// 如果自定义了顺序
|
|
7495
7561
|
if (hasCustomSort) {
|
|
7496
7562
|
collectColumn = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(collectColumn, 'renderSortNumber');
|
|
7497
|
-
|
|
7498
|
-
|
|
7563
|
+
internalData.collectColumn = collectColumn;
|
|
7564
|
+
internalData.tableFullColumn = getColumnList(collectColumn);
|
|
7499
7565
|
}
|
|
7566
|
+
reactData.isCustomStatus = true;
|
|
7567
|
+
} else {
|
|
7568
|
+
reactData.isCustomStatus = false;
|
|
7500
7569
|
}
|
|
7501
7570
|
},
|
|
7502
7571
|
/**
|
|
@@ -10768,20 +10837,26 @@ const Methods = {
|
|
|
10768
10837
|
} = props;
|
|
10769
10838
|
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
10770
10839
|
const {
|
|
10840
|
+
fullAllDataRowIdData
|
|
10841
|
+
} = internalData;
|
|
10842
|
+
const {
|
|
10843
|
+
isCrossDrag,
|
|
10844
|
+
isSelfToChildDrag,
|
|
10771
10845
|
dragEndMethod
|
|
10772
10846
|
} = rowDragOpts;
|
|
10773
10847
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
10774
10848
|
const {
|
|
10775
|
-
transform
|
|
10849
|
+
transform,
|
|
10850
|
+
mapChildrenField,
|
|
10851
|
+
parentField
|
|
10776
10852
|
} = treeOpts;
|
|
10853
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
10777
10854
|
const {
|
|
10778
10855
|
dragRow
|
|
10779
10856
|
} = reactData;
|
|
10780
10857
|
const {
|
|
10781
10858
|
afterFullData,
|
|
10782
|
-
afterTreeFullData,
|
|
10783
10859
|
tableFullData,
|
|
10784
|
-
tableFullTreeData,
|
|
10785
10860
|
prevDragRow,
|
|
10786
10861
|
prevDragPos
|
|
10787
10862
|
} = internalData;
|
|
@@ -10801,26 +10876,102 @@ const Methods = {
|
|
|
10801
10876
|
}
|
|
10802
10877
|
let oafIndex = -1;
|
|
10803
10878
|
let nafIndex = -1;
|
|
10879
|
+
// 如果为树结构
|
|
10804
10880
|
if (treeConfig) {
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
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
|
+
}
|
|
10817
10968
|
} else {
|
|
10818
|
-
//
|
|
10969
|
+
// 移出
|
|
10819
10970
|
oafIndex = $xeTable.findRowIndexOf(afterFullData, dragRow);
|
|
10820
10971
|
const otfIndex = $xeTable.findRowIndexOf(tableFullData, dragRow);
|
|
10821
10972
|
afterFullData.splice(oafIndex, 1);
|
|
10822
10973
|
tableFullData.splice(otfIndex, 1);
|
|
10823
|
-
//
|
|
10974
|
+
// 插入
|
|
10824
10975
|
const pafIndex = $xeTable.findRowIndexOf(afterFullData, prevDragRow);
|
|
10825
10976
|
const ptfIndex = $xeTable.findRowIndexOf(tableFullData, prevDragRow);
|
|
10826
10977
|
nafIndex = pafIndex + dragOffsetIndex;
|
|
@@ -10829,9 +10980,9 @@ const Methods = {
|
|
|
10829
10980
|
tableFullData.splice(ntfIndex, 0, dragRow);
|
|
10830
10981
|
}
|
|
10831
10982
|
reactData.isDragRowMove = true;
|
|
10832
|
-
$xeTable.cacheRowMap();
|
|
10833
|
-
$xeTable.updateScrollYStatus();
|
|
10834
10983
|
$xeTable.handleTableData(treeConfig && transform);
|
|
10984
|
+
$xeTable.cacheRowMap(true);
|
|
10985
|
+
$xeTable.updateScrollYStatus();
|
|
10835
10986
|
if (!(treeConfig && transform)) {
|
|
10836
10987
|
$xeTable.updateAfterDataIndex();
|
|
10837
10988
|
}
|
|
@@ -10866,29 +11017,44 @@ const Methods = {
|
|
|
10866
11017
|
},
|
|
10867
11018
|
handleRowDragDragoverEvent(evnt) {
|
|
10868
11019
|
const $xeTable = this;
|
|
11020
|
+
const props = $xeTable;
|
|
10869
11021
|
const internalData = $xeTable;
|
|
10870
11022
|
const reactData = $xeTable;
|
|
11023
|
+
const {
|
|
11024
|
+
treeConfig
|
|
11025
|
+
} = props;
|
|
11026
|
+
const {
|
|
11027
|
+
fullAllDataRowIdData
|
|
11028
|
+
} = internalData;
|
|
10871
11029
|
const {
|
|
10872
11030
|
dragRow
|
|
10873
11031
|
} = reactData;
|
|
11032
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
11033
|
+
const {
|
|
11034
|
+
isCrossDrag
|
|
11035
|
+
} = rowDragOpts;
|
|
10874
11036
|
if (!dragRow) {
|
|
10875
11037
|
evnt.preventDefault();
|
|
10876
11038
|
return;
|
|
10877
11039
|
}
|
|
10878
11040
|
const trEl = evnt.currentTarget;
|
|
10879
|
-
const rowid = trEl.getAttribute('rowid');
|
|
10880
|
-
const
|
|
10881
|
-
if (
|
|
10882
|
-
|
|
11041
|
+
const rowid = trEl.getAttribute('rowid') || '';
|
|
11042
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
11043
|
+
if (rest) {
|
|
11044
|
+
const row = rest.row;
|
|
10883
11045
|
evnt.preventDefault();
|
|
10884
11046
|
const {
|
|
10885
11047
|
dragRow
|
|
10886
11048
|
} = reactData;
|
|
10887
11049
|
const offsetY = evnt.clientY - trEl.getBoundingClientRect().y;
|
|
10888
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
|
+
}
|
|
10889
11055
|
internalData.prevDragRow = row;
|
|
10890
11056
|
internalData.prevDragPos = dragPos;
|
|
10891
|
-
showDropTip($xeTable, evnt, trEl, null, dragPos);
|
|
11057
|
+
showDropTip($xeTable, evnt, trEl, null, true, dragPos);
|
|
10892
11058
|
$xeTable.dispatchEvent('row-dragover', {
|
|
10893
11059
|
oldRow: dragRow,
|
|
10894
11060
|
targetRow: row,
|
|
@@ -11057,9 +11223,13 @@ const Methods = {
|
|
|
11057
11223
|
} = reactData;
|
|
11058
11224
|
const offsetX = evnt.clientX - thEl.getBoundingClientRect().x;
|
|
11059
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
|
+
}
|
|
11060
11230
|
internalData.prevDragCol = column;
|
|
11061
11231
|
internalData.prevDragPos = dragPos;
|
|
11062
|
-
showDropTip($xeTable, evnt, null, thEl, dragPos);
|
|
11232
|
+
showDropTip($xeTable, evnt, null, thEl, true, dragPos);
|
|
11063
11233
|
$xeTable.dispatchEvent('column-dragover', {
|
|
11064
11234
|
oldColumn: dragCol,
|
|
11065
11235
|
targetColumn: column,
|
|
@@ -13567,12 +13737,12 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
13567
13737
|
if (editConfig) {
|
|
13568
13738
|
isNewRow = $xeTable.isInsertByRow(row);
|
|
13569
13739
|
}
|
|
13570
|
-
if (treeConfig && !scrollYLoad && !
|
|
13740
|
+
if (treeConfig && !scrollYLoad && !transform) {
|
|
13571
13741
|
rowChildren = row[childrenField];
|
|
13572
13742
|
isExpandTree = rowChildren && rowChildren.length && !!treeExpandedMaps[rowid];
|
|
13573
13743
|
}
|
|
13574
13744
|
// 拖拽行事件
|
|
13575
|
-
if (rowOpts.drag && !
|
|
13745
|
+
if (rowOpts.drag && (!treeConfig || transform)) {
|
|
13576
13746
|
trOn.dragstart = evnt => {
|
|
13577
13747
|
$xeTable.handleRowDragDragstartEvent(evnt);
|
|
13578
13748
|
};
|
|
@@ -14180,7 +14350,7 @@ const header_renderRows = (h, _vm, cols, $rowIndex) => {
|
|
|
14180
14350
|
thOns.mousedown = evnt => $xetable.triggerHeaderCellMousedownEvent(evnt, params);
|
|
14181
14351
|
}
|
|
14182
14352
|
// 拖拽行事件
|
|
14183
|
-
if (columnOpts.drag
|
|
14353
|
+
if (columnOpts.drag) {
|
|
14184
14354
|
thOns.dragstart = $xetable.handleHeaderCellDragDragstartEvent;
|
|
14185
14355
|
thOns.dragend = $xetable.handleHeaderCellDragDragendEvent;
|
|
14186
14356
|
thOns.dragover = $xetable.handleHeaderCellDragDragoverEvent;
|
|
@@ -15237,17 +15407,17 @@ function updateDropHint(_vm, evnt) {
|
|
|
15237
15407
|
}
|
|
15238
15408
|
const renderSimplePanel = (h, _vm) => {
|
|
15239
15409
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
15410
|
+
const props = _vm;
|
|
15240
15411
|
const $xeTable = _vm.$xeTable;
|
|
15412
|
+
const reactData = $xeTable;
|
|
15241
15413
|
const {
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
dragColumn
|
|
15245
|
-
} = _vm;
|
|
15414
|
+
customStore
|
|
15415
|
+
} = props;
|
|
15246
15416
|
const {
|
|
15247
|
-
|
|
15248
|
-
|
|
15249
|
-
|
|
15250
|
-
|
|
15417
|
+
isCustomStatus,
|
|
15418
|
+
customColumnList
|
|
15419
|
+
} = reactData;
|
|
15420
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
15251
15421
|
const {
|
|
15252
15422
|
maxHeight
|
|
15253
15423
|
} = customStore;
|
|
@@ -15260,6 +15430,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15260
15430
|
trigger,
|
|
15261
15431
|
placement
|
|
15262
15432
|
} = customOpts;
|
|
15433
|
+
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
15263
15434
|
const slots = customOpts.slots || {};
|
|
15264
15435
|
const headerSlot = slots.header;
|
|
15265
15436
|
const topSlot = slots.top;
|
|
@@ -15268,19 +15439,21 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15268
15439
|
const footerSlot = slots.footer;
|
|
15269
15440
|
const colVNs = [];
|
|
15270
15441
|
const customWrapperOns = {};
|
|
15442
|
+
const isAllChecked = customStore.isAll;
|
|
15443
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
15444
|
+
const dragColumn = _vm.dragColumn;
|
|
15271
15445
|
// hover 触发
|
|
15272
15446
|
if (trigger === 'hover') {
|
|
15273
15447
|
customWrapperOns.mouseenter = _vm.handleWrapperMouseenterEvent;
|
|
15274
15448
|
customWrapperOns.mouseleave = _vm.handleWrapperMouseleaveEvent;
|
|
15275
15449
|
}
|
|
15276
|
-
const isAllChecked = customStore.isAll;
|
|
15277
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
15278
15450
|
const params = {
|
|
15279
15451
|
$table: $xeTable,
|
|
15280
15452
|
$grid: $xeTable.xegrid,
|
|
15281
15453
|
columns: customColumnList,
|
|
15282
15454
|
isAllChecked,
|
|
15283
|
-
isAllIndeterminate
|
|
15455
|
+
isAllIndeterminate,
|
|
15456
|
+
isCustomStatus
|
|
15284
15457
|
};
|
|
15285
15458
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
15286
15459
|
const isVisible = visibleMethod ? visibleMethod({
|
|
@@ -15327,7 +15500,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15327
15500
|
}
|
|
15328
15501
|
}, [h('span', {
|
|
15329
15502
|
class: ['vxe-checkbox--icon', isIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
15330
|
-
})]) :
|
|
15503
|
+
})]) : panel_renderEmptyElement($xeTable), allowSort && column.level === 1 ? h('div', {
|
|
15331
15504
|
class: 'vxe-table-custom--sort-option'
|
|
15332
15505
|
}, [h('span', {
|
|
15333
15506
|
class: ['vxe-table-custom--sort-btn', {
|
|
@@ -15342,7 +15515,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15342
15515
|
}
|
|
15343
15516
|
}, [h('i', {
|
|
15344
15517
|
class: panel_getIcon().TABLE_CUSTOM_SORT
|
|
15345
|
-
})])]) :
|
|
15518
|
+
})])]) : panel_renderEmptyElement($xeTable), column.type === 'html' ? h('div', {
|
|
15346
15519
|
key: '1',
|
|
15347
15520
|
class: 'vxe-table-custom--checkbox-label',
|
|
15348
15521
|
domProps: {
|
|
@@ -15382,7 +15555,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15382
15555
|
_vm.changeFixedOption(column, 'right');
|
|
15383
15556
|
}
|
|
15384
15557
|
}
|
|
15385
|
-
})]) :
|
|
15558
|
+
})]) : panel_renderEmptyElement($xeTable)]));
|
|
15386
15559
|
}
|
|
15387
15560
|
});
|
|
15388
15561
|
return h('div', {
|
|
@@ -15442,7 +15615,8 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15442
15615
|
}, [h(VxeUIButtonComponent, {
|
|
15443
15616
|
props: {
|
|
15444
15617
|
mode: 'text',
|
|
15445
|
-
content: customOpts.resetButtonText || panel_getI18n('vxe.table.customRestore')
|
|
15618
|
+
content: customOpts.resetButtonText || panel_getI18n('vxe.table.customRestore'),
|
|
15619
|
+
disabled: !isCustomStatus
|
|
15446
15620
|
},
|
|
15447
15621
|
on: {
|
|
15448
15622
|
click: _vm.resetCustomEvent
|
|
@@ -15463,7 +15637,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15463
15637
|
on: {
|
|
15464
15638
|
click: _vm.cancelCustomEvent
|
|
15465
15639
|
}
|
|
15466
|
-
}), customOpts.immediate ?
|
|
15640
|
+
}), customOpts.immediate ? panel_renderEmptyElement($xeTable) : h(VxeUIButtonComponent, {
|
|
15467
15641
|
props: {
|
|
15468
15642
|
mode: 'text',
|
|
15469
15643
|
status: 'primary',
|
|
@@ -15481,18 +15655,21 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15481
15655
|
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeInput');
|
|
15482
15656
|
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
15483
15657
|
const $xeTableCustomPanel = _vm;
|
|
15658
|
+
const props = _vm;
|
|
15484
15659
|
const $xeTable = _vm.$xeTable;
|
|
15660
|
+
const tableProps = $xeTable;
|
|
15661
|
+
const reactData = $xeTable;
|
|
15485
15662
|
const {
|
|
15486
|
-
_e,
|
|
15487
15663
|
customStore
|
|
15488
|
-
} =
|
|
15664
|
+
} = props;
|
|
15489
15665
|
const {
|
|
15490
|
-
resizable: allResizable
|
|
15491
|
-
|
|
15492
|
-
|
|
15493
|
-
|
|
15494
|
-
|
|
15495
|
-
} =
|
|
15666
|
+
resizable: allResizable
|
|
15667
|
+
} = tableProps;
|
|
15668
|
+
const {
|
|
15669
|
+
isCustomStatus,
|
|
15670
|
+
customColumnList
|
|
15671
|
+
} = reactData;
|
|
15672
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
15496
15673
|
const {
|
|
15497
15674
|
mode,
|
|
15498
15675
|
modalOptions,
|
|
@@ -15504,6 +15681,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15504
15681
|
checkMethod,
|
|
15505
15682
|
visibleMethod
|
|
15506
15683
|
} = customOpts;
|
|
15684
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
15507
15685
|
const {
|
|
15508
15686
|
maxFixedSize
|
|
15509
15687
|
} = columnOpts;
|
|
@@ -15514,6 +15692,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15514
15692
|
} = resizableOpts;
|
|
15515
15693
|
const modalOpts = Object.assign({}, modalOptions);
|
|
15516
15694
|
const drawerOpts = Object.assign({}, drawerOptions);
|
|
15695
|
+
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
15517
15696
|
const slots = customOpts.slots || {};
|
|
15518
15697
|
const headerSlot = slots.header;
|
|
15519
15698
|
const topSlot = slots.top;
|
|
@@ -15523,12 +15702,14 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15523
15702
|
const trVNs = [];
|
|
15524
15703
|
const isAllChecked = customStore.isAll;
|
|
15525
15704
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
15705
|
+
const dragColumn = _vm.dragColumn;
|
|
15526
15706
|
const params = {
|
|
15527
15707
|
$table: $xeTable,
|
|
15528
15708
|
$grid: $xeTable.xegrid,
|
|
15529
15709
|
columns: customColumnList,
|
|
15530
15710
|
isAllChecked,
|
|
15531
|
-
isAllIndeterminate
|
|
15711
|
+
isAllIndeterminate,
|
|
15712
|
+
isCustomStatus
|
|
15532
15713
|
};
|
|
15533
15714
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
15534
15715
|
const isVisible = visibleMethod ? visibleMethod({
|
|
@@ -15594,7 +15775,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15594
15775
|
}
|
|
15595
15776
|
}, [h('span', {
|
|
15596
15777
|
class: ['vxe-checkbox--icon', isIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
15597
|
-
})])]) :
|
|
15778
|
+
})])]) : panel_renderEmptyElement($xeTable), allowSort ? h('td', {
|
|
15598
15779
|
class: 'vxe-table-custom-popup--column-item col--sort'
|
|
15599
15780
|
}, [column.level === 1 ? h('span', {
|
|
15600
15781
|
class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
@@ -15609,7 +15790,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15609
15790
|
}
|
|
15610
15791
|
}, [h('i', {
|
|
15611
15792
|
class: panel_getIcon().TABLE_CUSTOM_SORT
|
|
15612
|
-
})]) : h('span', '-')]) :
|
|
15793
|
+
})]) : h('span', '-')]) : panel_renderEmptyElement($xeTable), h('td', {
|
|
15613
15794
|
class: 'vxe-table-custom-popup--column-item col--name'
|
|
15614
15795
|
}, [column.type === 'html' ? h('div', {
|
|
15615
15796
|
key: '1',
|
|
@@ -15638,7 +15819,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15638
15819
|
column.renderResizeWidth = Math.max(0, Number(value));
|
|
15639
15820
|
}
|
|
15640
15821
|
}
|
|
15641
|
-
}) : panel_renderEmptyElement($xeTableCustomPanel)]) :
|
|
15822
|
+
}) : panel_renderEmptyElement($xeTableCustomPanel)]) : panel_renderEmptyElement($xeTable), allowFixed ? h('td', {
|
|
15642
15823
|
class: 'vxe-table-custom-popup--column-item col--fixed'
|
|
15643
15824
|
}, [parent ? h('span', '-') : h('vxe-radio-group', {
|
|
15644
15825
|
props: {
|
|
@@ -15665,7 +15846,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15665
15846
|
column.renderFixed = value;
|
|
15666
15847
|
}
|
|
15667
15848
|
}
|
|
15668
|
-
})]) :
|
|
15849
|
+
})]) : panel_renderEmptyElement($xeTable)]));
|
|
15669
15850
|
}
|
|
15670
15851
|
});
|
|
15671
15852
|
const scopedSlots = {
|
|
@@ -15682,15 +15863,15 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15682
15863
|
class: 'vxe-table-custom-popup--table-wrapper'
|
|
15683
15864
|
}, [h('table', {}, [h('colgroup', {}, [allowVisible ? h('col', {
|
|
15684
15865
|
class: 'vxe-table-custom-popup--table-col-seq'
|
|
15685
|
-
}) :
|
|
15866
|
+
}) : panel_renderEmptyElement($xeTable), allowSort ? h('col', {
|
|
15686
15867
|
class: 'vxe-table-custom-popup--table-col-sort'
|
|
15687
|
-
}) :
|
|
15868
|
+
}) : panel_renderEmptyElement($xeTable), h('col', {
|
|
15688
15869
|
class: 'vxe-table-custom-popup--table-col-title'
|
|
15689
15870
|
}), allowResizable ? h('col', {
|
|
15690
15871
|
class: 'vxe-table-custom-popup--table-col-width'
|
|
15691
|
-
}) :
|
|
15872
|
+
}) : panel_renderEmptyElement($xeTable), allowFixed ? h('col', {
|
|
15692
15873
|
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
15693
|
-
}) :
|
|
15874
|
+
}) : panel_renderEmptyElement($xeTable)]), h('thead', {}, [h('tr', {}, [allowVisible ? h('th', {}, [h('div', {
|
|
15694
15875
|
class: ['vxe-table-custom--checkbox-option', {
|
|
15695
15876
|
'is--checked': isAllChecked,
|
|
15696
15877
|
'is--indeterminate': isAllIndeterminate
|
|
@@ -15705,7 +15886,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15705
15886
|
class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
15706
15887
|
}), h('span', {
|
|
15707
15888
|
class: 'vxe-checkbox--label'
|
|
15708
|
-
}, panel_getI18n('vxe.toolbar.customAll'))])]) :
|
|
15889
|
+
}, panel_getI18n('vxe.toolbar.customAll'))])]) : panel_renderEmptyElement($xeTable), allowSort ? h('th', {}, [h('span', {
|
|
15709
15890
|
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
15710
15891
|
}, panel_getI18n('vxe.custom.setting.colSort')), VxeUITooltipComponent ? h(VxeUITooltipComponent, {
|
|
15711
15892
|
props: {
|
|
@@ -15720,7 +15901,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15720
15901
|
});
|
|
15721
15902
|
}
|
|
15722
15903
|
}
|
|
15723
|
-
}) : 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', {
|
|
15724
15905
|
class: 'vxe-table-custom--panel-list',
|
|
15725
15906
|
props: {
|
|
15726
15907
|
tag: 'tbody',
|
|
@@ -15731,7 +15912,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15731
15912
|
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
15732
15913
|
ref: 'dragHintElemRef',
|
|
15733
15914
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
15734
|
-
}, panel_getI18n('vxe.custom.cstmDragTarget', [
|
|
15915
|
+
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragColumn ? dragColumn.getTitle() : '']))]);
|
|
15735
15916
|
},
|
|
15736
15917
|
footer: () => {
|
|
15737
15918
|
if (footerSlot) {
|
|
@@ -15741,7 +15922,8 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15741
15922
|
class: 'vxe-table-custom-popup--footer'
|
|
15742
15923
|
}, [h(VxeUIButtonComponent, {
|
|
15743
15924
|
props: {
|
|
15744
|
-
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmRestore')
|
|
15925
|
+
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmRestore'),
|
|
15926
|
+
disabled: !isCustomStatus
|
|
15745
15927
|
},
|
|
15746
15928
|
on: {
|
|
15747
15929
|
click: _vm.resetCustomEvent
|
|
@@ -15776,7 +15958,9 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15776
15958
|
title: drawerOpts.title || panel_getI18n('vxe.custom.cstmTitle'),
|
|
15777
15959
|
width: drawerOpts.width || Math.min(880, Math.floor(document.documentElement.clientWidth * 0.6)),
|
|
15778
15960
|
position: drawerOpts.position,
|
|
15961
|
+
resize: !!drawerOpts.resize,
|
|
15779
15962
|
escClosable: !!drawerOpts.escClosable,
|
|
15963
|
+
maskClosable: !!drawerOpts.maskClosable,
|
|
15780
15964
|
destroyOnClose: true,
|
|
15781
15965
|
showFooter: true
|
|
15782
15966
|
},
|
|
@@ -15805,6 +15989,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15805
15989
|
lockView: modalOpts.lockView,
|
|
15806
15990
|
resize: modalOpts.resize,
|
|
15807
15991
|
escClosable: !!modalOpts.escClosable,
|
|
15992
|
+
maskClosable: !!modalOpts.maskClosable,
|
|
15808
15993
|
destroyOnClose: true,
|
|
15809
15994
|
showFooter: true
|
|
15810
15995
|
},
|
|
@@ -21964,6 +22149,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
21964
22149
|
column.visible = column.renderVisible;
|
|
21965
22150
|
}
|
|
21966
22151
|
});
|
|
22152
|
+
reactData.isCustomStatus = true;
|
|
21967
22153
|
reactData.isDragColMove = true;
|
|
21968
22154
|
setTimeout(() => {
|
|
21969
22155
|
reactData.isDragColMove = false;
|
|
@@ -22012,10 +22198,13 @@ function validErrorRuleValue(rule, val) {
|
|
|
22012
22198
|
return $xeTable.$nextTick();
|
|
22013
22199
|
},
|
|
22014
22200
|
_resetCustom(options) {
|
|
22201
|
+
const $xeTable = this;
|
|
22202
|
+
const reactData = $xeTable;
|
|
22203
|
+
const internalData = $xeTable;
|
|
22015
22204
|
const {
|
|
22016
22205
|
collectColumn,
|
|
22017
22206
|
customOpts
|
|
22018
|
-
} =
|
|
22207
|
+
} = internalData;
|
|
22019
22208
|
const {
|
|
22020
22209
|
checkMethod
|
|
22021
22210
|
} = customOpts;
|
|
@@ -22042,8 +22231,9 @@ function validErrorRuleValue(rule, val) {
|
|
|
22042
22231
|
}
|
|
22043
22232
|
column.renderResizeWidth = column.renderWidth;
|
|
22044
22233
|
});
|
|
22045
|
-
|
|
22046
|
-
|
|
22234
|
+
reactData.isCustomStatus = false;
|
|
22235
|
+
$xeTable.saveCustomStore('reset');
|
|
22236
|
+
return $xeTable.handleCustom();
|
|
22047
22237
|
},
|
|
22048
22238
|
_toggleCustomAllCheckbox() {
|
|
22049
22239
|
const {
|
|
@@ -22203,6 +22393,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
22203
22393
|
|
|
22204
22394
|
const {
|
|
22205
22395
|
getConfig: table_getConfig,
|
|
22396
|
+
getIcon: table_getIcon,
|
|
22206
22397
|
getI18n: table_getI18n,
|
|
22207
22398
|
renderer: table_renderer,
|
|
22208
22399
|
globalResize: table_globalResize,
|
|
@@ -22316,21 +22507,41 @@ const renderDragTipContents = (h, $xeTable) => {
|
|
|
22316
22507
|
return [h('span', dragTipText)];
|
|
22317
22508
|
};
|
|
22318
22509
|
const renderDragTip = (h, $xeTable) => {
|
|
22510
|
+
const reactData = $xeTable;
|
|
22511
|
+
const {
|
|
22512
|
+
dragRow
|
|
22513
|
+
} = reactData;
|
|
22319
22514
|
const rowOpts = $xeTable.computeRowOpts;
|
|
22320
22515
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
22516
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
22517
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
22321
22518
|
if (rowOpts.drag || columnOpts.drag) {
|
|
22322
22519
|
return h('div', {
|
|
22323
22520
|
class: 'vxe-table--drag-wrapper'
|
|
22324
22521
|
}, [h('div', {
|
|
22325
22522
|
ref: 'refDragRowLineElem',
|
|
22326
|
-
class: 'vxe-table--drag-row-line'
|
|
22523
|
+
class: ['vxe-table--drag-row-line', {
|
|
22524
|
+
'is--guides': rowDragOpts.showGuidesStatus
|
|
22525
|
+
}]
|
|
22327
22526
|
}), h('div', {
|
|
22328
22527
|
ref: 'refDragColLineElem',
|
|
22329
|
-
class: 'vxe-table--drag-col-line'
|
|
22528
|
+
class: ['vxe-table--drag-col-line', {
|
|
22529
|
+
'is--guides': columnDragOpts.showGuidesStatus
|
|
22530
|
+
}]
|
|
22330
22531
|
}), h('div', {
|
|
22331
22532
|
ref: 'refDragTipElem',
|
|
22332
22533
|
class: 'vxe-table--drag-sort-tip'
|
|
22333
|
-
},
|
|
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))])])]);
|
|
22334
22545
|
}
|
|
22335
22546
|
return table_renderEmptyElement($xeTable);
|
|
22336
22547
|
};
|
|
@@ -22580,6 +22791,7 @@ function handleUupdateResize(_vm) {
|
|
|
22580
22791
|
isFooter: false
|
|
22581
22792
|
},
|
|
22582
22793
|
scrollVMLoading: false,
|
|
22794
|
+
isCustomStatus: false,
|
|
22583
22795
|
isDragRowMove: false,
|
|
22584
22796
|
dragRow: null,
|
|
22585
22797
|
isDragColMove: false,
|
|
@@ -27047,6 +27259,8 @@ const Toolbar = VxeToolbar;
|
|
|
27047
27259
|
notExp: '该浏览器不支持导入/导出功能',
|
|
27048
27260
|
impFields: '导入失败,请检查字段名和数据格式是否正确',
|
|
27049
27261
|
treeNotImp: '树表格不支持导入',
|
|
27262
|
+
treeCrossDrag: '只能拖拽第一层级的数据',
|
|
27263
|
+
treeDragChild: '父级数据不能拖拽到子级中',
|
|
27050
27264
|
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
|
|
27051
27265
|
},
|
|
27052
27266
|
table: {
|