vxe-table 4.13.17 → 4.13.19
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/locale/lang/ar-EG.js +1 -1
- package/es/locale/lang/de-DE.js +1 -1
- package/es/locale/lang/en-US.js +1 -1
- package/es/locale/lang/es-ES.js +1 -1
- package/es/locale/lang/fr-FR.d.ts +2 -0
- package/es/locale/lang/fr-FR.js +1 -1
- package/es/locale/lang/hu-HU.js +1 -1
- package/es/locale/lang/hy-AM.d.ts +2 -0
- package/es/locale/lang/hy-AM.js +1 -1
- package/es/locale/lang/id-ID.d.ts +2 -0
- package/es/locale/lang/id-ID.js +1 -1
- package/es/locale/lang/it-IT.d.ts +2 -0
- package/es/locale/lang/it-IT.js +1 -1
- package/es/locale/lang/ja-JP.js +1 -1
- package/es/locale/lang/ko-KR.js +1 -1
- package/es/locale/lang/ms-MY.d.ts +2 -0
- package/es/locale/lang/ms-MY.js +708 -0
- package/es/locale/lang/nb-NO.d.ts +2 -0
- package/es/locale/lang/nb-NO.js +1 -1
- package/es/locale/lang/pt-BR.js +1 -1
- package/es/locale/lang/ru-RU.js +1 -1
- package/es/locale/lang/th-TH.d.ts +2 -0
- package/es/locale/lang/th-TH.js +1 -1
- package/es/locale/lang/ug-CN.d.ts +2 -0
- package/es/locale/lang/ug-CN.js +1 -1
- package/es/locale/lang/uk-UA.js +1 -1
- package/es/locale/lang/uz-UZ.d.ts +2 -0
- package/es/locale/lang/uz-UZ.js +708 -0
- package/es/locale/lang/vi-VN.d.ts +2 -0
- package/es/locale/lang/vi-VN.js +1 -1
- package/es/locale/lang/zh-CHT.d.ts +2 -0
- package/es/locale/lang/zh-CHT.js +1 -1
- package/es/locale/lang/zh-CN.js +1 -1
- package/es/style.css +1 -1
- package/es/table/module/custom/panel.js +1 -1
- package/es/table/module/filter/hook.js +8 -0
- package/es/table/render/index.js +21 -15
- package/es/table/src/body.js +2 -1
- package/es/table/src/table.js +52 -50
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +40 -29
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.d.ts +2 -0
- package/lib/locale/lang/ar-EG.js +1 -1
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +728 -0
- package/lib/locale/lang/de-DE.d.ts +2 -0
- package/lib/locale/lang/de-DE.js +1 -1
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +728 -0
- package/lib/locale/lang/en-US.js +1 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -1
- package/lib/locale/lang/es-ES.js +1 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -1
- package/lib/locale/lang/fr-FR.d.ts +2 -0
- package/lib/locale/lang/fr-FR.js +1 -1
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +728 -0
- package/lib/locale/lang/hu-HU.js +1 -1
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -1
- package/lib/locale/lang/hy-AM.d.ts +2 -0
- package/lib/locale/lang/hy-AM.js +1 -1
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +728 -0
- package/lib/locale/lang/id-ID.d.ts +2 -0
- package/lib/locale/lang/id-ID.js +1 -1
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +728 -0
- package/lib/locale/lang/it-IT.d.ts +2 -0
- package/lib/locale/lang/it-IT.js +1 -1
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +728 -0
- package/lib/locale/lang/ja-JP.js +1 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -1
- package/lib/locale/lang/ko-KR.js +1 -1
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -1
- package/lib/locale/lang/ms-MY.d.ts +2 -0
- package/lib/locale/lang/ms-MY.js +714 -0
- package/lib/locale/lang/ms-MY.min.js +1 -0
- package/lib/locale/lang/ms-MY.umd.js +728 -0
- package/lib/locale/lang/nb-NO.d.ts +2 -0
- package/lib/locale/lang/nb-NO.js +1 -1
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +728 -0
- package/lib/locale/lang/pt-BR.js +1 -1
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -1
- package/lib/locale/lang/ru-RU.js +1 -1
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +1 -1
- package/lib/locale/lang/th-TH.d.ts +2 -0
- package/lib/locale/lang/th-TH.js +1 -1
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +728 -0
- package/lib/locale/lang/ug-CN.d.ts +2 -0
- package/lib/locale/lang/ug-CN.js +1 -1
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +728 -0
- package/lib/locale/lang/uk-UA.js +1 -1
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -1
- package/lib/locale/lang/uz-UZ.d.ts +2 -0
- package/lib/locale/lang/uz-UZ.js +714 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -0
- package/lib/locale/lang/uz-UZ.umd.js +728 -0
- package/lib/locale/lang/vi-VN.d.ts +2 -0
- package/lib/locale/lang/vi-VN.js +1 -1
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +728 -0
- package/lib/locale/lang/zh-CHT.d.ts +2 -0
- package/lib/locale/lang/zh-CHT.js +1 -1
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +728 -0
- package/lib/locale/lang/zh-CN.js +1 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -1
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/panel.js +1 -1
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/filter/hook.js +8 -0
- package/lib/table/module/filter/hook.min.js +1 -1
- package/lib/table/render/index.js +21 -15
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +2 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/table.js +5 -9
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -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/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +1 -1
- package/packages/locale/lang/de-DE.ts +1 -1
- package/packages/locale/lang/en-US.ts +1 -1
- package/packages/locale/lang/es-ES.ts +1 -1
- package/packages/locale/lang/fr-FR.ts +1 -1
- package/packages/locale/lang/hu-HU.ts +1 -1
- package/packages/locale/lang/hy-AM.ts +1 -1
- package/packages/locale/lang/id-ID.ts +1 -1
- package/packages/locale/lang/it-IT.ts +1 -1
- package/packages/locale/lang/ja-JP.ts +1 -1
- package/packages/locale/lang/ko-KR.ts +1 -1
- package/packages/locale/lang/ms-MY.ts +708 -0
- package/packages/locale/lang/nb-NO.ts +1 -1
- package/packages/locale/lang/pt-BR.ts +1 -1
- package/packages/locale/lang/ru-RU.ts +1 -1
- package/packages/locale/lang/th-TH.ts +1 -1
- package/packages/locale/lang/ug-CN.ts +1 -1
- package/packages/locale/lang/uk-UA.ts +1 -1
- package/packages/locale/lang/uz-UZ.ts +708 -0
- package/packages/locale/lang/vi-VN.ts +1 -1
- package/packages/locale/lang/zh-CHT.ts +1 -1
- package/packages/locale/lang/zh-CN.ts +1 -1
- package/packages/table/module/custom/panel.ts +1 -1
- package/packages/table/module/filter/hook.ts +8 -0
- package/packages/table/render/index.ts +21 -15
- package/packages/table/src/body.ts +2 -1
- package/packages/table/src/table.ts +56 -48
- package/lib/locale/lang/zh-TC.umd.js +0 -23
- /package/es/{iconfont.1746324623861.ttf → iconfont.1746694097015.ttf} +0 -0
- /package/es/{iconfont.1746324623861.woff → iconfont.1746694097015.woff} +0 -0
- /package/es/{iconfont.1746324623861.woff2 → iconfont.1746694097015.woff2} +0 -0
- /package/es/locale/lang/{zh-TC.d.ts → ar-EG.d.ts} +0 -0
- /package/{lib/locale/lang/zh-TC.d.ts → es/locale/lang/de-DE.d.ts} +0 -0
- /package/lib/{iconfont.1746324623861.ttf → iconfont.1746694097015.ttf} +0 -0
- /package/lib/{iconfont.1746324623861.woff → iconfont.1746694097015.woff} +0 -0
- /package/lib/{iconfont.1746324623861.woff2 → iconfont.1746694097015.woff2} +0 -0
|
@@ -1090,7 +1090,7 @@ export default defineComponent({
|
|
|
1090
1090
|
nextTick(() => {
|
|
1091
1091
|
const customOpts = computeCustomOpts.value;
|
|
1092
1092
|
const { mode } = customOpts;
|
|
1093
|
-
if (!VxeUIModalComponent) {
|
|
1093
|
+
if (!VxeUIModalComponent && (mode === 'modal')) {
|
|
1094
1094
|
errLog('vxe.error.reqComp', ['vxe-modal']);
|
|
1095
1095
|
}
|
|
1096
1096
|
if (!VxeUIDrawerComponent && (mode === 'drawer')) {
|
|
@@ -310,10 +310,18 @@ hooks.add('tableFilterModule', {
|
|
|
310
310
|
handleFilterConfirmFilter(null);
|
|
311
311
|
return nextTick();
|
|
312
312
|
},
|
|
313
|
+
saveFilterPanelByEvent(evnt) {
|
|
314
|
+
handleFilterConfirmFilter(evnt);
|
|
315
|
+
return nextTick();
|
|
316
|
+
},
|
|
313
317
|
resetFilterPanel() {
|
|
314
318
|
handleFilterResetFilter(null);
|
|
315
319
|
return nextTick();
|
|
316
320
|
},
|
|
321
|
+
resetFilterPanelByEvent(evnt) {
|
|
322
|
+
handleFilterResetFilter(evnt);
|
|
323
|
+
return nextTick();
|
|
324
|
+
},
|
|
317
325
|
getCheckedFilters() {
|
|
318
326
|
const { tableFullColumn } = internalData;
|
|
319
327
|
const filterList = [];
|
package/es/table/render/index.js
CHANGED
|
@@ -356,12 +356,15 @@ function renderNativeOptgroups(renderOpts, params, renderOptionsMethods) {
|
|
|
356
356
|
const { optionGroups, optionGroupProps = {} } = renderOpts;
|
|
357
357
|
const groupOptions = optionGroupProps.options || 'options';
|
|
358
358
|
const groupLabel = optionGroupProps.label || 'label';
|
|
359
|
-
|
|
360
|
-
return
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
359
|
+
if (optionGroups) {
|
|
360
|
+
return optionGroups.map((group, gIndex) => {
|
|
361
|
+
return h('optgroup', {
|
|
362
|
+
key: gIndex,
|
|
363
|
+
label: group[groupLabel]
|
|
364
|
+
}, renderOptionsMethods(group[groupOptions], renderOpts, params));
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
return [];
|
|
365
368
|
}
|
|
366
369
|
/**
|
|
367
370
|
* 渲染原生的 option 标签
|
|
@@ -373,15 +376,18 @@ function renderNativeOptions(options, renderOpts, params) {
|
|
|
373
376
|
const valueProp = optionProps.value || 'value';
|
|
374
377
|
const disabledProp = optionProps.disabled || 'disabled';
|
|
375
378
|
const cellValue = isImmediateCell(renderOpts, params) ? getCellValue(row, column) : column.model.value;
|
|
376
|
-
|
|
377
|
-
return
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
379
|
+
if (options) {
|
|
380
|
+
return options.map((option, oIndex) => {
|
|
381
|
+
return h('option', {
|
|
382
|
+
key: oIndex,
|
|
383
|
+
value: option[valueProp],
|
|
384
|
+
disabled: option[disabledProp],
|
|
385
|
+
/* eslint-disable eqeqeq */
|
|
386
|
+
selected: option[valueProp] == cellValue
|
|
387
|
+
}, option[labelProp]);
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
return [];
|
|
385
391
|
}
|
|
386
392
|
function nativeFilterRender(renderOpts, params) {
|
|
387
393
|
const { column } = params;
|
package/es/table/src/body.js
CHANGED
package/es/table/src/table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, reactive, ref, provide, inject, nextTick, onActivated, onDeactivated, onBeforeUnmount, onUnmounted, watch, computed, onMounted } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize,
|
|
3
|
+
import { initTpImg, getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, setScrollTop, setScrollLeft, toCssUnit, hasControlKey } from '../../ui/src/dom';
|
|
4
4
|
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
|
|
5
5
|
import { VxeUI } from '../../ui';
|
|
6
6
|
import Cell from './cell';
|
|
@@ -7485,8 +7485,9 @@ export default defineComponent({
|
|
|
7485
7485
|
evnt.stopPropagation();
|
|
7486
7486
|
evnt.preventDefault();
|
|
7487
7487
|
const { column } = params;
|
|
7488
|
-
const { overflowX, scrollbarHeight } = reactData;
|
|
7488
|
+
const { columnStore, overflowX, scrollbarHeight } = reactData;
|
|
7489
7489
|
const { elemStore, visibleColumn } = internalData;
|
|
7490
|
+
const { leftList, rightList } = columnStore;
|
|
7490
7491
|
const resizableOpts = computeResizableOpts.value;
|
|
7491
7492
|
const osbHeight = overflowX ? scrollbarHeight : 0;
|
|
7492
7493
|
const tableEl = refElem.value;
|
|
@@ -7496,10 +7497,11 @@ export default defineComponent({
|
|
|
7496
7497
|
if (!resizeBarElem) {
|
|
7497
7498
|
return;
|
|
7498
7499
|
}
|
|
7500
|
+
const isLeftFixed = fixedType === 'left';
|
|
7501
|
+
const isRightFixed = fixedType === 'right';
|
|
7499
7502
|
const resizeTipElem = resizeBarElem.firstElementChild;
|
|
7500
7503
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
7501
7504
|
const { clientX: dragClientX } = evnt;
|
|
7502
|
-
const wrapperElem = refElem.value;
|
|
7503
7505
|
const dragBtnElem = evnt.target;
|
|
7504
7506
|
let resizeColumn = column;
|
|
7505
7507
|
if (column.children && column.children.length) {
|
|
@@ -7514,30 +7516,32 @@ export default defineComponent({
|
|
|
7514
7516
|
if (!bodyScrollElem) {
|
|
7515
7517
|
return;
|
|
7516
7518
|
}
|
|
7517
|
-
const
|
|
7519
|
+
const tableRect = tableEl.getBoundingClientRect();
|
|
7520
|
+
const rightContainerRect = rightContainerElem ? rightContainerElem.getBoundingClientRect() : null;
|
|
7521
|
+
const cellRect = cell.getBoundingClientRect();
|
|
7522
|
+
const dragBtnRect = dragBtnElem.getBoundingClientRect();
|
|
7518
7523
|
const dragBtnWidth = dragBtnElem.clientWidth;
|
|
7519
7524
|
const dragBtnOffsetWidth = Math.floor(dragBtnWidth / 2);
|
|
7525
|
+
const dragPosLeft = dragBtnRect.x - tableRect.x + dragBtnOffsetWidth;
|
|
7520
7526
|
const minInterval = getColReMinWidth(cellParams) - dragBtnOffsetWidth; // 列之间的最小间距
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
// 计算左右侧固定列偏移量
|
|
7526
|
-
let fixedOffsetWidth = 0;
|
|
7527
|
+
const dragMinLeft = isRightFixed ? 0 : (cellRect.x - tableRect.x + dragBtnWidth + minInterval);
|
|
7528
|
+
const dragMaxLeft = cellRect.x - tableRect.x + cell.clientWidth - minInterval;
|
|
7529
|
+
let fixedLeftRemainWidth = 0;
|
|
7530
|
+
let fixedRightRemainWidth = 0;
|
|
7527
7531
|
if (isLeftFixed || isRightFixed) {
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7532
|
+
let isMach = false;
|
|
7533
|
+
const fixedColumn = isLeftFixed ? leftList : rightList;
|
|
7534
|
+
for (let i = 0; i < fixedColumn.length; i++) {
|
|
7535
|
+
const item = fixedColumn[i];
|
|
7536
|
+
if (isMach) {
|
|
7537
|
+
fixedLeftRemainWidth += item.renderWidth;
|
|
7533
7538
|
}
|
|
7534
|
-
else
|
|
7535
|
-
|
|
7539
|
+
else {
|
|
7540
|
+
isMach = item.id === resizeColumn.id;
|
|
7541
|
+
if (!isMach) {
|
|
7542
|
+
fixedRightRemainWidth += item.renderWidth;
|
|
7543
|
+
}
|
|
7536
7544
|
}
|
|
7537
|
-
tempCellElem = tempCellElem[siblingProp];
|
|
7538
|
-
}
|
|
7539
|
-
if (isRightFixed && rightContainerElem) {
|
|
7540
|
-
dragPosLeft = rightContainerElem.offsetLeft + fixedOffsetWidth;
|
|
7541
7545
|
}
|
|
7542
7546
|
}
|
|
7543
7547
|
// 处理拖动事件
|
|
@@ -7547,29 +7551,25 @@ export default defineComponent({
|
|
|
7547
7551
|
const tableHeight = tableEl.clientHeight;
|
|
7548
7552
|
const offsetX = evnt.clientX - dragClientX;
|
|
7549
7553
|
let left = dragPosLeft + offsetX;
|
|
7550
|
-
const scrollLeft = fixedType ? 0 : bodyScrollElem.scrollLeft;
|
|
7551
7554
|
if (isLeftFixed) {
|
|
7552
|
-
|
|
7553
|
-
|
|
7555
|
+
if (rightContainerRect) {
|
|
7556
|
+
left = Math.min(left, rightContainerRect.x - tableRect.x - fixedLeftRemainWidth - minInterval);
|
|
7557
|
+
}
|
|
7554
7558
|
}
|
|
7555
7559
|
else if (isRightFixed) {
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
else {
|
|
7561
|
-
dragMinLeft = Math.max(bodyScrollElem.scrollLeft, dragMinLeft);
|
|
7562
|
-
// left = Math.min(left, bodyScrollElem.clientWidth + bodyScrollElem.scrollLeft - 40)
|
|
7560
|
+
if (leftContainerElem) {
|
|
7561
|
+
left = Math.max(left, leftContainerElem.clientWidth + fixedRightRemainWidth + minInterval);
|
|
7562
|
+
}
|
|
7563
|
+
left = Math.min(left, dragMaxLeft);
|
|
7563
7564
|
}
|
|
7564
7565
|
dragLeft = Math.max(left, dragMinLeft);
|
|
7565
|
-
const resizeBarLeft = Math.max(1, dragLeft
|
|
7566
|
+
const resizeBarLeft = Math.max(1, dragLeft);
|
|
7566
7567
|
resizeBarElem.style.left = `${resizeBarLeft}px`;
|
|
7567
7568
|
resizeBarElem.style.top = `${scrollbarXToTop ? osbHeight : 0}px`;
|
|
7568
7569
|
resizeBarElem.style.height = `${scrollbarXToTop ? tableHeight - osbHeight : tableHeight}px`;
|
|
7569
7570
|
if (resizableOpts.showDragTip && resizeTipElem) {
|
|
7570
|
-
resizeTipElem.textContent = getI18n('vxe.table.resizeColTip', [resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft)]);
|
|
7571
|
+
resizeTipElem.textContent = getI18n('vxe.table.resizeColTip', [Math.floor(resizeColumn.renderWidth + (isRightFixed ? dragPosLeft - dragLeft : dragLeft - dragPosLeft))]);
|
|
7571
7572
|
const tableWrapperWidth = tableEl.clientWidth;
|
|
7572
|
-
const wrapperRect = wrapperElem.getBoundingClientRect();
|
|
7573
7573
|
const resizeBarWidth = resizeBarElem.clientWidth;
|
|
7574
7574
|
const resizeTipWidth = resizeTipElem.clientWidth;
|
|
7575
7575
|
const resizeTipHeight = resizeTipElem.clientHeight;
|
|
@@ -7581,7 +7581,7 @@ export default defineComponent({
|
|
|
7581
7581
|
resizeTipLeft += tableWrapperWidth - resizeBarLeft;
|
|
7582
7582
|
}
|
|
7583
7583
|
resizeTipElem.style.left = `${resizeTipLeft}px`;
|
|
7584
|
-
resizeTipElem.style.top = `${Math.min(tableHeight - resizeTipHeight, Math.max(0, evnt.clientY -
|
|
7584
|
+
resizeTipElem.style.top = `${Math.min(tableHeight - resizeTipHeight, Math.max(0, evnt.clientY - tableRect.y - resizeTipHeight / 2))}px`;
|
|
7585
7585
|
}
|
|
7586
7586
|
reactData.isDragResize = true;
|
|
7587
7587
|
};
|
|
@@ -8549,25 +8549,27 @@ export default defineComponent({
|
|
|
8549
8549
|
const { selectRadioRow: oldValue } = reactData;
|
|
8550
8550
|
const { row } = params;
|
|
8551
8551
|
const radioOpts = computeRadioOpts.value;
|
|
8552
|
-
const { trigger } = radioOpts;
|
|
8552
|
+
const { trigger, checkMethod } = radioOpts;
|
|
8553
8553
|
if (trigger === 'manual') {
|
|
8554
8554
|
return;
|
|
8555
8555
|
}
|
|
8556
8556
|
evnt.stopPropagation();
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
handleCheckedRadioRow(newValue);
|
|
8561
|
-
}
|
|
8562
|
-
else if (!radioOpts.strict) {
|
|
8563
|
-
isChange = oldValue === newValue;
|
|
8557
|
+
if (!checkMethod || checkMethod({ $table: $xeTable, row })) {
|
|
8558
|
+
let newValue = row;
|
|
8559
|
+
let isChange = oldValue !== newValue;
|
|
8564
8560
|
if (isChange) {
|
|
8565
|
-
newValue
|
|
8566
|
-
|
|
8561
|
+
handleCheckedRadioRow(newValue);
|
|
8562
|
+
}
|
|
8563
|
+
else if (!radioOpts.strict) {
|
|
8564
|
+
isChange = oldValue === newValue;
|
|
8565
|
+
if (isChange) {
|
|
8566
|
+
newValue = null;
|
|
8567
|
+
$xeTable.clearRadioRow();
|
|
8568
|
+
}
|
|
8569
|
+
}
|
|
8570
|
+
if (isChange) {
|
|
8571
|
+
dispatchEvent('radio-change', Object.assign({ oldValue, newValue }, params), evnt);
|
|
8567
8572
|
}
|
|
8568
|
-
}
|
|
8569
|
-
if (isChange) {
|
|
8570
|
-
dispatchEvent('radio-change', Object.assign({ oldValue, newValue }, params), evnt);
|
|
8571
8573
|
}
|
|
8572
8574
|
},
|
|
8573
8575
|
triggerCurrentColumnEvent(evnt, params) {
|
|
@@ -11033,8 +11035,8 @@ export default defineComponent({
|
|
|
11033
11035
|
if (props.editConfig && (editOpts.showStatus || editOpts.showUpdateStatus || editOpts.showInsertStatus) && !props.keepSource) {
|
|
11034
11036
|
warnLog('vxe.error.reqProp', ['keep-source']);
|
|
11035
11037
|
}
|
|
11036
|
-
if (treeConfig && (treeOpts.showLine || treeOpts.line) &&
|
|
11037
|
-
warnLog('vxe.error.reqProp', ['
|
|
11038
|
+
if (treeConfig && (treeOpts.showLine || treeOpts.line) && !showOverflow) {
|
|
11039
|
+
warnLog('vxe.error.reqProp', ['show-overflow']);
|
|
11038
11040
|
}
|
|
11039
11041
|
if (treeConfig && !treeOpts.transform && props.stripe) {
|
|
11040
11042
|
warnLog('vxe.error.noTree', ['stripe']);
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
|
|
|
3138
3138
|
;// ./packages/ui/index.ts
|
|
3139
3139
|
|
|
3140
3140
|
|
|
3141
|
-
const version = "4.13.
|
|
3141
|
+
const version = "4.13.19";
|
|
3142
3142
|
core_.VxeUI.version = version;
|
|
3143
3143
|
core_.VxeUI.tableVersion = version;
|
|
3144
3144
|
core_.VxeUI.setConfig({
|
|
@@ -3599,7 +3599,7 @@ var esnext_iterator_some = __webpack_require__(7550);
|
|
|
3599
3599
|
const {
|
|
3600
3600
|
log: log_log
|
|
3601
3601
|
} = core_.VxeUI;
|
|
3602
|
-
const log_version = `table v${"4.13.
|
|
3602
|
+
const log_version = `table v${"4.13.19"}`;
|
|
3603
3603
|
const warnLog = log_log.create('warn', log_version);
|
|
3604
3604
|
const errLog = log_log.create('error', log_version);
|
|
3605
3605
|
;// ./packages/table/src/columnInfo.ts
|
|
@@ -7261,7 +7261,8 @@ const renderType = 'body';
|
|
|
7261
7261
|
xid: xID,
|
|
7262
7262
|
cellspacing: 0,
|
|
7263
7263
|
cellpadding: 0,
|
|
7264
|
-
border: 0
|
|
7264
|
+
border: 0,
|
|
7265
|
+
xvm: isOptimizeMode ? '1' : null
|
|
7265
7266
|
}, [
|
|
7266
7267
|
/**
|
|
7267
7268
|
* 列宽
|
|
@@ -9508,7 +9509,7 @@ const {
|
|
|
9508
9509
|
const {
|
|
9509
9510
|
mode
|
|
9510
9511
|
} = customOpts;
|
|
9511
|
-
if (!VxeUIModalComponent) {
|
|
9512
|
+
if (!VxeUIModalComponent && mode === 'modal') {
|
|
9512
9513
|
errLog('vxe.error.reqComp', ['vxe-modal']);
|
|
9513
9514
|
}
|
|
9514
9515
|
if (!VxeUIDrawerComponent && mode === 'drawer') {
|
|
@@ -11307,13 +11308,9 @@ fullList=handleVirtualTreeToList();}const tableData=scrollYLoad?fullList.slice(s
|
|
|
11307
11308
|
const fullDataRowIdMaps={};const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const handleRowCache=(row,index,items,currIndex,parentRow,rowid,level,seq)=>{let rowRest=fullAllDataRowIdMaps[rowid];if(!rowRest){rowRest={row,rowid,seq,index:-1,_index:-1,$index:-1,treeIndex:index,items,parent:parentRow,level,height:0,resizeHeight:0,oTop:0,expandHeight:0};fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;}rowRest.treeLoaded=false;rowRest.expandLoaded=false;rowRest.row=row;rowRest.items=items;rowRest.parent=parentRow;rowRest.level=level;rowRest.index=currIndex;rowRest.treeIndex=index;fullDataRowIdMaps[rowid]=rowRest;fullAllDataRowIdMaps[rowid]=rowRest;};if(treeConfig){const treeOpts=computeTreeOpts.value;const{lazy}=treeOpts;const childrenField=treeOpts.children||treeOpts.childrenField;const hasChildField=treeOpts.hasChild||treeOpts.hasChildField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);if(treeConfig&&lazy){if(row[hasChildField]&&row[childrenField]===undefined){row[childrenField]=null;}if(treeExpandedMaps[rowid]){if(!row[childrenField]||!row[childrenField].length){delete treeExpandedMaps[rowid];}}}handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:childrenField});}else if(isRowGroupStatus){const rowGroupOpts=computeRowGroupOpts.value;const{mapChildrenField}=rowGroupOpts;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullGroupData,(row,index,items,path,parentRow,nodes)=>{const rowid=handleUpdateRowId(row);handleRowCache(row,index,items,parentRow?-1:index,parentRow,rowid,nodes.length-1,toTreePathSeq(path));},{children:mapChildrenField});}else{tableFullData.forEach((row,index,items)=>{handleRowCache(row,index,items,index,null,handleUpdateRowId(row),0,index+1);});}internalData.fullDataRowIdData=fullDataRowIdMaps;internalData.fullAllDataRowIdData=fullAllDataRowIdMaps;reactData.treeExpandedFlag++;},cacheSourceMap(fullData){const{treeConfig}=props;const treeOpts=computeTreeOpts.value;const sourceData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(fullData,true);const{handleUpdateRowId}=createHandleUpdateRowId($xeTable);const sourceRowIdData={};const handleSourceRow=row=>{const rowid=handleUpdateRowId(row);sourceRowIdData[rowid]=row;};// 源数据缓存
|
|
11308
11309
|
if(treeConfig){const childrenField=treeOpts.children||treeOpts.childrenField;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(sourceData,handleSourceRow,{children:treeOpts.transform?treeOpts.mapChildrenField:childrenField});}else{sourceData.forEach(handleSourceRow);}internalData.sourceDataRowIdData=sourceRowIdData;internalData.tableSourceData=sourceData;},/**
|
|
11309
11310
|
* 指定列宽的列进行拆分
|
|
11310
|
-
*/analyColumnWidth(){const{tableFullColumn}=internalData;const columnOpts=computeColumnOpts.value;const{width:defaultWidth,minWidth:defaultMinWidth}=columnOpts;const resizeList=[];const pxList=[];const pxMinList=[];const autoMinList=[];const scaleList=[];const scaleMinList=[];const autoList=[];const remainList=[];tableFullColumn.forEach(column=>{if(defaultWidth&&!column.width){column.width=defaultWidth;}if(defaultMinWidth&&!column.minWidth){column.minWidth=defaultMinWidth;}if(column.visible){if(column.resizeWidth){resizeList.push(column);}else if(column.width==='auto'){autoList.push(column);}else if(isPx(column.width)){pxList.push(column);}else if(isScale(column.width)){scaleList.push(column);}else if(isPx(column.minWidth)){pxMinList.push(column);}else if(column.minWidth==='auto'){autoMinList.push(column);}else if(isScale(column.minWidth)){scaleMinList.push(column);}else{remainList.push(column);}}});Object.assign(reactData.columnStore,{resizeList,pxList,pxMinList,autoMinList,scaleList,scaleMinList,autoList,remainList});},handleColResizeMousedownEvent(evnt,fixedType,params){evnt.stopPropagation();evnt.preventDefault();const{column}=params;const{overflowX,scrollbarHeight}=reactData;const{elemStore,visibleColumn}=internalData;const resizableOpts=computeResizableOpts.value;const osbHeight=overflowX?scrollbarHeight:0;const tableEl=refElem.value;const leftContainerElem=refLeftContainer.value;const rightContainerElem=refRightContainer.value;const resizeBarElem=refColResizeBar.value;if(!resizeBarElem){return;}const resizeTipElem=resizeBarElem.firstElementChild;const scrollbarXToTop=computeScrollbarXToTop.value;const{clientX:dragClientX}=evnt;const
|
|
11311
|
-
|
|
11312
|
-
let
|
|
11313
|
-
const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const tableHeight=tableEl.clientHeight;const offsetX=evnt.clientX-dragClientX;let left=dragPosLeft+offsetX;const scrollLeft=fixedType?0:bodyScrollElem.scrollLeft;if(isLeftFixed){// 左固定列(不允许超过右侧固定列、不允许超过右边距)
|
|
11314
|
-
left=Math.min(left,(rightContainerElem?rightContainerElem.offsetLeft:bodyScrollElem.clientWidth)-fixedOffsetWidth-minInterval);}else if(isRightFixed){// 右侧固定列(不允许超过左侧固定列、不允许超过左边距)
|
|
11315
|
-
dragMinLeft=(leftContainerElem?leftContainerElem.clientWidth:0)+fixedOffsetWidth+minInterval;left=Math.min(left,dragPosLeft+cell.clientWidth-minInterval);}else{dragMinLeft=Math.max(bodyScrollElem.scrollLeft,dragMinLeft);// left = Math.min(left, bodyScrollElem.clientWidth + bodyScrollElem.scrollLeft - 40)
|
|
11316
|
-
}dragLeft=Math.max(left,dragMinLeft);const resizeBarLeft=Math.max(1,dragLeft-scrollLeft);resizeBarElem.style.left=`${resizeBarLeft}px`;resizeBarElem.style.top=`${scrollbarXToTop?osbHeight:0}px`;resizeBarElem.style.height=`${scrollbarXToTop?tableHeight-osbHeight:tableHeight}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=table_getI18n('vxe.table.resizeColTip',[resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft)]);const tableWrapperWidth=tableEl.clientWidth;const wrapperRect=wrapperElem.getBoundingClientRect();const resizeBarWidth=resizeBarElem.clientWidth;const resizeTipWidth=resizeTipElem.clientWidth;const resizeTipHeight=resizeTipElem.clientHeight;let resizeTipLeft=-resizeTipWidth;if(resizeBarLeft<resizeTipWidth+resizeBarWidth){resizeTipLeft=0;}else if(resizeBarLeft>tableWrapperWidth){resizeTipLeft+=tableWrapperWidth-resizeBarLeft;}resizeTipElem.style.left=`${resizeTipLeft}px`;resizeTipElem.style.top=`${Math.min(tableHeight-resizeTipHeight,Math.max(0,evnt.clientY-wrapperRect.y-resizeTipHeight/2))}px`;}reactData.isDragResize=true;};reactData.isDragResize=true;addClass(tableEl,'col-drag--resize');resizeBarElem.style.display='block';document.onmousemove=updateEvent;document.onmouseup=function(evnt){document.onmousemove=null;document.onmouseup=null;resizeBarElem.style.display='none';internalData._lastResizeTime=Date.now();setTimeout(()=>{reactData.isDragResize=false;},50);const resizeWidth=resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft);const resizeParams={...params,resizeWidth,resizeColumn};if(resizableOpts.dragMode==='fixed'){visibleColumn.forEach(item=>{if(item.id!==resizeColumn.id){if(!item.resizeWidth){item.resizeWidth=item.renderWidth;}}});}if($xeTable.handleColResizeCellAreaEvent){$xeTable.handleColResizeCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}removeClass(tableEl,'col-drag--resize');};updateEvent(evnt);if($xeTable.closeMenu){$xeTable.closeMenu();}},handleColResizeDblclickEvent(evnt,params){const resizableOpts=computeResizableOpts.value;const{isDblclickAutoWidth}=resizableOpts;const el=refElem.value;if(isDblclickAutoWidth&&el){evnt.stopPropagation();evnt.preventDefault();const{fullColumnIdData}=internalData;const{column}=params;let resizeColumn=column;if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}const colid=resizeColumn.id;const colRest=fullColumnIdData[colid];const dragBtnElem=evnt.target;const cell=dragBtnElem.parentNode;const cellParams=Object.assign(params,{cell});const colMinWidth=getColReMinWidth(cellParams);el.setAttribute('data-calc-col','Y');let resizeWidth=calcColumnAutoWidth(resizeColumn,el);el.removeAttribute('data-calc-col');if(colRest){resizeWidth=Math.max(resizeWidth,colRest.width);}resizeWidth=Math.max(colMinWidth,resizeWidth);const resizeParams={...params,resizeWidth,resizeColumn};reactData.isDragResize=false;internalData._lastResizeTime=Date.now();if($xeTable.handleColResizeDblclickCellAreaEvent){$xeTable.handleColResizeDblclickCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}}},handleRowResizeMousedownEvent(evnt,params){evnt.stopPropagation();evnt.preventDefault();const{row}=params;const{overflowX,scrollbarWidth,overflowY,scrollbarHeight}=reactData;const{elemStore,fullAllDataRowIdData}=internalData;const osbWidth=overflowY?scrollbarWidth:0;const osbHeight=overflowX?scrollbarHeight:0;const scrollbarYToLeft=computeScrollbarYToLeft.value;const resizableOpts=computeResizableOpts.value;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const tableEl=refElem.value;const resizeBarElem=refRowResizeBar.value;if(!resizeBarElem){return;}const{clientY:dragClientY}=evnt;const resizeTipElem=resizeBarElem.firstElementChild;const dragBtnElem=evnt.currentTarget;const tdEl=dragBtnElem.parentNode;const trEl=tdEl.parentNode;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(!bodyScrollElem){return;}const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(!rowRest){return;}const defaultRowHeight=computeDefaultRowHeight.value;const currCellHeight=rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;const tableRect=tableEl.getBoundingClientRect();const trRect=trEl.getBoundingClientRect();const targetOffsetY=dragClientY-trRect.y-trEl.clientHeight;let resizeHeight=currCellHeight;const cellEl=tdEl.querySelector('.vxe-cell');let cellMinHeight=0;if(cellEl){const cellStyle=getComputedStyle(cellEl);cellMinHeight=Math.max(1,Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingTop)+external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingBottom)));}const minTop=trRect.y-tableRect.y+cellMinHeight;// 处理拖动事件
|
|
11311
|
+
*/analyColumnWidth(){const{tableFullColumn}=internalData;const columnOpts=computeColumnOpts.value;const{width:defaultWidth,minWidth:defaultMinWidth}=columnOpts;const resizeList=[];const pxList=[];const pxMinList=[];const autoMinList=[];const scaleList=[];const scaleMinList=[];const autoList=[];const remainList=[];tableFullColumn.forEach(column=>{if(defaultWidth&&!column.width){column.width=defaultWidth;}if(defaultMinWidth&&!column.minWidth){column.minWidth=defaultMinWidth;}if(column.visible){if(column.resizeWidth){resizeList.push(column);}else if(column.width==='auto'){autoList.push(column);}else if(isPx(column.width)){pxList.push(column);}else if(isScale(column.width)){scaleList.push(column);}else if(isPx(column.minWidth)){pxMinList.push(column);}else if(column.minWidth==='auto'){autoMinList.push(column);}else if(isScale(column.minWidth)){scaleMinList.push(column);}else{remainList.push(column);}}});Object.assign(reactData.columnStore,{resizeList,pxList,pxMinList,autoMinList,scaleList,scaleMinList,autoList,remainList});},handleColResizeMousedownEvent(evnt,fixedType,params){evnt.stopPropagation();evnt.preventDefault();const{column}=params;const{columnStore,overflowX,scrollbarHeight}=reactData;const{elemStore,visibleColumn}=internalData;const{leftList,rightList}=columnStore;const resizableOpts=computeResizableOpts.value;const osbHeight=overflowX?scrollbarHeight:0;const tableEl=refElem.value;const leftContainerElem=refLeftContainer.value;const rightContainerElem=refRightContainer.value;const resizeBarElem=refColResizeBar.value;if(!resizeBarElem){return;}const isLeftFixed=fixedType==='left';const isRightFixed=fixedType==='right';const resizeTipElem=resizeBarElem.firstElementChild;const scrollbarXToTop=computeScrollbarXToTop.value;const{clientX:dragClientX}=evnt;const dragBtnElem=evnt.target;let resizeColumn=column;if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}const cell=dragBtnElem.parentNode;const cellParams=Object.assign(params,{cell});let dragLeft=0;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(!bodyScrollElem){return;}const tableRect=tableEl.getBoundingClientRect();const rightContainerRect=rightContainerElem?rightContainerElem.getBoundingClientRect():null;const cellRect=cell.getBoundingClientRect();const dragBtnRect=dragBtnElem.getBoundingClientRect();const dragBtnWidth=dragBtnElem.clientWidth;const dragBtnOffsetWidth=Math.floor(dragBtnWidth/2);const dragPosLeft=dragBtnRect.x-tableRect.x+dragBtnOffsetWidth;const minInterval=getColReMinWidth(cellParams)-dragBtnOffsetWidth;// 列之间的最小间距
|
|
11312
|
+
const dragMinLeft=isRightFixed?0:cellRect.x-tableRect.x+dragBtnWidth+minInterval;const dragMaxLeft=cellRect.x-tableRect.x+cell.clientWidth-minInterval;let fixedLeftRemainWidth=0;let fixedRightRemainWidth=0;if(isLeftFixed||isRightFixed){let isMach=false;const fixedColumn=isLeftFixed?leftList:rightList;for(let i=0;i<fixedColumn.length;i++){const item=fixedColumn[i];if(isMach){fixedLeftRemainWidth+=item.renderWidth;}else{isMach=item.id===resizeColumn.id;if(!isMach){fixedRightRemainWidth+=item.renderWidth;}}}}// 处理拖动事件
|
|
11313
|
+
const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const tableHeight=tableEl.clientHeight;const offsetX=evnt.clientX-dragClientX;let left=dragPosLeft+offsetX;if(isLeftFixed){if(rightContainerRect){left=Math.min(left,rightContainerRect.x-tableRect.x-fixedLeftRemainWidth-minInterval);}}else if(isRightFixed){if(leftContainerElem){left=Math.max(left,leftContainerElem.clientWidth+fixedRightRemainWidth+minInterval);}left=Math.min(left,dragMaxLeft);}dragLeft=Math.max(left,dragMinLeft);const resizeBarLeft=Math.max(1,dragLeft);resizeBarElem.style.left=`${resizeBarLeft}px`;resizeBarElem.style.top=`${scrollbarXToTop?osbHeight:0}px`;resizeBarElem.style.height=`${scrollbarXToTop?tableHeight-osbHeight:tableHeight}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=table_getI18n('vxe.table.resizeColTip',[Math.floor(resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft))]);const tableWrapperWidth=tableEl.clientWidth;const resizeBarWidth=resizeBarElem.clientWidth;const resizeTipWidth=resizeTipElem.clientWidth;const resizeTipHeight=resizeTipElem.clientHeight;let resizeTipLeft=-resizeTipWidth;if(resizeBarLeft<resizeTipWidth+resizeBarWidth){resizeTipLeft=0;}else if(resizeBarLeft>tableWrapperWidth){resizeTipLeft+=tableWrapperWidth-resizeBarLeft;}resizeTipElem.style.left=`${resizeTipLeft}px`;resizeTipElem.style.top=`${Math.min(tableHeight-resizeTipHeight,Math.max(0,evnt.clientY-tableRect.y-resizeTipHeight/2))}px`;}reactData.isDragResize=true;};reactData.isDragResize=true;addClass(tableEl,'col-drag--resize');resizeBarElem.style.display='block';document.onmousemove=updateEvent;document.onmouseup=function(evnt){document.onmousemove=null;document.onmouseup=null;resizeBarElem.style.display='none';internalData._lastResizeTime=Date.now();setTimeout(()=>{reactData.isDragResize=false;},50);const resizeWidth=resizeColumn.renderWidth+(isRightFixed?dragPosLeft-dragLeft:dragLeft-dragPosLeft);const resizeParams={...params,resizeWidth,resizeColumn};if(resizableOpts.dragMode==='fixed'){visibleColumn.forEach(item=>{if(item.id!==resizeColumn.id){if(!item.resizeWidth){item.resizeWidth=item.renderWidth;}}});}if($xeTable.handleColResizeCellAreaEvent){$xeTable.handleColResizeCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}removeClass(tableEl,'col-drag--resize');};updateEvent(evnt);if($xeTable.closeMenu){$xeTable.closeMenu();}},handleColResizeDblclickEvent(evnt,params){const resizableOpts=computeResizableOpts.value;const{isDblclickAutoWidth}=resizableOpts;const el=refElem.value;if(isDblclickAutoWidth&&el){evnt.stopPropagation();evnt.preventDefault();const{fullColumnIdData}=internalData;const{column}=params;let resizeColumn=column;if(column.children&&column.children.length){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(column.children,childColumn=>{resizeColumn=childColumn;});}const colid=resizeColumn.id;const colRest=fullColumnIdData[colid];const dragBtnElem=evnt.target;const cell=dragBtnElem.parentNode;const cellParams=Object.assign(params,{cell});const colMinWidth=getColReMinWidth(cellParams);el.setAttribute('data-calc-col','Y');let resizeWidth=calcColumnAutoWidth(resizeColumn,el);el.removeAttribute('data-calc-col');if(colRest){resizeWidth=Math.max(resizeWidth,colRest.width);}resizeWidth=Math.max(colMinWidth,resizeWidth);const resizeParams={...params,resizeWidth,resizeColumn};reactData.isDragResize=false;internalData._lastResizeTime=Date.now();if($xeTable.handleColResizeDblclickCellAreaEvent){$xeTable.handleColResizeDblclickCellAreaEvent(evnt,resizeParams);}else{resizeColumn.resizeWidth=resizeWidth;handleUpdateColResize(evnt,resizeParams);}}},handleRowResizeMousedownEvent(evnt,params){evnt.stopPropagation();evnt.preventDefault();const{row}=params;const{overflowX,scrollbarWidth,overflowY,scrollbarHeight}=reactData;const{elemStore,fullAllDataRowIdData}=internalData;const osbWidth=overflowY?scrollbarWidth:0;const osbHeight=overflowX?scrollbarHeight:0;const scrollbarYToLeft=computeScrollbarYToLeft.value;const resizableOpts=computeResizableOpts.value;const rowOpts=computeRowOpts.value;const cellOpts=computeCellOpts.value;const tableEl=refElem.value;const resizeBarElem=refRowResizeBar.value;if(!resizeBarElem){return;}const{clientY:dragClientY}=evnt;const resizeTipElem=resizeBarElem.firstElementChild;const dragBtnElem=evnt.currentTarget;const tdEl=dragBtnElem.parentNode;const trEl=tdEl.parentNode;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(!bodyScrollElem){return;}const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(!rowRest){return;}const defaultRowHeight=computeDefaultRowHeight.value;const currCellHeight=rowRest.resizeHeight||cellOpts.height||rowOpts.height||rowRest.height||defaultRowHeight;const tableRect=tableEl.getBoundingClientRect();const trRect=trEl.getBoundingClientRect();const targetOffsetY=dragClientY-trRect.y-trEl.clientHeight;let resizeHeight=currCellHeight;const cellEl=tdEl.querySelector('.vxe-cell');let cellMinHeight=0;if(cellEl){const cellStyle=getComputedStyle(cellEl);cellMinHeight=Math.max(1,Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingTop)+external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(cellStyle.paddingBottom)));}const minTop=trRect.y-tableRect.y+cellMinHeight;// 处理拖动事件
|
|
11317
11314
|
const updateEvent=evnt=>{evnt.stopPropagation();evnt.preventDefault();const rtWidth=tableEl.clientWidth-osbWidth;const tableHeight=tableEl.clientHeight-osbHeight;let dragTop=evnt.clientY-tableRect.y-targetOffsetY;if(dragTop<minTop){dragTop=minTop;}else{resizeHeight=Math.max(cellMinHeight,currCellHeight+evnt.clientY-dragClientY);}resizeBarElem.style.left=`${scrollbarYToLeft?osbWidth:0}px`;resizeBarElem.style.top=`${dragTop}px`;resizeBarElem.style.width=`${rtWidth}px`;if(resizableOpts.showDragTip&&resizeTipElem){resizeTipElem.textContent=table_getI18n('vxe.table.resizeRowTip',[resizeHeight]);const resizeTipWidth=resizeTipElem.clientWidth;const resizeTipHeight=resizeTipElem.clientHeight;let resizeBarLeft=Math.max(2,evnt.clientX-tableRect.x);let resizeBarTop=0;if(resizeBarLeft+resizeTipWidth>=rtWidth-2){resizeBarLeft=rtWidth-resizeTipWidth-2;}if(dragTop+resizeTipHeight>=tableHeight){resizeBarTop=tableHeight-(dragTop+resizeTipHeight);}resizeTipElem.style.left=`${resizeBarLeft}px`;resizeTipElem.style.top=`${resizeBarTop}px`;}reactData.isDragResize=true;};reactData.isDragResize=true;addClass(tableEl,'row-drag--resize');resizeBarElem.style.display='block';document.onmousemove=updateEvent;document.onmouseup=function(evnt){document.onmousemove=null;document.onmouseup=null;resizeBarElem.style.display='none';internalData._lastResizeTime=Date.now();setTimeout(()=>{reactData.isDragResize=false;},50);if(resizeHeight!==currCellHeight){const resizeParams={...params,resizeHeight,resizeRow:row};internalData.isResizeCellHeight=true;if($xeTable.handleRowResizeCellAreaEvent){$xeTable.handleRowResizeCellAreaEvent(evnt,resizeParams);}else{rowRest.resizeHeight=resizeHeight;handleUpdateRowResize(evnt,resizeParams);updateRowOffsetTop();}}removeClass(tableEl,'row-drag--resize');};updateEvent(evnt);},handleRowResizeDblclickEvent(evnt,params){const resizableOpts=computeResizableOpts.value;const{isDblclickAutoHeight}=resizableOpts;const el=refElem.value;if(isDblclickAutoHeight&&el){evnt.stopPropagation();evnt.preventDefault();const{editStore}=reactData;const{fullAllDataRowIdData}=internalData;const{actived}=editStore;const{row}=params;const rowid=getRowid($xeTable,row);const rowRest=fullAllDataRowIdData[rowid];if(!rowRest){return;}const handleRsHeight=()=>{el.setAttribute('data-calc-row','Y');const resizeHeight=calcCellAutoHeight(rowRest,el);el.removeAttribute('data-calc-row');const resizeParams={...params,resizeHeight,resizeRow:row};reactData.isDragResize=false;internalData._lastResizeTime=Date.now();if($xeTable.handleRowResizeDblclickCellAreaEvent){$xeTable.handleRowResizeDblclickCellAreaEvent(evnt,resizeParams);}else{rowRest.resizeHeight=resizeHeight;handleUpdateRowResize(evnt,resizeParams);}};if(actived.row||actived.column){$xeTable.clearEdit().then(handleRsHeight);}else{handleRsHeight();}}},saveCustomStore(type){const{customConfig}=props;const tableId=computeTableId.value;const customOpts=computeCustomOpts.value;const{updateStore,storage}=customOpts;const isAllCustom=storage===true;const storageOpts=isAllCustom?{}:Object.assign({},storage||{});const isCustomResizable=isAllCustom||storageOpts.resizable;const isCustomVisible=isAllCustom||storageOpts.visible;const isCustomFixed=isAllCustom||storageOpts.fixed;const isCustomSort=isAllCustom||storageOpts.sort;if(type!=='reset'){// fix:修复拖动列宽,重置按钮无法点击的问题
|
|
11318
11315
|
reactData.isCustomStatus=true;}if((customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort)){if(!tableId){errLog('vxe.error.reqProp',['id']);return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();}const storeData=type==='reset'?{resizableData:{},sortData:{},visibleData:{},fixedData:{}}:tableMethods.getCustomStoreData();if(updateStore){return updateStore({$table:$xeTable,id:tableId,type,storeData});}else{setCustomStorageMap(tableId,type==='reset'?null:storeData);}}return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();},handleCustom(){const{mouseConfig}=props;if(mouseConfig){if($xeTable.clearSelected){$xeTable.clearSelected();}if($xeTable.clearCellAreas){$xeTable.clearCellAreas();$xeTable.clearCopyCellArea();}}tablePrivateMethods.analyColumnWidth();return tableMethods.refreshColumn(true);},handleUpdateDataQueue(){reactData.upDataFlag++;},handleRefreshColumnQueue(){reactData.reColumnFlag++;},preventEvent(evnt,type,args,next,end){let evntList=table_interceptor.get(type);// 兼容老版本
|
|
11319
11316
|
if(!evntList.length&&type==='event.clearEdit'){evntList=table_interceptor.get('event.clearActived');if(true){if(evntList.length){warnLog('vxe.error.delEvent',['event.clearActived','event.clearEdit']);}}}// 兼容老版本
|
|
@@ -11373,7 +11370,7 @@ if(isEnableConf(editConfig)&&editOpts.trigger==='dblclick'){if(actived.row&&acti
|
|
|
11373
11370
|
* 多选,选中所有事件
|
|
11374
11371
|
*/triggerCheckAllEvent(evnt,value){const checkboxOpts=computeCheckboxOpts.value;const{trigger}=checkboxOpts;if(trigger==='manual'){return;}if(evnt){evnt.stopPropagation();}handleCheckAllEvent(evnt,value);},/**
|
|
11375
11372
|
* 单选,行选中事件
|
|
11376
|
-
*/triggerRadioRowEvent(evnt,params){const{selectRadioRow:oldValue}=reactData;const{row}=params;const radioOpts=computeRadioOpts.value;const{trigger}=radioOpts;if(trigger==='manual'){return;}evnt.stopPropagation();let newValue=row;let isChange=oldValue!==newValue;if(isChange){handleCheckedRadioRow(newValue);}else if(!radioOpts.strict){isChange=oldValue===newValue;if(isChange){newValue=null;$xeTable.clearRadioRow();}}if(isChange){dispatchEvent('radio-change',{oldValue,newValue,...params},evnt);}},triggerCurrentColumnEvent(evnt,params){const{currentColumn:oldValue}=reactData;const columnOpts=computeColumnOpts.value;const currentColumnOpts=computeCurrentColumnOpts.value;const beforeRowMethod=currentColumnOpts.beforeSelectMethod||columnOpts.currentMethod;const{column:newValue}=params;const{trigger}=currentColumnOpts;if(trigger==='manual'){return;}const isChange=oldValue!==newValue;if(!beforeRowMethod||beforeRowMethod({column:newValue,$table:$xeTable})){$xeTable.setCurrentColumn(newValue);if(isChange){dispatchEvent('current-column-change',{oldValue,newValue,...params},evnt);}}else{dispatchEvent('current-column-disabled',params,evnt);}},triggerCurrentRowEvent(evnt,params){const{currentRow:oldValue}=reactData;const rowOpts=computeRowOpts.value;const currentRowOpts=computeCurrentRowOpts.value;const beforeRowMethod=currentRowOpts.beforeSelectMethod||rowOpts.currentMethod;const{row:newValue}=params;const{trigger}=currentRowOpts;if(trigger==='manual'){return;}const isChange=oldValue!==newValue;if(!beforeRowMethod||beforeRowMethod({row:newValue,$table:$xeTable})){$xeTable.setCurrentRow(newValue);if(isChange){dispatchEvent('current-row-change',{oldValue,newValue,...params},evnt);// 已废弃
|
|
11373
|
+
*/triggerRadioRowEvent(evnt,params){const{selectRadioRow:oldValue}=reactData;const{row}=params;const radioOpts=computeRadioOpts.value;const{trigger,checkMethod}=radioOpts;if(trigger==='manual'){return;}evnt.stopPropagation();if(!checkMethod||checkMethod({$table:$xeTable,row})){let newValue=row;let isChange=oldValue!==newValue;if(isChange){handleCheckedRadioRow(newValue);}else if(!radioOpts.strict){isChange=oldValue===newValue;if(isChange){newValue=null;$xeTable.clearRadioRow();}}if(isChange){dispatchEvent('radio-change',{oldValue,newValue,...params},evnt);}}},triggerCurrentColumnEvent(evnt,params){const{currentColumn:oldValue}=reactData;const columnOpts=computeColumnOpts.value;const currentColumnOpts=computeCurrentColumnOpts.value;const beforeRowMethod=currentColumnOpts.beforeSelectMethod||columnOpts.currentMethod;const{column:newValue}=params;const{trigger}=currentColumnOpts;if(trigger==='manual'){return;}const isChange=oldValue!==newValue;if(!beforeRowMethod||beforeRowMethod({column:newValue,$table:$xeTable})){$xeTable.setCurrentColumn(newValue);if(isChange){dispatchEvent('current-column-change',{oldValue,newValue,...params},evnt);}}else{dispatchEvent('current-column-disabled',params,evnt);}},triggerCurrentRowEvent(evnt,params){const{currentRow:oldValue}=reactData;const rowOpts=computeRowOpts.value;const currentRowOpts=computeCurrentRowOpts.value;const beforeRowMethod=currentRowOpts.beforeSelectMethod||rowOpts.currentMethod;const{row:newValue}=params;const{trigger}=currentRowOpts;if(trigger==='manual'){return;}const isChange=oldValue!==newValue;if(!beforeRowMethod||beforeRowMethod({row:newValue,$table:$xeTable})){$xeTable.setCurrentRow(newValue);if(isChange){dispatchEvent('current-row-change',{oldValue,newValue,...params},evnt);// 已废弃
|
|
11377
11374
|
dispatchEvent('current-change',{oldValue,newValue,...params},evnt);}}else{dispatchEvent('current-row-disabled',params,evnt);}},/**
|
|
11378
11375
|
* 展开行事件
|
|
11379
11376
|
*/triggerRowExpandEvent(evnt,params){const{expandColumn}=reactData;const{rowExpandLazyLoadedMaps}=internalData;const expandOpts=computeExpandOpts.value;const{row}=params;const{lazy,trigger}=expandOpts;if(trigger==='manual'){return;}evnt.stopPropagation();const rowid=getRowid($xeTable,row);if(!lazy||!rowExpandLazyLoadedMaps[rowid]){const expanded=!$xeTable.isRowExpandByRow(row);const columnIndex=expandColumn?$xeTable.getColumnIndex(expandColumn):-1;const $columnIndex=expandColumn?$xeTable.getVMColumnIndex(expandColumn):-1;$xeTable.setRowExpand(row,expanded);dispatchEvent('toggle-row-expand',{expanded,column:expandColumn,columnIndex,$columnIndex,row,rowIndex:$xeTable.getRowIndex(row),$rowIndex:$xeTable.getVMRowIndex(row)},evnt);}},/**
|
|
@@ -11486,7 +11483,7 @@ if(bodyScrollElem&&bodyTableElem&&bodyScrollElem.scrollTop+clientHeight>=maxYHei
|
|
|
11486
11483
|
// if (checkboxColumn && internalData.tableFullData.length > 300 && !checkboxOpts.checkField) {
|
|
11487
11484
|
// warnLog('vxe.error.checkProp', ['checkbox-config.checkField'])
|
|
11488
11485
|
// }
|
|
11489
|
-
if((scrollXLoad||scrollYLoad)&&expandColumn&&expandOpts.mode!=='fixed'){warnLog('vxe.error.scrollErrProp',['column.type=expand']);}return tableMethods.recalculate();});});const staticColumnFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.staticColumns.length,()=>{staticColumnFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.staticColumns,()=>{staticColumnFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(staticColumnFlag,()=>{handleColumn(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(reactData.staticColumns));});const tableColumnFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.tableColumn.length,()=>{tableColumnFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.tableColumn,()=>{tableColumnFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(tableColumnFlag,()=>{tablePrivateMethods.analyColumnWidth();});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.upDataFlag,()=>{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{tableMethods.updateData();});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.reColumnFlag,()=>{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{tableMethods.refreshColumn();});});const reScrollFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computeSize,()=>{reScrollFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.showHeader,()=>{reScrollFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.showFooter,()=>{reScrollFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.overflowX,()=>{reScrollFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.overflowY,()=>{reScrollFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(reScrollFlag,()=>{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{tableMethods.recalculate(true).then(()=>tableMethods.refreshScroll());});});const reLayoutFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.height,()=>{reLayoutFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.maxHeight,()=>{reLayoutFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computeScrollbarXToTop,()=>{reLayoutFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computeScrollbarYToLeft,()=>{reLayoutFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>core_.VxeUI.getLanguage(),()=>{reLayoutFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(reLayoutFlag,()=>{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>tableMethods.recalculate(true));});const footFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.footerData?props.footerData.length:-1,()=>{footFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.footerData,()=>{footFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(footFlag,()=>{tableMethods.updateFooter();});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.syncResize,value=>{if(value){handleUpdateResize();(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{handleUpdateResize();setTimeout(()=>handleUpdateResize());});}});const mergeCellFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.mergeCells?props.mergeCells.length:-1,()=>{mergeCellFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.mergeCells,()=>{mergeCellFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(mergeCellFlag,()=>{tableMethods.clearMergeCells();(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{if(props.mergeCells){tableMethods.setMergeCells(props.mergeCells);}});});const mergeFooterItemFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.mergeFooterItems?props.mergeFooterItems.length:-1,()=>{mergeFooterItemFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.mergeFooterItems,()=>{mergeFooterItemFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(mergeFooterItemFlag,()=>{tableMethods.clearMergeFooterItems();(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{if(props.mergeFooterItems){tableMethods.setMergeFooterItems(props.mergeFooterItems);}});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computeRowGroupFields,val=>{handleUpdateRowGroup(val);});if($xeTabs){(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>$xeTabs?$xeTabs.reactData.resizeFlag:null,()=>{handleGlobalResizeEvent();});}table_hooks.forEach(options=>{const{setupTable}=options;if(setupTable){const hookRest=setupTable($xeTable);if(hookRest&&external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(hookRest)){Object.assign($xeTable,hookRest);}}});tablePrivateMethods.preventEvent(null,'created',{$table:$xeTable});let resizeObserver;(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onActivated)(()=>{tableMethods.recalculate().then(()=>tableMethods.refreshScroll());tablePrivateMethods.preventEvent(null,'activated',{$table:$xeTable});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onDeactivated)(()=>{internalData.isActivated=false;tablePrivateMethods.preventEvent(null,'deactivated',{$table:$xeTable});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(()=>{const columnOpts=computeColumnOpts.value;const rowOpts=computeRowOpts.value;const customOpts=computeCustomOpts.value;const rowGroupOpts=computeRowGroupOpts.value;const{groupFields}=rowGroupOpts;if(columnOpts.drag||rowOpts.drag||customOpts.allowSort){initTpImg();}handleUpdateRowGroup(groupFields);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{const{data,exportConfig,importConfig,treeConfig,showOverflow,highlightCurrentRow,highlightCurrentColumn}=props;const{scrollXStore,scrollYStore}=internalData;const editOpts=computeEditOpts.value;const treeOpts=computeTreeOpts.value;const radioOpts=computeRadioOpts.value;const checkboxOpts=computeCheckboxOpts.value;const expandOpts=computeExpandOpts.value;const rowOpts=computeRowOpts.value;const customOpts=computeCustomOpts.value;const mouseOpts=computeMouseOpts.value;const exportOpts=computeExportOpts.value;const importOpts=computeImportOpts.value;const currentRowOpts=computeCurrentRowOpts.value;const currentColumnOpts=computeCurrentColumnOpts.value;const keyboardOpts=computeKeyboardOpts.value;if(props.rowId){warnLog('vxe.error.delProp',['row-id','row-config.keyField']);}if(props.rowKey){warnLog('vxe.error.delProp',['row-key','row-config.useKey']);}if(props.columnKey){warnLog('vxe.error.delProp',['column-id','column-config.useKey']);}if(!(props.rowId||rowOpts.keyField)&&(checkboxOpts.reserve||checkboxOpts.checkRowKeys||radioOpts.reserve||radioOpts.checkRowKey||expandOpts.expandRowKeys||treeOpts.expandRowKeys)){warnLog('vxe.error.reqProp',['row-config.keyField']);}if(props.editConfig&&(editOpts.showStatus||editOpts.showUpdateStatus||editOpts.showInsertStatus)&&!props.keepSource){warnLog('vxe.error.reqProp',['keep-source']);}if(treeConfig&&(treeOpts.showLine||treeOpts.line)
|
|
11486
|
+
if((scrollXLoad||scrollYLoad)&&expandColumn&&expandOpts.mode!=='fixed'){warnLog('vxe.error.scrollErrProp',['column.type=expand']);}return tableMethods.recalculate();});});const staticColumnFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.staticColumns.length,()=>{staticColumnFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.staticColumns,()=>{staticColumnFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(staticColumnFlag,()=>{handleColumn(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().clone(reactData.staticColumns));});const tableColumnFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.tableColumn.length,()=>{tableColumnFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.tableColumn,()=>{tableColumnFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(tableColumnFlag,()=>{tablePrivateMethods.analyColumnWidth();});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.upDataFlag,()=>{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{tableMethods.updateData();});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.reColumnFlag,()=>{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{tableMethods.refreshColumn();});});const reScrollFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computeSize,()=>{reScrollFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.showHeader,()=>{reScrollFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.showFooter,()=>{reScrollFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.overflowX,()=>{reScrollFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>reactData.overflowY,()=>{reScrollFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(reScrollFlag,()=>{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{tableMethods.recalculate(true).then(()=>tableMethods.refreshScroll());});});const reLayoutFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.height,()=>{reLayoutFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.maxHeight,()=>{reLayoutFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computeScrollbarXToTop,()=>{reLayoutFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computeScrollbarYToLeft,()=>{reLayoutFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>core_.VxeUI.getLanguage(),()=>{reLayoutFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(reLayoutFlag,()=>{(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>tableMethods.recalculate(true));});const footFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.footerData?props.footerData.length:-1,()=>{footFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.footerData,()=>{footFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(footFlag,()=>{tableMethods.updateFooter();});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.syncResize,value=>{if(value){handleUpdateResize();(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{handleUpdateResize();setTimeout(()=>handleUpdateResize());});}});const mergeCellFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.mergeCells?props.mergeCells.length:-1,()=>{mergeCellFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.mergeCells,()=>{mergeCellFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(mergeCellFlag,()=>{tableMethods.clearMergeCells();(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{if(props.mergeCells){tableMethods.setMergeCells(props.mergeCells);}});});const mergeFooterItemFlag=(0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.mergeFooterItems?props.mergeFooterItems.length:-1,()=>{mergeFooterItemFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>props.mergeFooterItems,()=>{mergeFooterItemFlag.value++;});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(mergeFooterItemFlag,()=>{tableMethods.clearMergeFooterItems();(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{if(props.mergeFooterItems){tableMethods.setMergeFooterItems(props.mergeFooterItems);}});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(computeRowGroupFields,val=>{handleUpdateRowGroup(val);});if($xeTabs){(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(()=>$xeTabs?$xeTabs.reactData.resizeFlag:null,()=>{handleGlobalResizeEvent();});}table_hooks.forEach(options=>{const{setupTable}=options;if(setupTable){const hookRest=setupTable($xeTable);if(hookRest&&external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isObject(hookRest)){Object.assign($xeTable,hookRest);}}});tablePrivateMethods.preventEvent(null,'created',{$table:$xeTable});let resizeObserver;(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onActivated)(()=>{tableMethods.recalculate().then(()=>tableMethods.refreshScroll());tablePrivateMethods.preventEvent(null,'activated',{$table:$xeTable});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onDeactivated)(()=>{internalData.isActivated=false;tablePrivateMethods.preventEvent(null,'deactivated',{$table:$xeTable});});(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(()=>{const columnOpts=computeColumnOpts.value;const rowOpts=computeRowOpts.value;const customOpts=computeCustomOpts.value;const rowGroupOpts=computeRowGroupOpts.value;const{groupFields}=rowGroupOpts;if(columnOpts.drag||rowOpts.drag||customOpts.allowSort){initTpImg();}handleUpdateRowGroup(groupFields);(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(()=>{const{data,exportConfig,importConfig,treeConfig,showOverflow,highlightCurrentRow,highlightCurrentColumn}=props;const{scrollXStore,scrollYStore}=internalData;const editOpts=computeEditOpts.value;const treeOpts=computeTreeOpts.value;const radioOpts=computeRadioOpts.value;const checkboxOpts=computeCheckboxOpts.value;const expandOpts=computeExpandOpts.value;const rowOpts=computeRowOpts.value;const customOpts=computeCustomOpts.value;const mouseOpts=computeMouseOpts.value;const exportOpts=computeExportOpts.value;const importOpts=computeImportOpts.value;const currentRowOpts=computeCurrentRowOpts.value;const currentColumnOpts=computeCurrentColumnOpts.value;const keyboardOpts=computeKeyboardOpts.value;if(props.rowId){warnLog('vxe.error.delProp',['row-id','row-config.keyField']);}if(props.rowKey){warnLog('vxe.error.delProp',['row-key','row-config.useKey']);}if(props.columnKey){warnLog('vxe.error.delProp',['column-id','column-config.useKey']);}if(!(props.rowId||rowOpts.keyField)&&(checkboxOpts.reserve||checkboxOpts.checkRowKeys||radioOpts.reserve||radioOpts.checkRowKey||expandOpts.expandRowKeys||treeOpts.expandRowKeys)){warnLog('vxe.error.reqProp',['row-config.keyField']);}if(props.editConfig&&(editOpts.showStatus||editOpts.showUpdateStatus||editOpts.showInsertStatus)&&!props.keepSource){warnLog('vxe.error.reqProp',['keep-source']);}if(treeConfig&&(treeOpts.showLine||treeOpts.line)&&!showOverflow){warnLog('vxe.error.reqProp',['show-overflow']);}if(treeConfig&&!treeOpts.transform&&props.stripe){warnLog('vxe.error.noTree',['stripe']);}if(props.showFooter&&!(props.footerMethod||props.footerData)){warnLog('vxe.error.reqProp',['footer-data | footer-method']);}if(rowOpts.height){warnLog('vxe.error.delProp',['row-config.height','cell-config.height']);}if(props.highlightCurrentRow){warnLog('vxe.error.delProp',['highlight-current-row','row-config.isCurrent']);}if(props.highlightHoverRow){warnLog('vxe.error.delProp',['highlight-hover-row','row-config.isHover']);}if(props.highlightCurrentColumn){warnLog('vxe.error.delProp',['highlight-current-column','column-config.isCurrent']);}if(props.highlightHoverColumn){warnLog('vxe.error.delProp',['highlight-hover-column','column-config.isHover']);}if(props.resizable){warnLog('vxe.error.delProp',['resizable','column-config.resizable']);}// if (props.scrollY) {
|
|
11490
11487
|
// warnLog('vxe.error.delProp', ['scroll-y', 'virtual-y-config'])
|
|
11491
11488
|
// }
|
|
11492
11489
|
// if (props.scrollX) {
|
|
@@ -14219,10 +14216,18 @@ hook_hooks.add('tableFilterModule', {
|
|
|
14219
14216
|
handleFilterConfirmFilter(null);
|
|
14220
14217
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
14221
14218
|
},
|
|
14219
|
+
saveFilterPanelByEvent(evnt) {
|
|
14220
|
+
handleFilterConfirmFilter(evnt);
|
|
14221
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
14222
|
+
},
|
|
14222
14223
|
resetFilterPanel() {
|
|
14223
14224
|
handleFilterResetFilter(null);
|
|
14224
14225
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
14225
14226
|
},
|
|
14227
|
+
resetFilterPanelByEvent(evnt) {
|
|
14228
|
+
handleFilterResetFilter(evnt);
|
|
14229
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
14230
|
+
},
|
|
14226
14231
|
getCheckedFilters() {
|
|
14227
14232
|
const {
|
|
14228
14233
|
tableFullColumn
|
|
@@ -19709,12 +19714,15 @@ function renderNativeOptgroups(renderOpts, params, renderOptionsMethods) {
|
|
|
19709
19714
|
} = renderOpts;
|
|
19710
19715
|
const groupOptions = optionGroupProps.options || 'options';
|
|
19711
19716
|
const groupLabel = optionGroupProps.label || 'label';
|
|
19712
|
-
|
|
19713
|
-
return
|
|
19714
|
-
|
|
19715
|
-
|
|
19716
|
-
|
|
19717
|
-
|
|
19717
|
+
if (optionGroups) {
|
|
19718
|
+
return optionGroups.map((group, gIndex) => {
|
|
19719
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('optgroup', {
|
|
19720
|
+
key: gIndex,
|
|
19721
|
+
label: group[groupLabel]
|
|
19722
|
+
}, renderOptionsMethods(group[groupOptions], renderOpts, params));
|
|
19723
|
+
});
|
|
19724
|
+
}
|
|
19725
|
+
return [];
|
|
19718
19726
|
}
|
|
19719
19727
|
/**
|
|
19720
19728
|
* 渲染原生的 option 标签
|
|
@@ -19731,15 +19739,18 @@ function renderNativeOptions(options, renderOpts, params) {
|
|
|
19731
19739
|
const valueProp = optionProps.value || 'value';
|
|
19732
19740
|
const disabledProp = optionProps.disabled || 'disabled';
|
|
19733
19741
|
const cellValue = isImmediateCell(renderOpts, params) ? getCellValue(row, column) : column.model.value;
|
|
19734
|
-
|
|
19735
|
-
return
|
|
19736
|
-
|
|
19737
|
-
|
|
19738
|
-
|
|
19739
|
-
|
|
19740
|
-
|
|
19741
|
-
|
|
19742
|
-
|
|
19742
|
+
if (options) {
|
|
19743
|
+
return options.map((option, oIndex) => {
|
|
19744
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('option', {
|
|
19745
|
+
key: oIndex,
|
|
19746
|
+
value: option[valueProp],
|
|
19747
|
+
disabled: option[disabledProp],
|
|
19748
|
+
/* eslint-disable eqeqeq */
|
|
19749
|
+
selected: option[valueProp] == cellValue
|
|
19750
|
+
}, option[labelProp]);
|
|
19751
|
+
});
|
|
19752
|
+
}
|
|
19753
|
+
return [];
|
|
19743
19754
|
}
|
|
19744
19755
|
function nativeFilterRender(renderOpts, params) {
|
|
19745
19756
|
const {
|
|
@@ -20844,7 +20855,7 @@ const Toolbar = VxeToolbar;
|
|
|
20844
20855
|
year: 'yyyy'
|
|
20845
20856
|
},
|
|
20846
20857
|
weeks: {
|
|
20847
|
-
w: '
|
|
20858
|
+
w: '',
|
|
20848
20859
|
w0: '周日',
|
|
20849
20860
|
w1: '周一',
|
|
20850
20861
|
w2: '周二',
|