vxe-table 3.11.21 → 3.11.23
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.1733805838288.ttf} +0 -0
- package/es/iconfont.1733805838288.woff +0 -0
- package/es/iconfont.1733805838288.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/render/index.js +26 -6
- 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 +195 -48
- 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.1733805838288.ttf} +0 -0
- package/lib/iconfont.1733805838288.woff +0 -0
- package/lib/iconfont.1733805838288.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +369 -106
- 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/render/index.js +38 -6
- package/lib/table/render/index.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 +232 -51
- 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/render/index.ts +24 -5
- 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 +209 -50
- 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.23";
|
|
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.23"}`;
|
|
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
|
/**
|
|
@@ -10352,21 +10415,46 @@ const Methods = {
|
|
|
10352
10415
|
}, evnt);
|
|
10353
10416
|
}
|
|
10354
10417
|
},
|
|
10418
|
+
triggerCurrentColumnEvent(evnt, params) {
|
|
10419
|
+
const $xeTable = this;
|
|
10420
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
10421
|
+
const {
|
|
10422
|
+
currentMethod
|
|
10423
|
+
} = columnOpts;
|
|
10424
|
+
const {
|
|
10425
|
+
column
|
|
10426
|
+
} = params;
|
|
10427
|
+
if (!currentMethod || currentMethod({
|
|
10428
|
+
column
|
|
10429
|
+
})) {
|
|
10430
|
+
$xeTable.setCurrentColumn(column);
|
|
10431
|
+
}
|
|
10432
|
+
},
|
|
10355
10433
|
triggerCurrentRowEvent(evnt, params) {
|
|
10434
|
+
const $xeTable = this;
|
|
10435
|
+
const reactData = $xeTable;
|
|
10356
10436
|
const {
|
|
10357
10437
|
currentRow: oldValue
|
|
10358
|
-
} =
|
|
10438
|
+
} = reactData;
|
|
10439
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
10440
|
+
const {
|
|
10441
|
+
currentMethod
|
|
10442
|
+
} = rowOpts;
|
|
10359
10443
|
const {
|
|
10360
10444
|
row: newValue
|
|
10361
10445
|
} = params;
|
|
10362
10446
|
const isChange = oldValue !== newValue;
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10447
|
+
if (!currentMethod || currentMethod({
|
|
10448
|
+
row: newValue
|
|
10449
|
+
})) {
|
|
10450
|
+
$xeTable.setCurrentRow(newValue);
|
|
10451
|
+
if (isChange) {
|
|
10452
|
+
$xeTable.dispatchEvent('current-change', {
|
|
10453
|
+
oldValue,
|
|
10454
|
+
newValue,
|
|
10455
|
+
...params
|
|
10456
|
+
}, evnt);
|
|
10457
|
+
}
|
|
10370
10458
|
}
|
|
10371
10459
|
},
|
|
10372
10460
|
/**
|
|
@@ -10513,7 +10601,7 @@ const Methods = {
|
|
|
10513
10601
|
cell
|
|
10514
10602
|
}, params), evnt);
|
|
10515
10603
|
if (this.columnOpts.isCurrent || this.highlightCurrentColumn) {
|
|
10516
|
-
|
|
10604
|
+
this.triggerCurrentColumnEvent(evnt, params);
|
|
10517
10605
|
}
|
|
10518
10606
|
return this.$nextTick();
|
|
10519
10607
|
},
|
|
@@ -10774,20 +10862,26 @@ const Methods = {
|
|
|
10774
10862
|
} = props;
|
|
10775
10863
|
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
10776
10864
|
const {
|
|
10865
|
+
fullAllDataRowIdData
|
|
10866
|
+
} = internalData;
|
|
10867
|
+
const {
|
|
10868
|
+
isCrossDrag,
|
|
10869
|
+
isSelfToChildDrag,
|
|
10777
10870
|
dragEndMethod
|
|
10778
10871
|
} = rowDragOpts;
|
|
10779
10872
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
10780
10873
|
const {
|
|
10781
|
-
transform
|
|
10874
|
+
transform,
|
|
10875
|
+
mapChildrenField,
|
|
10876
|
+
parentField
|
|
10782
10877
|
} = treeOpts;
|
|
10878
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
10783
10879
|
const {
|
|
10784
10880
|
dragRow
|
|
10785
10881
|
} = reactData;
|
|
10786
10882
|
const {
|
|
10787
10883
|
afterFullData,
|
|
10788
|
-
afterTreeFullData,
|
|
10789
10884
|
tableFullData,
|
|
10790
|
-
tableFullTreeData,
|
|
10791
10885
|
prevDragRow,
|
|
10792
10886
|
prevDragPos
|
|
10793
10887
|
} = internalData;
|
|
@@ -10807,26 +10901,102 @@ const Methods = {
|
|
|
10807
10901
|
}
|
|
10808
10902
|
let oafIndex = -1;
|
|
10809
10903
|
let nafIndex = -1;
|
|
10904
|
+
// 如果为树结构
|
|
10810
10905
|
if (treeConfig) {
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10906
|
+
if (transform) {
|
|
10907
|
+
// 移出源位置
|
|
10908
|
+
const oldRowid = getRowid($xeTable, dragRow);
|
|
10909
|
+
const oldRest = fullAllDataRowIdData[oldRowid];
|
|
10910
|
+
const newRowid = getRowid($xeTable, prevDragRow);
|
|
10911
|
+
const newRest = fullAllDataRowIdData[newRowid];
|
|
10912
|
+
if (oldRest && newRest) {
|
|
10913
|
+
const {
|
|
10914
|
+
level: oldLevel
|
|
10915
|
+
} = oldRest;
|
|
10916
|
+
const {
|
|
10917
|
+
level: newLevel
|
|
10918
|
+
} = newRest;
|
|
10919
|
+
const oldAllMaps = {};
|
|
10920
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree([dragRow], item => {
|
|
10921
|
+
oldAllMaps[getRowid($xeTable, item)] = item;
|
|
10922
|
+
}, {
|
|
10923
|
+
children: mapChildrenField
|
|
10924
|
+
});
|
|
10925
|
+
let isSelfToChildStatus = false;
|
|
10926
|
+
if (oldLevel && newLevel) {
|
|
10927
|
+
// 子到子
|
|
10928
|
+
if (!isCrossDrag) {
|
|
10929
|
+
return;
|
|
10930
|
+
}
|
|
10931
|
+
if (oldAllMaps[newRowid]) {
|
|
10932
|
+
if (!isSelfToChildDrag) {
|
|
10933
|
+
isSelfToChildStatus = true;
|
|
10934
|
+
if (core_.VxeUI.modal) {
|
|
10935
|
+
core_.VxeUI.modal.message({
|
|
10936
|
+
status: 'error',
|
|
10937
|
+
content: methods_getI18n('vxe.error.treeDragChild')
|
|
10938
|
+
});
|
|
10939
|
+
}
|
|
10940
|
+
return;
|
|
10941
|
+
}
|
|
10942
|
+
}
|
|
10943
|
+
} else if (oldLevel) {
|
|
10944
|
+
// 子到根
|
|
10945
|
+
if (!isCrossDrag) {
|
|
10946
|
+
return;
|
|
10947
|
+
}
|
|
10948
|
+
} else if (newLevel) {
|
|
10949
|
+
// 根到子
|
|
10950
|
+
if (!isCrossDrag) {
|
|
10951
|
+
return;
|
|
10952
|
+
}
|
|
10953
|
+
if (oldAllMaps[newRowid]) {
|
|
10954
|
+
isSelfToChildStatus = true;
|
|
10955
|
+
if (!isSelfToChildDrag) {
|
|
10956
|
+
if (core_.VxeUI.modal) {
|
|
10957
|
+
core_.VxeUI.modal.message({
|
|
10958
|
+
status: 'error',
|
|
10959
|
+
content: methods_getI18n('vxe.error.treeDragChild')
|
|
10960
|
+
});
|
|
10961
|
+
}
|
|
10962
|
+
return;
|
|
10963
|
+
}
|
|
10964
|
+
}
|
|
10965
|
+
} else {
|
|
10966
|
+
// 根到根
|
|
10967
|
+
}
|
|
10968
|
+
const fullList = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toTreeArray(internalData.afterTreeFullData, {
|
|
10969
|
+
children: childrenField
|
|
10970
|
+
});
|
|
10971
|
+
// 移出
|
|
10972
|
+
const otfIndex = $xeTable.findRowIndexOf(fullList, dragRow);
|
|
10973
|
+
fullList.splice(otfIndex, 1);
|
|
10974
|
+
// 插入
|
|
10975
|
+
const ptfIndex = $xeTable.findRowIndexOf(fullList, prevDragRow);
|
|
10976
|
+
const ntfIndex = ptfIndex + dragOffsetIndex;
|
|
10977
|
+
fullList.splice(ntfIndex, 0, dragRow);
|
|
10978
|
+
// 改变层级
|
|
10979
|
+
if (isSelfToChildStatus && isSelfToChildDrag) {
|
|
10980
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(dragRow[childrenField], childRow => {
|
|
10981
|
+
childRow[parentField] = dragRow[parentField];
|
|
10982
|
+
});
|
|
10983
|
+
}
|
|
10984
|
+
dragRow[parentField] = prevDragRow[parentField];
|
|
10985
|
+
internalData.tableFullTreeData = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(fullList, {
|
|
10986
|
+
key: treeOpts.rowField,
|
|
10987
|
+
parentKey: treeOpts.parentField,
|
|
10988
|
+
children: childrenField,
|
|
10989
|
+
mapChildren: treeOpts.mapChildrenField
|
|
10990
|
+
});
|
|
10991
|
+
}
|
|
10992
|
+
}
|
|
10823
10993
|
} else {
|
|
10824
|
-
//
|
|
10994
|
+
// 移出
|
|
10825
10995
|
oafIndex = $xeTable.findRowIndexOf(afterFullData, dragRow);
|
|
10826
10996
|
const otfIndex = $xeTable.findRowIndexOf(tableFullData, dragRow);
|
|
10827
10997
|
afterFullData.splice(oafIndex, 1);
|
|
10828
10998
|
tableFullData.splice(otfIndex, 1);
|
|
10829
|
-
//
|
|
10999
|
+
// 插入
|
|
10830
11000
|
const pafIndex = $xeTable.findRowIndexOf(afterFullData, prevDragRow);
|
|
10831
11001
|
const ptfIndex = $xeTable.findRowIndexOf(tableFullData, prevDragRow);
|
|
10832
11002
|
nafIndex = pafIndex + dragOffsetIndex;
|
|
@@ -10835,9 +11005,9 @@ const Methods = {
|
|
|
10835
11005
|
tableFullData.splice(ntfIndex, 0, dragRow);
|
|
10836
11006
|
}
|
|
10837
11007
|
reactData.isDragRowMove = true;
|
|
10838
|
-
$xeTable.cacheRowMap();
|
|
10839
|
-
$xeTable.updateScrollYStatus();
|
|
10840
11008
|
$xeTable.handleTableData(treeConfig && transform);
|
|
11009
|
+
$xeTable.cacheRowMap(true);
|
|
11010
|
+
$xeTable.updateScrollYStatus();
|
|
10841
11011
|
if (!(treeConfig && transform)) {
|
|
10842
11012
|
$xeTable.updateAfterDataIndex();
|
|
10843
11013
|
}
|
|
@@ -10872,29 +11042,44 @@ const Methods = {
|
|
|
10872
11042
|
},
|
|
10873
11043
|
handleRowDragDragoverEvent(evnt) {
|
|
10874
11044
|
const $xeTable = this;
|
|
11045
|
+
const props = $xeTable;
|
|
10875
11046
|
const internalData = $xeTable;
|
|
10876
11047
|
const reactData = $xeTable;
|
|
11048
|
+
const {
|
|
11049
|
+
treeConfig
|
|
11050
|
+
} = props;
|
|
11051
|
+
const {
|
|
11052
|
+
fullAllDataRowIdData
|
|
11053
|
+
} = internalData;
|
|
10877
11054
|
const {
|
|
10878
11055
|
dragRow
|
|
10879
11056
|
} = reactData;
|
|
11057
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
11058
|
+
const {
|
|
11059
|
+
isCrossDrag
|
|
11060
|
+
} = rowDragOpts;
|
|
10880
11061
|
if (!dragRow) {
|
|
10881
11062
|
evnt.preventDefault();
|
|
10882
11063
|
return;
|
|
10883
11064
|
}
|
|
10884
11065
|
const trEl = evnt.currentTarget;
|
|
10885
|
-
const rowid = trEl.getAttribute('rowid');
|
|
10886
|
-
const
|
|
10887
|
-
if (
|
|
10888
|
-
|
|
11066
|
+
const rowid = trEl.getAttribute('rowid') || '';
|
|
11067
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
11068
|
+
if (rest) {
|
|
11069
|
+
const row = rest.row;
|
|
10889
11070
|
evnt.preventDefault();
|
|
10890
11071
|
const {
|
|
10891
11072
|
dragRow
|
|
10892
11073
|
} = reactData;
|
|
10893
11074
|
const offsetY = evnt.clientY - trEl.getBoundingClientRect().y;
|
|
10894
11075
|
const dragPos = offsetY < trEl.clientHeight / 2 ? 'top' : 'bottom';
|
|
11076
|
+
if ($xeTable.eqRow(dragRow, row) || !isCrossDrag && treeConfig && rest.level) {
|
|
11077
|
+
showDropTip($xeTable, evnt, trEl, null, false, dragPos);
|
|
11078
|
+
return;
|
|
11079
|
+
}
|
|
10895
11080
|
internalData.prevDragRow = row;
|
|
10896
11081
|
internalData.prevDragPos = dragPos;
|
|
10897
|
-
showDropTip($xeTable, evnt, trEl, null, dragPos);
|
|
11082
|
+
showDropTip($xeTable, evnt, trEl, null, true, dragPos);
|
|
10898
11083
|
$xeTable.dispatchEvent('row-dragover', {
|
|
10899
11084
|
oldRow: dragRow,
|
|
10900
11085
|
targetRow: row,
|
|
@@ -11063,9 +11248,13 @@ const Methods = {
|
|
|
11063
11248
|
} = reactData;
|
|
11064
11249
|
const offsetX = evnt.clientX - thEl.getBoundingClientRect().x;
|
|
11065
11250
|
const dragPos = offsetX < thEl.clientWidth / 2 ? 'left' : 'right';
|
|
11251
|
+
if (dragCol.id === column.id || column.parentId) {
|
|
11252
|
+
showDropTip($xeTable, evnt, null, thEl, false, dragPos);
|
|
11253
|
+
return;
|
|
11254
|
+
}
|
|
11066
11255
|
internalData.prevDragCol = column;
|
|
11067
11256
|
internalData.prevDragPos = dragPos;
|
|
11068
|
-
showDropTip($xeTable, evnt, null, thEl, dragPos);
|
|
11257
|
+
showDropTip($xeTable, evnt, null, thEl, true, dragPos);
|
|
11069
11258
|
$xeTable.dispatchEvent('column-dragover', {
|
|
11070
11259
|
oldColumn: dragCol,
|
|
11071
11260
|
targetColumn: column,
|
|
@@ -13573,12 +13762,12 @@ function renderRows(h, _vm, $xeTable, fixedType, tableData, tableColumn) {
|
|
|
13573
13762
|
if (editConfig) {
|
|
13574
13763
|
isNewRow = $xeTable.isInsertByRow(row);
|
|
13575
13764
|
}
|
|
13576
|
-
if (treeConfig && !scrollYLoad && !
|
|
13765
|
+
if (treeConfig && !scrollYLoad && !transform) {
|
|
13577
13766
|
rowChildren = row[childrenField];
|
|
13578
13767
|
isExpandTree = rowChildren && rowChildren.length && !!treeExpandedMaps[rowid];
|
|
13579
13768
|
}
|
|
13580
13769
|
// 拖拽行事件
|
|
13581
|
-
if (rowOpts.drag && !
|
|
13770
|
+
if (rowOpts.drag && (!treeConfig || transform)) {
|
|
13582
13771
|
trOn.dragstart = evnt => {
|
|
13583
13772
|
$xeTable.handleRowDragDragstartEvent(evnt);
|
|
13584
13773
|
};
|
|
@@ -14186,7 +14375,7 @@ const header_renderRows = (h, _vm, cols, $rowIndex) => {
|
|
|
14186
14375
|
thOns.mousedown = evnt => $xetable.triggerHeaderCellMousedownEvent(evnt, params);
|
|
14187
14376
|
}
|
|
14188
14377
|
// 拖拽行事件
|
|
14189
|
-
if (columnOpts.drag
|
|
14378
|
+
if (columnOpts.drag) {
|
|
14190
14379
|
thOns.dragstart = $xetable.handleHeaderCellDragDragstartEvent;
|
|
14191
14380
|
thOns.dragend = $xetable.handleHeaderCellDragDragendEvent;
|
|
14192
14381
|
thOns.dragover = $xetable.handleHeaderCellDragDragoverEvent;
|
|
@@ -15243,17 +15432,17 @@ function updateDropHint(_vm, evnt) {
|
|
|
15243
15432
|
}
|
|
15244
15433
|
const renderSimplePanel = (h, _vm) => {
|
|
15245
15434
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
15435
|
+
const props = _vm;
|
|
15246
15436
|
const $xeTable = _vm.$xeTable;
|
|
15437
|
+
const reactData = $xeTable;
|
|
15247
15438
|
const {
|
|
15248
|
-
|
|
15249
|
-
|
|
15250
|
-
dragColumn
|
|
15251
|
-
} = _vm;
|
|
15439
|
+
customStore
|
|
15440
|
+
} = props;
|
|
15252
15441
|
const {
|
|
15253
|
-
|
|
15254
|
-
|
|
15255
|
-
|
|
15256
|
-
|
|
15442
|
+
isCustomStatus,
|
|
15443
|
+
customColumnList
|
|
15444
|
+
} = reactData;
|
|
15445
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
15257
15446
|
const {
|
|
15258
15447
|
maxHeight
|
|
15259
15448
|
} = customStore;
|
|
@@ -15266,6 +15455,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15266
15455
|
trigger,
|
|
15267
15456
|
placement
|
|
15268
15457
|
} = customOpts;
|
|
15458
|
+
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
15269
15459
|
const slots = customOpts.slots || {};
|
|
15270
15460
|
const headerSlot = slots.header;
|
|
15271
15461
|
const topSlot = slots.top;
|
|
@@ -15274,19 +15464,21 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15274
15464
|
const footerSlot = slots.footer;
|
|
15275
15465
|
const colVNs = [];
|
|
15276
15466
|
const customWrapperOns = {};
|
|
15467
|
+
const isAllChecked = customStore.isAll;
|
|
15468
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
15469
|
+
const dragColumn = _vm.dragColumn;
|
|
15277
15470
|
// hover 触发
|
|
15278
15471
|
if (trigger === 'hover') {
|
|
15279
15472
|
customWrapperOns.mouseenter = _vm.handleWrapperMouseenterEvent;
|
|
15280
15473
|
customWrapperOns.mouseleave = _vm.handleWrapperMouseleaveEvent;
|
|
15281
15474
|
}
|
|
15282
|
-
const isAllChecked = customStore.isAll;
|
|
15283
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
15284
15475
|
const params = {
|
|
15285
15476
|
$table: $xeTable,
|
|
15286
15477
|
$grid: $xeTable.xegrid,
|
|
15287
15478
|
columns: customColumnList,
|
|
15288
15479
|
isAllChecked,
|
|
15289
|
-
isAllIndeterminate
|
|
15480
|
+
isAllIndeterminate,
|
|
15481
|
+
isCustomStatus
|
|
15290
15482
|
};
|
|
15291
15483
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
15292
15484
|
const isVisible = visibleMethod ? visibleMethod({
|
|
@@ -15333,7 +15525,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15333
15525
|
}
|
|
15334
15526
|
}, [h('span', {
|
|
15335
15527
|
class: ['vxe-checkbox--icon', isIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
15336
|
-
})]) :
|
|
15528
|
+
})]) : panel_renderEmptyElement($xeTable), allowSort && column.level === 1 ? h('div', {
|
|
15337
15529
|
class: 'vxe-table-custom--sort-option'
|
|
15338
15530
|
}, [h('span', {
|
|
15339
15531
|
class: ['vxe-table-custom--sort-btn', {
|
|
@@ -15348,7 +15540,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15348
15540
|
}
|
|
15349
15541
|
}, [h('i', {
|
|
15350
15542
|
class: panel_getIcon().TABLE_CUSTOM_SORT
|
|
15351
|
-
})])]) :
|
|
15543
|
+
})])]) : panel_renderEmptyElement($xeTable), column.type === 'html' ? h('div', {
|
|
15352
15544
|
key: '1',
|
|
15353
15545
|
class: 'vxe-table-custom--checkbox-label',
|
|
15354
15546
|
domProps: {
|
|
@@ -15388,7 +15580,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15388
15580
|
_vm.changeFixedOption(column, 'right');
|
|
15389
15581
|
}
|
|
15390
15582
|
}
|
|
15391
|
-
})]) :
|
|
15583
|
+
})]) : panel_renderEmptyElement($xeTable)]));
|
|
15392
15584
|
}
|
|
15393
15585
|
});
|
|
15394
15586
|
return h('div', {
|
|
@@ -15448,7 +15640,8 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15448
15640
|
}, [h(VxeUIButtonComponent, {
|
|
15449
15641
|
props: {
|
|
15450
15642
|
mode: 'text',
|
|
15451
|
-
content: customOpts.resetButtonText || panel_getI18n('vxe.table.customRestore')
|
|
15643
|
+
content: customOpts.resetButtonText || panel_getI18n('vxe.table.customRestore'),
|
|
15644
|
+
disabled: !isCustomStatus
|
|
15452
15645
|
},
|
|
15453
15646
|
on: {
|
|
15454
15647
|
click: _vm.resetCustomEvent
|
|
@@ -15469,7 +15662,7 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
15469
15662
|
on: {
|
|
15470
15663
|
click: _vm.cancelCustomEvent
|
|
15471
15664
|
}
|
|
15472
|
-
}), customOpts.immediate ?
|
|
15665
|
+
}), customOpts.immediate ? panel_renderEmptyElement($xeTable) : h(VxeUIButtonComponent, {
|
|
15473
15666
|
props: {
|
|
15474
15667
|
mode: 'text',
|
|
15475
15668
|
status: 'primary',
|
|
@@ -15487,18 +15680,21 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15487
15680
|
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeInput');
|
|
15488
15681
|
const VxeUITooltipComponent = core_.VxeUI.getComponent('VxeTooltip');
|
|
15489
15682
|
const $xeTableCustomPanel = _vm;
|
|
15683
|
+
const props = _vm;
|
|
15490
15684
|
const $xeTable = _vm.$xeTable;
|
|
15685
|
+
const tableProps = $xeTable;
|
|
15686
|
+
const reactData = $xeTable;
|
|
15491
15687
|
const {
|
|
15492
|
-
_e,
|
|
15493
15688
|
customStore
|
|
15494
|
-
} =
|
|
15689
|
+
} = props;
|
|
15495
15690
|
const {
|
|
15496
|
-
resizable: allResizable
|
|
15497
|
-
|
|
15498
|
-
|
|
15499
|
-
|
|
15500
|
-
|
|
15501
|
-
} =
|
|
15691
|
+
resizable: allResizable
|
|
15692
|
+
} = tableProps;
|
|
15693
|
+
const {
|
|
15694
|
+
isCustomStatus,
|
|
15695
|
+
customColumnList
|
|
15696
|
+
} = reactData;
|
|
15697
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
15502
15698
|
const {
|
|
15503
15699
|
mode,
|
|
15504
15700
|
modalOptions,
|
|
@@ -15510,6 +15706,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15510
15706
|
checkMethod,
|
|
15511
15707
|
visibleMethod
|
|
15512
15708
|
} = customOpts;
|
|
15709
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
15513
15710
|
const {
|
|
15514
15711
|
maxFixedSize
|
|
15515
15712
|
} = columnOpts;
|
|
@@ -15520,6 +15717,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15520
15717
|
} = resizableOpts;
|
|
15521
15718
|
const modalOpts = Object.assign({}, modalOptions);
|
|
15522
15719
|
const drawerOpts = Object.assign({}, drawerOptions);
|
|
15720
|
+
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
15523
15721
|
const slots = customOpts.slots || {};
|
|
15524
15722
|
const headerSlot = slots.header;
|
|
15525
15723
|
const topSlot = slots.top;
|
|
@@ -15529,12 +15727,14 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15529
15727
|
const trVNs = [];
|
|
15530
15728
|
const isAllChecked = customStore.isAll;
|
|
15531
15729
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
15730
|
+
const dragColumn = _vm.dragColumn;
|
|
15532
15731
|
const params = {
|
|
15533
15732
|
$table: $xeTable,
|
|
15534
15733
|
$grid: $xeTable.xegrid,
|
|
15535
15734
|
columns: customColumnList,
|
|
15536
15735
|
isAllChecked,
|
|
15537
|
-
isAllIndeterminate
|
|
15736
|
+
isAllIndeterminate,
|
|
15737
|
+
isCustomStatus
|
|
15538
15738
|
};
|
|
15539
15739
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
15540
15740
|
const isVisible = visibleMethod ? visibleMethod({
|
|
@@ -15600,7 +15800,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15600
15800
|
}
|
|
15601
15801
|
}, [h('span', {
|
|
15602
15802
|
class: ['vxe-checkbox--icon', isIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
15603
|
-
})])]) :
|
|
15803
|
+
})])]) : panel_renderEmptyElement($xeTable), allowSort ? h('td', {
|
|
15604
15804
|
class: 'vxe-table-custom-popup--column-item col--sort'
|
|
15605
15805
|
}, [column.level === 1 ? h('span', {
|
|
15606
15806
|
class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
@@ -15615,7 +15815,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15615
15815
|
}
|
|
15616
15816
|
}, [h('i', {
|
|
15617
15817
|
class: panel_getIcon().TABLE_CUSTOM_SORT
|
|
15618
|
-
})]) : h('span', '-')]) :
|
|
15818
|
+
})]) : h('span', '-')]) : panel_renderEmptyElement($xeTable), h('td', {
|
|
15619
15819
|
class: 'vxe-table-custom-popup--column-item col--name'
|
|
15620
15820
|
}, [column.type === 'html' ? h('div', {
|
|
15621
15821
|
key: '1',
|
|
@@ -15644,7 +15844,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15644
15844
|
column.renderResizeWidth = Math.max(0, Number(value));
|
|
15645
15845
|
}
|
|
15646
15846
|
}
|
|
15647
|
-
}) : panel_renderEmptyElement($xeTableCustomPanel)]) :
|
|
15847
|
+
}) : panel_renderEmptyElement($xeTableCustomPanel)]) : panel_renderEmptyElement($xeTable), allowFixed ? h('td', {
|
|
15648
15848
|
class: 'vxe-table-custom-popup--column-item col--fixed'
|
|
15649
15849
|
}, [parent ? h('span', '-') : h('vxe-radio-group', {
|
|
15650
15850
|
props: {
|
|
@@ -15671,7 +15871,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15671
15871
|
column.renderFixed = value;
|
|
15672
15872
|
}
|
|
15673
15873
|
}
|
|
15674
|
-
})]) :
|
|
15874
|
+
})]) : panel_renderEmptyElement($xeTable)]));
|
|
15675
15875
|
}
|
|
15676
15876
|
});
|
|
15677
15877
|
const scopedSlots = {
|
|
@@ -15688,15 +15888,15 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15688
15888
|
class: 'vxe-table-custom-popup--table-wrapper'
|
|
15689
15889
|
}, [h('table', {}, [h('colgroup', {}, [allowVisible ? h('col', {
|
|
15690
15890
|
class: 'vxe-table-custom-popup--table-col-seq'
|
|
15691
|
-
}) :
|
|
15891
|
+
}) : panel_renderEmptyElement($xeTable), allowSort ? h('col', {
|
|
15692
15892
|
class: 'vxe-table-custom-popup--table-col-sort'
|
|
15693
|
-
}) :
|
|
15893
|
+
}) : panel_renderEmptyElement($xeTable), h('col', {
|
|
15694
15894
|
class: 'vxe-table-custom-popup--table-col-title'
|
|
15695
15895
|
}), allowResizable ? h('col', {
|
|
15696
15896
|
class: 'vxe-table-custom-popup--table-col-width'
|
|
15697
|
-
}) :
|
|
15897
|
+
}) : panel_renderEmptyElement($xeTable), allowFixed ? h('col', {
|
|
15698
15898
|
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
15699
|
-
}) :
|
|
15899
|
+
}) : panel_renderEmptyElement($xeTable)]), h('thead', {}, [h('tr', {}, [allowVisible ? h('th', {}, [h('div', {
|
|
15700
15900
|
class: ['vxe-table-custom--checkbox-option', {
|
|
15701
15901
|
'is--checked': isAllChecked,
|
|
15702
15902
|
'is--indeterminate': isAllIndeterminate
|
|
@@ -15711,7 +15911,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15711
15911
|
class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
15712
15912
|
}), h('span', {
|
|
15713
15913
|
class: 'vxe-checkbox--label'
|
|
15714
|
-
}, panel_getI18n('vxe.toolbar.customAll'))])]) :
|
|
15914
|
+
}, panel_getI18n('vxe.toolbar.customAll'))])]) : panel_renderEmptyElement($xeTable), allowSort ? h('th', {}, [h('span', {
|
|
15715
15915
|
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
15716
15916
|
}, panel_getI18n('vxe.custom.setting.colSort')), VxeUITooltipComponent ? h(VxeUITooltipComponent, {
|
|
15717
15917
|
props: {
|
|
@@ -15726,7 +15926,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15726
15926
|
});
|
|
15727
15927
|
}
|
|
15728
15928
|
}
|
|
15729
|
-
}) : panel_renderEmptyElement($xeTableCustomPanel)]) :
|
|
15929
|
+
}) : 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
15930
|
class: 'vxe-table-custom--panel-list',
|
|
15731
15931
|
props: {
|
|
15732
15932
|
tag: 'tbody',
|
|
@@ -15737,7 +15937,7 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15737
15937
|
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
15738
15938
|
ref: 'dragHintElemRef',
|
|
15739
15939
|
class: 'vxe-table-custom-popup--drag-hint'
|
|
15740
|
-
}, panel_getI18n('vxe.custom.cstmDragTarget', [
|
|
15940
|
+
}, panel_getI18n('vxe.custom.cstmDragTarget', [dragColumn ? dragColumn.getTitle() : '']))]);
|
|
15741
15941
|
},
|
|
15742
15942
|
footer: () => {
|
|
15743
15943
|
if (footerSlot) {
|
|
@@ -15747,7 +15947,8 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
15747
15947
|
class: 'vxe-table-custom-popup--footer'
|
|
15748
15948
|
}, [h(VxeUIButtonComponent, {
|
|
15749
15949
|
props: {
|
|
15750
|
-
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmRestore')
|
|
15950
|
+
content: customOpts.resetButtonText || panel_getI18n('vxe.custom.cstmRestore'),
|
|
15951
|
+
disabled: !isCustomStatus
|
|
15751
15952
|
},
|
|
15752
15953
|
on: {
|
|
15753
15954
|
click: _vm.resetCustomEvent
|
|
@@ -21973,6 +22174,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
21973
22174
|
column.visible = column.renderVisible;
|
|
21974
22175
|
}
|
|
21975
22176
|
});
|
|
22177
|
+
reactData.isCustomStatus = true;
|
|
21976
22178
|
reactData.isDragColMove = true;
|
|
21977
22179
|
setTimeout(() => {
|
|
21978
22180
|
reactData.isDragColMove = false;
|
|
@@ -22021,10 +22223,13 @@ function validErrorRuleValue(rule, val) {
|
|
|
22021
22223
|
return $xeTable.$nextTick();
|
|
22022
22224
|
},
|
|
22023
22225
|
_resetCustom(options) {
|
|
22226
|
+
const $xeTable = this;
|
|
22227
|
+
const reactData = $xeTable;
|
|
22228
|
+
const internalData = $xeTable;
|
|
22024
22229
|
const {
|
|
22025
22230
|
collectColumn,
|
|
22026
22231
|
customOpts
|
|
22027
|
-
} =
|
|
22232
|
+
} = internalData;
|
|
22028
22233
|
const {
|
|
22029
22234
|
checkMethod
|
|
22030
22235
|
} = customOpts;
|
|
@@ -22051,8 +22256,9 @@ function validErrorRuleValue(rule, val) {
|
|
|
22051
22256
|
}
|
|
22052
22257
|
column.renderResizeWidth = column.renderWidth;
|
|
22053
22258
|
});
|
|
22054
|
-
|
|
22055
|
-
|
|
22259
|
+
reactData.isCustomStatus = false;
|
|
22260
|
+
$xeTable.saveCustomStore('reset');
|
|
22261
|
+
return $xeTable.handleCustom();
|
|
22056
22262
|
},
|
|
22057
22263
|
_toggleCustomAllCheckbox() {
|
|
22058
22264
|
const {
|
|
@@ -22212,6 +22418,7 @@ function validErrorRuleValue(rule, val) {
|
|
|
22212
22418
|
|
|
22213
22419
|
const {
|
|
22214
22420
|
getConfig: table_getConfig,
|
|
22421
|
+
getIcon: table_getIcon,
|
|
22215
22422
|
getI18n: table_getI18n,
|
|
22216
22423
|
renderer: table_renderer,
|
|
22217
22424
|
globalResize: table_globalResize,
|
|
@@ -22325,21 +22532,41 @@ const renderDragTipContents = (h, $xeTable) => {
|
|
|
22325
22532
|
return [h('span', dragTipText)];
|
|
22326
22533
|
};
|
|
22327
22534
|
const renderDragTip = (h, $xeTable) => {
|
|
22535
|
+
const reactData = $xeTable;
|
|
22536
|
+
const {
|
|
22537
|
+
dragRow
|
|
22538
|
+
} = reactData;
|
|
22328
22539
|
const rowOpts = $xeTable.computeRowOpts;
|
|
22329
22540
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
22541
|
+
const rowDragOpts = $xeTable.computeRowDragOpts;
|
|
22542
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
22330
22543
|
if (rowOpts.drag || columnOpts.drag) {
|
|
22331
22544
|
return h('div', {
|
|
22332
22545
|
class: 'vxe-table--drag-wrapper'
|
|
22333
22546
|
}, [h('div', {
|
|
22334
22547
|
ref: 'refDragRowLineElem',
|
|
22335
|
-
class: 'vxe-table--drag-row-line'
|
|
22548
|
+
class: ['vxe-table--drag-row-line', {
|
|
22549
|
+
'is--guides': rowDragOpts.showGuidesStatus
|
|
22550
|
+
}]
|
|
22336
22551
|
}), h('div', {
|
|
22337
22552
|
ref: 'refDragColLineElem',
|
|
22338
|
-
class: 'vxe-table--drag-col-line'
|
|
22553
|
+
class: ['vxe-table--drag-col-line', {
|
|
22554
|
+
'is--guides': columnDragOpts.showGuidesStatus
|
|
22555
|
+
}]
|
|
22339
22556
|
}), h('div', {
|
|
22340
22557
|
ref: 'refDragTipElem',
|
|
22341
22558
|
class: 'vxe-table--drag-sort-tip'
|
|
22342
|
-
},
|
|
22559
|
+
}, [h('div', {
|
|
22560
|
+
class: 'vxe-table--drag-sort-tip-wrapper'
|
|
22561
|
+
}, [h('div', {
|
|
22562
|
+
class: 'vxe-table--drag-sort-tip-status'
|
|
22563
|
+
}, [h('span', {
|
|
22564
|
+
class: ['vxe-table--drag-sort-tip-normal-status', dragRow ? table_getIcon().TABLE_DRAG_STATUS_ROW : table_getIcon().TABLE_DRAG_STATUS_COLUMN]
|
|
22565
|
+
}), h('span', {
|
|
22566
|
+
class: ['vxe-table--drag-sort-tip-disabled-status', table_getIcon().TABLE_DRAG_DISABLED]
|
|
22567
|
+
})]), h('div', {
|
|
22568
|
+
class: 'vxe-table--drag-sort-tip-content'
|
|
22569
|
+
}, renderDragTipContents(h, $xeTable))])])]);
|
|
22343
22570
|
}
|
|
22344
22571
|
return table_renderEmptyElement($xeTable);
|
|
22345
22572
|
};
|
|
@@ -22589,6 +22816,7 @@ function handleUupdateResize(_vm) {
|
|
|
22589
22816
|
isFooter: false
|
|
22590
22817
|
},
|
|
22591
22818
|
scrollVMLoading: false,
|
|
22819
|
+
isCustomStatus: false,
|
|
22592
22820
|
isDragRowMove: false,
|
|
22593
22821
|
dragRow: null,
|
|
22594
22822
|
isDragColMove: false,
|
|
@@ -26660,17 +26888,50 @@ render_renderer.mixin({
|
|
|
26660
26888
|
row,
|
|
26661
26889
|
column
|
|
26662
26890
|
} = params;
|
|
26663
|
-
const
|
|
26891
|
+
const {
|
|
26892
|
+
type
|
|
26893
|
+
} = props;
|
|
26664
26894
|
let cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
26665
26895
|
if (cellValue) {
|
|
26666
|
-
|
|
26667
|
-
|
|
26668
|
-
|
|
26669
|
-
|
|
26896
|
+
if (type === 'float') {
|
|
26897
|
+
const digits = props.digits || render_getConfig().numberInput.digits || 1;
|
|
26898
|
+
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(cellValue, digits), digits);
|
|
26899
|
+
} else if (type === 'amount') {
|
|
26900
|
+
const digits = props.digits || render_getConfig().numberInput.digits || 2;
|
|
26901
|
+
cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue), {
|
|
26902
|
+
digits
|
|
26903
|
+
});
|
|
26670
26904
|
}
|
|
26671
26905
|
}
|
|
26672
26906
|
return getCellLabelVNs(h, renderOpts, params, cellValue);
|
|
26673
26907
|
},
|
|
26908
|
+
renderTableFooter(h, renderOpts, params) {
|
|
26909
|
+
const {
|
|
26910
|
+
props = {}
|
|
26911
|
+
} = renderOpts;
|
|
26912
|
+
const {
|
|
26913
|
+
row,
|
|
26914
|
+
column,
|
|
26915
|
+
_columnIndex
|
|
26916
|
+
} = params;
|
|
26917
|
+
const {
|
|
26918
|
+
type
|
|
26919
|
+
} = props;
|
|
26920
|
+
// 兼容老模式
|
|
26921
|
+
const cellValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(row) ? row[_columnIndex] : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(row, column.field);
|
|
26922
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(cellValue)) {
|
|
26923
|
+
if (type === 'float') {
|
|
26924
|
+
const digits = props.digits || render_getConfig().numberInput.digits || 1;
|
|
26925
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toFixed(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor(cellValue, digits), digits);
|
|
26926
|
+
} else if (type === 'amount') {
|
|
26927
|
+
const digits = props.digits || render_getConfig().numberInput.digits || 2;
|
|
26928
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().commafy(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellValue), {
|
|
26929
|
+
digits
|
|
26930
|
+
});
|
|
26931
|
+
}
|
|
26932
|
+
}
|
|
26933
|
+
return getFuncText(cellValue, 1);
|
|
26934
|
+
},
|
|
26674
26935
|
renderTableDefault: defaultEditRender,
|
|
26675
26936
|
renderTableFilter: defaultFilterRender,
|
|
26676
26937
|
tableFilterDefaultMethod: handleInputFilterMethod
|
|
@@ -27056,6 +27317,8 @@ const Toolbar = VxeToolbar;
|
|
|
27056
27317
|
notExp: '该浏览器不支持导入/导出功能',
|
|
27057
27318
|
impFields: '导入失败,请检查字段名和数据格式是否正确',
|
|
27058
27319
|
treeNotImp: '树表格不支持导入',
|
|
27320
|
+
treeCrossDrag: '只能拖拽第一层级的数据',
|
|
27321
|
+
treeDragChild: '父级数据不能拖拽到自己的子级中',
|
|
27059
27322
|
reqPlugin: '可选扩展插件 "{1}" https://vxeui.com/other{0}/#/{1}/install'
|
|
27060
27323
|
},
|
|
27061
27324
|
table: {
|