vxe-gantt 4.1.20 → 4.2.0
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/gantt/src/gantt-view.js +50 -47
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/gantt/src/gantt-view.js +49 -46
- package/lib/gantt/src/gantt-view.min.js +1 -1
- package/lib/index.umd.js +54 -51
- package/lib/index.umd.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 +3 -3
- package/packages/gantt/src/gantt-view.ts +58 -52
package/lib/index.umd.js
CHANGED
|
@@ -2785,7 +2785,7 @@ const {
|
|
|
2785
2785
|
setConfig,
|
|
2786
2786
|
setIcon
|
|
2787
2787
|
} = core_.VxeUI;
|
|
2788
|
-
core_.VxeUI.ganttVersion = "4.
|
|
2788
|
+
core_.VxeUI.ganttVersion = "4.2.0";
|
|
2789
2789
|
const ymdFormat = 'yyyy-MM-dd';
|
|
2790
2790
|
const ymdhmsFormat = 'yyyy-MM-dd HH:mm:ss';
|
|
2791
2791
|
setConfig({
|
|
@@ -2895,7 +2895,7 @@ setIcon({
|
|
|
2895
2895
|
const {
|
|
2896
2896
|
log
|
|
2897
2897
|
} = core_.VxeUI;
|
|
2898
|
-
const version = `gantt v${"4.
|
|
2898
|
+
const version = `gantt v${"4.2.0"}`;
|
|
2899
2899
|
const warnLog = log.create('warn', version);
|
|
2900
2900
|
const errLog = log.create('error', version);
|
|
2901
2901
|
;// ./packages/ui/src/depend.ts
|
|
@@ -4337,6 +4337,38 @@ function createInternalData() {
|
|
|
4337
4337
|
lastScrollLeft: 0
|
|
4338
4338
|
};
|
|
4339
4339
|
}
|
|
4340
|
+
function createReactData() {
|
|
4341
|
+
return {
|
|
4342
|
+
// 是否启用了横向 X 可视渲染方式加载
|
|
4343
|
+
scrollXLoad: false,
|
|
4344
|
+
// 是否启用了纵向 Y 可视渲染方式加载
|
|
4345
|
+
scrollYLoad: false,
|
|
4346
|
+
// 是否存在纵向滚动条
|
|
4347
|
+
overflowY: true,
|
|
4348
|
+
// 是否存在横向滚动条
|
|
4349
|
+
overflowX: true,
|
|
4350
|
+
// 纵向滚动条的宽度
|
|
4351
|
+
scrollbarWidth: 0,
|
|
4352
|
+
// 横向滚动条的高度
|
|
4353
|
+
scrollbarHeight: 0,
|
|
4354
|
+
// 最后滚动时间戳
|
|
4355
|
+
lastScrollTime: 0,
|
|
4356
|
+
lazScrollLoading: false,
|
|
4357
|
+
scrollVMLoading: false,
|
|
4358
|
+
scrollYHeight: 0,
|
|
4359
|
+
scrollYTop: 0,
|
|
4360
|
+
isScrollYBig: false,
|
|
4361
|
+
scrollXLeft: 0,
|
|
4362
|
+
scrollXWidth: 0,
|
|
4363
|
+
isScrollXBig: false,
|
|
4364
|
+
minViewDate: null,
|
|
4365
|
+
maxViewDate: null,
|
|
4366
|
+
tableData: [],
|
|
4367
|
+
tableColumn: [],
|
|
4368
|
+
headerGroups: [],
|
|
4369
|
+
viewCellWidth: 40
|
|
4370
|
+
};
|
|
4371
|
+
}
|
|
4340
4372
|
const maxYHeight = 5e6;
|
|
4341
4373
|
// const maxXWidth = 5e6
|
|
4342
4374
|
/* harmony default export */ var gantt_view = (defineVxeComponent({
|
|
@@ -4374,36 +4406,7 @@ const maxYHeight = 5e6;
|
|
|
4374
4406
|
const refScrollXSpaceElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
4375
4407
|
const refScrollYSpaceElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
4376
4408
|
const refColInfoElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
4377
|
-
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(
|
|
4378
|
-
// 是否启用了横向 X 可视渲染方式加载
|
|
4379
|
-
scrollXLoad: false,
|
|
4380
|
-
// 是否启用了纵向 Y 可视渲染方式加载
|
|
4381
|
-
scrollYLoad: false,
|
|
4382
|
-
// 是否存在纵向滚动条
|
|
4383
|
-
overflowY: true,
|
|
4384
|
-
// 是否存在横向滚动条
|
|
4385
|
-
overflowX: true,
|
|
4386
|
-
// 纵向滚动条的宽度
|
|
4387
|
-
scrollbarWidth: 0,
|
|
4388
|
-
// 横向滚动条的高度
|
|
4389
|
-
scrollbarHeight: 0,
|
|
4390
|
-
// 最后滚动时间戳
|
|
4391
|
-
lastScrollTime: 0,
|
|
4392
|
-
lazScrollLoading: false,
|
|
4393
|
-
scrollVMLoading: false,
|
|
4394
|
-
scrollYHeight: 0,
|
|
4395
|
-
scrollYTop: 0,
|
|
4396
|
-
isScrollYBig: false,
|
|
4397
|
-
scrollXLeft: 0,
|
|
4398
|
-
scrollXWidth: 0,
|
|
4399
|
-
isScrollXBig: false,
|
|
4400
|
-
minViewDate: null,
|
|
4401
|
-
maxViewDate: null,
|
|
4402
|
-
tableData: [],
|
|
4403
|
-
tableColumn: [],
|
|
4404
|
-
headerGroups: [],
|
|
4405
|
-
viewCellWidth: 40
|
|
4406
|
-
});
|
|
4409
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(createReactData());
|
|
4407
4410
|
const internalData = createInternalData();
|
|
4408
4411
|
const refMaps = {
|
|
4409
4412
|
refElem,
|
|
@@ -5520,27 +5523,30 @@ const maxYHeight = 5e6;
|
|
|
5520
5523
|
// if (footerTableElem) {
|
|
5521
5524
|
// footerTableElem.style.transform = `translate(${xSpaceLeft}px, 0px)`
|
|
5522
5525
|
// }
|
|
5526
|
+
const ySpaceWidth = scrollXWidth;
|
|
5523
5527
|
const layoutList = ['header', 'body', 'footer'];
|
|
5524
5528
|
layoutList.forEach(layout => {
|
|
5525
5529
|
const xSpaceElem = getRefElem(elemStore[`main-${layout}-xSpace`]);
|
|
5526
5530
|
if (xSpaceElem) {
|
|
5527
|
-
xSpaceElem.style.width = scrollXLoad ? `${
|
|
5531
|
+
xSpaceElem.style.width = scrollXLoad ? `${ySpaceWidth}px` : '';
|
|
5528
5532
|
}
|
|
5529
5533
|
});
|
|
5530
5534
|
const scrollXSpaceEl = refScrollXSpaceElem.value;
|
|
5531
5535
|
if (scrollXSpaceEl) {
|
|
5532
|
-
scrollXSpaceEl.style.width = `${
|
|
5536
|
+
scrollXSpaceEl.style.width = `${ySpaceWidth}px`;
|
|
5533
5537
|
}
|
|
5534
5538
|
const beforeWrapper = getRefElem(elemStore['main-chart-before-wrapper']);
|
|
5535
5539
|
const beforeSvgElem = beforeWrapper ? beforeWrapper.firstElementChild : null;
|
|
5536
5540
|
if (beforeSvgElem) {
|
|
5537
|
-
beforeSvgElem.style.width = `${
|
|
5541
|
+
beforeSvgElem.style.width = `${ySpaceWidth}px`;
|
|
5538
5542
|
}
|
|
5539
5543
|
const afterWrapper = getRefElem(elemStore['main-chart-after-wrapper']);
|
|
5540
5544
|
const afterSvgElem = afterWrapper ? afterWrapper.firstElementChild : null;
|
|
5541
5545
|
if (afterSvgElem) {
|
|
5542
|
-
afterSvgElem.style.width = `${
|
|
5546
|
+
afterSvgElem.style.width = `${ySpaceWidth}px`;
|
|
5543
5547
|
}
|
|
5548
|
+
reactData.scrollXLeft = xSpaceLeft;
|
|
5549
|
+
reactData.scrollXWidth = ySpaceWidth;
|
|
5544
5550
|
calcScrollbar();
|
|
5545
5551
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
5546
5552
|
};
|
|
@@ -5583,7 +5589,7 @@ const maxYHeight = 5e6;
|
|
|
5583
5589
|
bodyTableElem.style.transform = `translate(${reactData.scrollXLeft || 0}px, ${scrollYTop}px)`;
|
|
5584
5590
|
}
|
|
5585
5591
|
if (bodyChartWrapperElem) {
|
|
5586
|
-
bodyChartWrapperElem.style.transform = `
|
|
5592
|
+
bodyChartWrapperElem.style.transform = `translateY(${scrollYTop}px)`;
|
|
5587
5593
|
}
|
|
5588
5594
|
const bodyYSpaceElem = getRefElem(elemStore['main-body-ySpace']);
|
|
5589
5595
|
if (bodyYSpaceElem) {
|
|
@@ -5743,7 +5749,7 @@ const maxYHeight = 5e6;
|
|
|
5743
5749
|
}
|
|
5744
5750
|
});
|
|
5745
5751
|
},
|
|
5746
|
-
updateViewData() {
|
|
5752
|
+
updateViewData(force) {
|
|
5747
5753
|
const $xeTable = internalData.xeTable;
|
|
5748
5754
|
if ($xeTable) {
|
|
5749
5755
|
const tableReactData = $xeTable.reactData;
|
|
@@ -5751,6 +5757,10 @@ const maxYHeight = 5e6;
|
|
|
5751
5757
|
tableData
|
|
5752
5758
|
} = tableReactData;
|
|
5753
5759
|
reactData.tableData = tableData;
|
|
5760
|
+
if (force) {
|
|
5761
|
+
handleUpdateData();
|
|
5762
|
+
}
|
|
5763
|
+
handleRecalculateStyle();
|
|
5754
5764
|
}
|
|
5755
5765
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
5756
5766
|
},
|
|
@@ -6048,19 +6058,12 @@ const maxYHeight = 5e6;
|
|
|
6048
6058
|
class: 'vxe-gantt-view--column-info'
|
|
6049
6059
|
})])]);
|
|
6050
6060
|
};
|
|
6051
|
-
const tdFlag = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)(0);
|
|
6052
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => reactData.tableData, () => {
|
|
6053
|
-
tdFlag.value++;
|
|
6054
|
-
});
|
|
6055
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => reactData.tableData.length, () => {
|
|
6056
|
-
tdFlag.value++;
|
|
6057
|
-
});
|
|
6058
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(tdFlag, () => {
|
|
6059
|
-
handleUpdateData();
|
|
6060
|
-
});
|
|
6061
6061
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
6062
6062
|
globalEvents.on($xeGanttView, 'resize', handleGlobalResizeEvent);
|
|
6063
6063
|
});
|
|
6064
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
6065
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, createReactData());
|
|
6066
|
+
});
|
|
6064
6067
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
|
|
6065
6068
|
globalEvents.off($xeGanttView, 'keydown');
|
|
6066
6069
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, createInternalData());
|
|
@@ -6126,7 +6129,7 @@ function gantt_createInternalData() {
|
|
|
6126
6129
|
}
|
|
6127
6130
|
};
|
|
6128
6131
|
}
|
|
6129
|
-
function
|
|
6132
|
+
function gantt_createReactData() {
|
|
6130
6133
|
return {
|
|
6131
6134
|
tableLoading: false,
|
|
6132
6135
|
proxyInited: false,
|
|
@@ -6221,7 +6224,7 @@ function getViewTypeLevel(type) {
|
|
|
6221
6224
|
const {
|
|
6222
6225
|
computeSize
|
|
6223
6226
|
} = useFns.useSize(props);
|
|
6224
|
-
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(
|
|
6227
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(gantt_createReactData());
|
|
6225
6228
|
const internalData = gantt_createInternalData();
|
|
6226
6229
|
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
6227
6230
|
const refTable = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
@@ -8803,7 +8806,7 @@ function getViewTypeLevel(type) {
|
|
|
8803
8806
|
gantt_globalEvents.on($xeGantt, 'keydown', handleGlobalKeydownEvent);
|
|
8804
8807
|
});
|
|
8805
8808
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
8806
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData,
|
|
8809
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, gantt_createReactData());
|
|
8807
8810
|
});
|
|
8808
8811
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
|
|
8809
8812
|
gantt_globalEvents.off($xeGantt, 'keydown');
|