vxe-table 3.18.0-beta.0 → 3.18.0-beta.2
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/grid/src/grid.js +3 -1
- package/es/style.css +1 -1
- package/es/table/module/custom/mixin.js +4 -2
- package/es/table/module/custom/panel.js +4 -0
- package/es/table/module/export/export-panel.js +3 -0
- package/es/table/module/export/import-panel.js +3 -0
- package/es/table/module/export/mixin.js +41 -22
- package/es/table/module/menu/mixin.js +5 -3
- package/es/table/src/body.js +6 -1
- package/es/table/src/column.js +2 -1
- package/es/table/src/columnInfo.js +6 -2
- package/es/table/src/footer.js +2 -0
- package/es/table/src/group.js +2 -1
- package/es/table/src/header.js +2 -0
- package/es/table/src/methods.js +39 -20
- package/es/table/src/table.js +13 -5
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/grid/src/grid.js +3 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +161 -58
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/mixin.js +4 -2
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +4 -0
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/export/export-panel.js +3 -0
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +3 -0
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +49 -18
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +8 -3
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/src/body.js +7 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/column.js +2 -1
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +11 -5
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +2 -0
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/group.js +2 -1
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/header.js +2 -0
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +44 -21
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +15 -3
- 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 +1 -1
- package/packages/grid/src/grid.ts +3 -1
- package/packages/table/module/custom/mixin.ts +7 -5
- package/packages/table/module/custom/panel.ts +4 -0
- package/packages/table/module/export/export-panel.ts +3 -0
- package/packages/table/module/export/import-panel.ts +3 -0
- package/packages/table/module/export/mixin.ts +43 -22
- package/packages/table/module/menu/mixin.ts +8 -6
- package/packages/table/src/body.ts +6 -1
- package/packages/table/src/column.ts +2 -1
- package/packages/table/src/columnInfo.ts +8 -4
- package/packages/table/src/footer.ts +2 -0
- package/packages/table/src/group.ts +2 -1
- package/packages/table/src/header.ts +5 -1
- package/packages/table/src/methods.ts +50 -31
- package/packages/table/src/table.ts +13 -5
- /package/es/{iconfont.1755178463571.ttf → iconfont.1755245623987.ttf} +0 -0
- /package/es/{iconfont.1755178463571.woff → iconfont.1755245623987.woff} +0 -0
- /package/es/{iconfont.1755178463571.woff2 → iconfont.1755245623987.woff2} +0 -0
- /package/lib/{iconfont.1755178463571.ttf → iconfont.1755245623987.ttf} +0 -0
- /package/lib/{iconfont.1755178463571.woff → iconfont.1755245623987.woff} +0 -0
- /package/lib/{iconfont.1755178463571.woff2 → iconfont.1755245623987.woff2} +0 -0
package/lib/table/src/methods.js
CHANGED
|
@@ -482,6 +482,7 @@ function updateScrollYStatus($xeTable, fullData) {
|
|
|
482
482
|
const {
|
|
483
483
|
treeConfig
|
|
484
484
|
} = props;
|
|
485
|
+
const $xeGanttView = internalData.xeGanttView;
|
|
485
486
|
const virtualYOpts = $xeTable.computeVirtualYOpts;
|
|
486
487
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
487
488
|
const {
|
|
@@ -491,6 +492,9 @@ function updateScrollYStatus($xeTable, fullData) {
|
|
|
491
492
|
// 如果gt为0,则总是启用
|
|
492
493
|
const scrollYLoad = (transform || !treeConfig) && !!virtualYOpts.enabled && virtualYOpts.gt > -1 && (virtualYOpts.gt === 0 || virtualYOpts.gt < allList.length);
|
|
493
494
|
reactData.scrollYLoad = scrollYLoad;
|
|
495
|
+
if ($xeGanttView) {
|
|
496
|
+
$xeGanttView.updateScrollYStatus(scrollYLoad);
|
|
497
|
+
}
|
|
494
498
|
return scrollYLoad;
|
|
495
499
|
}
|
|
496
500
|
/**
|
|
@@ -4449,9 +4453,11 @@ const Methods = {
|
|
|
4449
4453
|
const $xeTable = this;
|
|
4450
4454
|
// const slots = $xeTable.$scopedSlots
|
|
4451
4455
|
const $xeGrid = $xeTable.$xeGrid;
|
|
4456
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
4457
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
4452
4458
|
if (slotFunc) {
|
|
4453
|
-
if ($
|
|
4454
|
-
return $
|
|
4459
|
+
if ($xeGGWrapper) {
|
|
4460
|
+
return $xeGGWrapper.callSlot(slotFunc, params, h, vNodes);
|
|
4455
4461
|
}
|
|
4456
4462
|
// if (XEUtils.isString(slotFunc)) {
|
|
4457
4463
|
// slotFunc = slots[slotFunc] || null
|
|
@@ -4472,10 +4478,12 @@ const Methods = {
|
|
|
4472
4478
|
getParentElem() {
|
|
4473
4479
|
const $xeTable = this;
|
|
4474
4480
|
const $xeGrid = $xeTable.$xeGrid;
|
|
4481
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
4482
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
4475
4483
|
const {
|
|
4476
4484
|
$el
|
|
4477
4485
|
} = this;
|
|
4478
|
-
return $
|
|
4486
|
+
return $xeGGWrapper ? $xeGGWrapper.$el.parentNode : $el.parentNode;
|
|
4479
4487
|
},
|
|
4480
4488
|
/**
|
|
4481
4489
|
* 获取父容器的高度
|
|
@@ -4483,6 +4491,8 @@ const Methods = {
|
|
|
4483
4491
|
getParentHeight() {
|
|
4484
4492
|
const $xeTable = this;
|
|
4485
4493
|
const $xeGrid = $xeTable.$xeGrid;
|
|
4494
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
4495
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
4486
4496
|
const props = $xeTable;
|
|
4487
4497
|
const {
|
|
4488
4498
|
height
|
|
@@ -4493,8 +4503,8 @@ const Methods = {
|
|
|
4493
4503
|
const parentPaddingSize = height === '100%' || height === 'auto' ? (0, _dom.getPaddingTopBottomSize)(parentElem) : 0;
|
|
4494
4504
|
let parentWrapperHeight = 0;
|
|
4495
4505
|
if (parentElem) {
|
|
4496
|
-
if ($
|
|
4497
|
-
parentWrapperHeight = $
|
|
4506
|
+
if ($xeGGWrapper && (0, _dom.hasClass)(parentElem, 'vxe-grid--table-wrapper')) {
|
|
4507
|
+
parentWrapperHeight = $xeGGWrapper.getParentHeight();
|
|
4498
4508
|
} else {
|
|
4499
4509
|
parentWrapperHeight = parentElem.clientHeight;
|
|
4500
4510
|
}
|
|
@@ -4511,7 +4521,9 @@ const Methods = {
|
|
|
4511
4521
|
getExcludeHeight() {
|
|
4512
4522
|
const $xeTable = this;
|
|
4513
4523
|
const $xeGrid = $xeTable.$xeGrid;
|
|
4514
|
-
|
|
4524
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
4525
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
4526
|
+
return $xeGGWrapper ? $xeGGWrapper.getExcludeHeight() : 0;
|
|
4515
4527
|
},
|
|
4516
4528
|
/**
|
|
4517
4529
|
* 重置表格的一切数据状态
|
|
@@ -7017,6 +7029,7 @@ const Methods = {
|
|
|
7017
7029
|
preventEvent(evnt, type, args, next, end) {
|
|
7018
7030
|
const $xeTable = this;
|
|
7019
7031
|
const $xeGrid = $xeTable.$xeGrid;
|
|
7032
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
7020
7033
|
let evntList = interceptor.get(type);
|
|
7021
7034
|
// 兼容老版本
|
|
7022
7035
|
if (!evntList.length && type === 'event.clearEdit') {
|
|
@@ -7031,8 +7044,9 @@ const Methods = {
|
|
|
7031
7044
|
for (let i = 0; i < evntList.length; i++) {
|
|
7032
7045
|
const func = evntList[i];
|
|
7033
7046
|
const fnRest = func(Object.assign({
|
|
7034
|
-
$grid: $xeGrid,
|
|
7035
7047
|
$table: $xeTable,
|
|
7048
|
+
$grid: $xeGrid,
|
|
7049
|
+
$gantt: $xeGantt,
|
|
7036
7050
|
$event: evnt
|
|
7037
7051
|
}, args));
|
|
7038
7052
|
if (fnRest === false) {
|
|
@@ -7060,6 +7074,8 @@ const Methods = {
|
|
|
7060
7074
|
handleGlobalMousedownEvent(evnt) {
|
|
7061
7075
|
const $xeTable = this;
|
|
7062
7076
|
const $xeGrid = $xeTable.$xeGrid;
|
|
7077
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
7078
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
7063
7079
|
const {
|
|
7064
7080
|
$el,
|
|
7065
7081
|
$refs,
|
|
@@ -7160,7 +7176,7 @@ const Methods = {
|
|
|
7160
7176
|
}
|
|
7161
7177
|
}
|
|
7162
7178
|
} else if (mouseConfig) {
|
|
7163
|
-
if (!(0, _dom.getEventTargetNode)(evnt, $el).flag && !($
|
|
7179
|
+
if (!(0, _dom.getEventTargetNode)(evnt, $el).flag && !($xeGGWrapper && (0, _dom.getEventTargetNode)(evnt, $xeGGWrapper.$el).flag) && !(tableMenu && (0, _dom.getEventTargetNode)(evnt, tableMenu.$el).flag) && !($toolbar && (0, _dom.getEventTargetNode)(evnt, $toolbar.$el).flag)) {
|
|
7164
7180
|
if (this.clearSelected) {
|
|
7165
7181
|
this.clearSelected();
|
|
7166
7182
|
}
|
|
@@ -7184,7 +7200,7 @@ const Methods = {
|
|
|
7184
7200
|
if (ctxMenuStore.visible && tableMenu && !(0, _dom.getEventTargetNode)(evnt, tableMenu.$el).flag) {
|
|
7185
7201
|
this.closeMenu();
|
|
7186
7202
|
}
|
|
7187
|
-
const isActivated = (0, _dom.getEventTargetNode)(evnt, ($
|
|
7203
|
+
const isActivated = (0, _dom.getEventTargetNode)(evnt, ($xeGGWrapper || $xeTable).$el).flag;
|
|
7188
7204
|
// 如果存在校验,点击了表格之外则清除
|
|
7189
7205
|
if (!isActivated && editRules && validOpts.autoClear) {
|
|
7190
7206
|
this.validErrorMaps = {};
|
|
@@ -7262,6 +7278,7 @@ const Methods = {
|
|
|
7262
7278
|
const internalData = $xeTable;
|
|
7263
7279
|
const reactData = $xeTable;
|
|
7264
7280
|
const $xeGrid = $xeTable.$xeGrid;
|
|
7281
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
7265
7282
|
// 该行为只对当前激活的表格有效
|
|
7266
7283
|
if (internalData.isActivated) {
|
|
7267
7284
|
$xeTable.preventEvent(evnt, 'event.keydown', null, () => {
|
|
@@ -7487,7 +7504,8 @@ const Methods = {
|
|
|
7487
7504
|
column: selected.column,
|
|
7488
7505
|
columnIndex: $xeTable.getColumnIndex(selected.column),
|
|
7489
7506
|
$table: $xeTable,
|
|
7490
|
-
$grid: $xeGrid
|
|
7507
|
+
$grid: $xeGrid,
|
|
7508
|
+
$gantt: $xeGantt
|
|
7491
7509
|
};
|
|
7492
7510
|
// 是否被禁用
|
|
7493
7511
|
if (!beforeEditMethod || beforeEditMethod(params)) {
|
|
@@ -7515,7 +7533,8 @@ const Methods = {
|
|
|
7515
7533
|
column: selected.column,
|
|
7516
7534
|
columnIndex: $xeTable.getColumnIndex(selected.column),
|
|
7517
7535
|
$table: $xeTable,
|
|
7518
|
-
$grid: $xeGrid
|
|
7536
|
+
$grid: $xeGrid,
|
|
7537
|
+
$gantt: $xeGantt
|
|
7519
7538
|
};
|
|
7520
7539
|
// 是否被禁用
|
|
7521
7540
|
if (!beforeEditMethod || beforeEditMethod(params)) {
|
|
@@ -7546,7 +7565,8 @@ const Methods = {
|
|
|
7546
7565
|
rowIndex: $xeTable.getRowIndex(parentRow),
|
|
7547
7566
|
$rowIndex: $xeTable.getVMRowIndex(parentRow),
|
|
7548
7567
|
$table: $xeTable,
|
|
7549
|
-
$grid: $xeGrid
|
|
7568
|
+
$grid: $xeGrid,
|
|
7569
|
+
$gantt: $xeGantt
|
|
7550
7570
|
};
|
|
7551
7571
|
$xeTable.setTreeExpand(parentRow, false).then(() => $xeTable.scrollToRow(parentRow)).then(() => $xeTable.triggerCurrentRowEvent(evnt, params));
|
|
7552
7572
|
}
|
|
@@ -7567,7 +7587,8 @@ const Methods = {
|
|
|
7567
7587
|
column: selected.column,
|
|
7568
7588
|
columnIndex: $xeTable.getColumnIndex(selected.column),
|
|
7569
7589
|
$table: $xeTable,
|
|
7570
|
-
$grid: $xeGrid
|
|
7590
|
+
$grid: $xeGrid,
|
|
7591
|
+
$gantt: $xeGantt
|
|
7571
7592
|
};
|
|
7572
7593
|
if (!beforeEditMethod || beforeEditMethod(params)) {
|
|
7573
7594
|
if (editMethod) {
|
|
@@ -12152,7 +12173,6 @@ const Methods = {
|
|
|
12152
12173
|
elemStore,
|
|
12153
12174
|
fullColumnIdData
|
|
12154
12175
|
} = internalData;
|
|
12155
|
-
const $xeGanttView = internalData.xeGanttView;
|
|
12156
12176
|
const mouseOpts = $xeTable.computeMouseOpts;
|
|
12157
12177
|
const tableBody = $xeTable.$refs.refTableBody;
|
|
12158
12178
|
const tableBodyElem = tableBody ? tableBody.$el : null;
|
|
@@ -12217,9 +12237,6 @@ const Methods = {
|
|
|
12217
12237
|
if (isScrollXBig && mouseOpts.area) {
|
|
12218
12238
|
(0, _log.errLog)('vxe.error.notProp', ['mouse-config.area']);
|
|
12219
12239
|
}
|
|
12220
|
-
if ($xeGanttView) {
|
|
12221
|
-
$xeGanttView.updateScrollXSpace();
|
|
12222
|
-
}
|
|
12223
12240
|
return $xeTable.$nextTick(() => {
|
|
12224
12241
|
updateStyle($xeTable);
|
|
12225
12242
|
});
|
|
@@ -12540,6 +12557,7 @@ const Methods = {
|
|
|
12540
12557
|
const reactData = $xeTable;
|
|
12541
12558
|
const internalData = $xeTable;
|
|
12542
12559
|
const $xeGrid = $xeTable.$xeGrid;
|
|
12560
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
12543
12561
|
const {
|
|
12544
12562
|
showFooter,
|
|
12545
12563
|
footerData,
|
|
@@ -12557,7 +12575,8 @@ const Methods = {
|
|
|
12557
12575
|
columns: visibleColumn,
|
|
12558
12576
|
data: afterFullData,
|
|
12559
12577
|
$table: $xeTable,
|
|
12560
|
-
$grid: $xeGrid
|
|
12578
|
+
$grid: $xeGrid,
|
|
12579
|
+
$gantt: $xeGantt
|
|
12561
12580
|
}) : [];
|
|
12562
12581
|
}
|
|
12563
12582
|
reactData.footerTableData = footData;
|
|
@@ -12725,20 +12744,24 @@ const Methods = {
|
|
|
12725
12744
|
dispatchEvent(type, params, evnt) {
|
|
12726
12745
|
const $xeTable = this;
|
|
12727
12746
|
const $xeGrid = $xeTable.$xeGrid;
|
|
12747
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
12728
12748
|
$xeTable.$emit(type, createEvent(evnt, {
|
|
12729
12749
|
$table: $xeTable,
|
|
12730
|
-
$grid: $xeGrid
|
|
12750
|
+
$grid: $xeGrid,
|
|
12751
|
+
$gantt: $xeGantt
|
|
12731
12752
|
}, params));
|
|
12732
12753
|
},
|
|
12733
12754
|
// 已废弃,使用 dispatchEvent
|
|
12734
12755
|
emitEvent(type, params, evnt) {
|
|
12735
12756
|
const $xeTable = this;
|
|
12736
12757
|
const $xeGrid = $xeTable.$xeGrid;
|
|
12737
|
-
|
|
12758
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
12759
|
+
$xeTable.$emit(type, createEvent(evnt, {
|
|
12738
12760
|
$table: $xeTable,
|
|
12739
12761
|
$grid: $xeGrid,
|
|
12762
|
+
$gantt: $xeGantt,
|
|
12740
12763
|
$event: evnt
|
|
12741
|
-
}
|
|
12764
|
+
}));
|
|
12742
12765
|
},
|
|
12743
12766
|
focus() {
|
|
12744
12767
|
this.isActivated = true;
|