vxe-gantt 3.3.21 → 3.4.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 +10 -6
- package/es/gantt/src/gantt.js +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/gantt/src/gantt-view.js +10 -6
- package/lib/gantt/src/gantt-view.min.js +1 -1
- package/lib/gantt/src/gantt.js +1 -1
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/index.umd.js +13 -9
- 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 +10 -6
- package/packages/gantt/src/gantt.ts +1 -1
package/lib/ui/index.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.default = void 0;
|
|
|
13
13
|
var _core = require("@vxe-ui/core");
|
|
14
14
|
var setConfig = _core.VxeUI.setConfig,
|
|
15
15
|
setIcon = _core.VxeUI.setIcon;
|
|
16
|
-
_core.VxeUI.ganttVersion = "3.
|
|
16
|
+
_core.VxeUI.ganttVersion = "3.4.0";
|
|
17
17
|
var ymdFormat = 'yyyy-MM-dd';
|
|
18
18
|
var ymdhmsFormat = 'yyyy-MM-dd HH:mm:ss';
|
|
19
19
|
setConfig({
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.default=void 0;var _core=require("@vxe-ui/core"),setConfig=_core.VxeUI.setConfig,setIcon=_core.VxeUI.setIcon,ymdFormat=(_core.VxeUI.ganttVersion="3.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"VxeUI",{enumerable:!0,get:function(){return _core.VxeUI}}),exports.default=void 0;var _core=require("@vxe-ui/core"),setConfig=_core.VxeUI.setConfig,setIcon=_core.VxeUI.setIcon,ymdFormat=(_core.VxeUI.ganttVersion="3.4.0","yyyy-MM-dd"),ymdhmsFormat="yyyy-MM-dd HH:mm:ss",iconPrefix=(setConfig({gantt:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,showLoading:!0,showResponseMsg:!0,showActionMsg:!0,response:{list:null,result:"result",total:"page.total",message:"message"}},taskBarTooltipConfig:{enterable:!0},taskLinkConfig:{enabled:!0,isHover:!0,showArrow:!0},taskViewScaleConfig:{year:{valueFormat:ymdFormat},quarter:{valueFormat:ymdFormat},month:{valueFormat:ymdFormat},week:{startDay:1,valueFormat:ymdFormat},day:{valueFormat:ymdFormat},date:{valueFormat:ymdFormat},hour:{valueFormat:ymdhmsFormat},minute:{valueFormat:ymdhmsFormat},second:{valueFormat:ymdhmsFormat}},taskViewConfig:{showNowLine:!0,gridding:{leftSpacing:1,rightSpacing:1}},taskSplitConfig:{enabled:!0,resize:!0,showCollapseTableButton:!0,showCollapseTaskButton:!0},taskBarSubviewConfig:{}}}),"vxe-icon-"),_default=(setIcon({GANTT_VIEW_LEFT_OPEN:iconPrefix+"arrow-left",GANTT_VIEW_LEFT_CLOSE:iconPrefix+"arrow-right",GANTT_VIEW_RIGHT_OPEN:iconPrefix+"arrow-right",GANTT_VIEW_RIGHT_CLOSE:iconPrefix+"arrow-left",GANTT_VIEW_TASK_MILESTONE:iconPrefix+"square-fill rotate45"}),exports.default=_core.VxeUI);
|
package/lib/ui/src/log.js
CHANGED
|
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.warnLog = exports.errLog = void 0;
|
|
7
7
|
var _core = require("@vxe-ui/core");
|
|
8
8
|
var log = _core.VxeUI.log;
|
|
9
|
-
var version = "gantt v".concat("3.
|
|
9
|
+
var version = "gantt v".concat("3.4.0");
|
|
10
10
|
var warnLog = exports.warnLog = log.create('warn', version);
|
|
11
11
|
var errLog = exports.errLog = log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),log=_core.VxeUI.log,version="gantt v".concat("3.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),log=_core.VxeUI.log,version="gantt v".concat("3.4.0"),warnLog=exports.warnLog=log.create("warn",version),errLog=exports.errLog=log.create("error",version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vxe-gantt",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "A vue based gantt component",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"update": "npm install --legacy-peer-deps",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"vue": "~2.6.14",
|
|
61
61
|
"vue-i18n": "^8.15.1",
|
|
62
62
|
"vue-router": "^3.5.1",
|
|
63
|
-
"vxe-pc-ui": "^3.
|
|
64
|
-
"vxe-table": "^3.20.
|
|
63
|
+
"vxe-pc-ui": "^3.14.2",
|
|
64
|
+
"vxe-table": "^3.20.13"
|
|
65
65
|
},
|
|
66
66
|
"vetur": {
|
|
67
67
|
"tags": "helper/vetur/tags.json",
|
|
@@ -449,13 +449,15 @@ function createChartRender ($xeGanttView: VxeGanttViewConstructor & VxeGanttView
|
|
|
449
449
|
const endStr = XEUtils.toDateString(endDate, 'yyyy-MM-dd')
|
|
450
450
|
const endFirstDate = XEUtils.getWhatDay(endDate, 0, 'first')
|
|
451
451
|
const minuteSize = Math.floor((XEUtils.getWhatDay(endDate, 1, 'first').getTime() - endFirstDate.getTime()) / minuteMs)
|
|
452
|
-
|
|
452
|
+
// 开始和结束时间是否存在偏移时
|
|
453
|
+
const startSubtract = (startDate.getTime() - startFirstDate.getTime()) / minuteMs / minuteSize
|
|
454
|
+
const endSubtract = (endDate.getTime() - endFirstDate.getTime()) / minuteMs / minuteSize
|
|
453
455
|
const addSize = Math.max(0, (endDate.getTime() - endFirstDate.getTime()) / minuteMs + 1) / minuteSize
|
|
454
|
-
const offsetLeftSize = (indexMaps[startStr] || 0) +
|
|
456
|
+
const offsetLeftSize = (indexMaps[startStr] || 0) + startSubtract
|
|
455
457
|
// 如果最小轴为天,当存在时分秒时,在当前单元格内渲染维度;如果不存在,则填充满单元格
|
|
456
458
|
return {
|
|
457
459
|
offsetLeftSize,
|
|
458
|
-
offsetWidthSize: (indexMaps[endStr] || 0) - offsetLeftSize + addSize + (
|
|
460
|
+
offsetWidthSize: (indexMaps[endStr] || 0) - offsetLeftSize + addSize + (startSubtract || endSubtract ? 0 : 1)
|
|
459
461
|
}
|
|
460
462
|
}
|
|
461
463
|
}
|
|
@@ -473,12 +475,14 @@ function createChartRender ($xeGanttView: VxeGanttViewConstructor & VxeGanttView
|
|
|
473
475
|
const endStr = XEUtils.toDateString(endDate, 'yyyy-MM-dd HH')
|
|
474
476
|
const endFirstDate = XEUtils.getWhatHours(endDate, 0, 'first')
|
|
475
477
|
const minuteSize = Math.floor((XEUtils.getWhatHours(endDate, 1, 'first').getTime() - endFirstDate.getTime()) / minuteMs)
|
|
476
|
-
|
|
478
|
+
// 开始和结束时间是否存在偏移时
|
|
479
|
+
const startSubtract = (startDate.getTime() - startFirstDate.getTime()) / minuteMs / minuteSize
|
|
480
|
+
const endSubtract = (endDate.getTime() - endFirstDate.getTime()) / minuteMs / minuteSize
|
|
477
481
|
const addSize = Math.max(0, (endDate.getTime() - endFirstDate.getTime()) / minuteMs + 1) / minuteSize
|
|
478
|
-
const offsetLeftSize = (indexMaps[startStr] || 0) +
|
|
482
|
+
const offsetLeftSize = (indexMaps[startStr] || 0) + startSubtract
|
|
479
483
|
return {
|
|
480
484
|
offsetLeftSize,
|
|
481
|
-
offsetWidthSize: (indexMaps[endStr] || 0) - offsetLeftSize + addSize
|
|
485
|
+
offsetWidthSize: (indexMaps[endStr] || 0) - offsetLeftSize + addSize + (startSubtract || endSubtract ? 0 : 1)
|
|
482
486
|
}
|
|
483
487
|
}
|
|
484
488
|
}
|
|
@@ -78,7 +78,7 @@ XEUtils.each((VxeTableComponent as any).methods, (fn, name) => {
|
|
|
78
78
|
function createInternalData (): GanttInternalData {
|
|
79
79
|
return {
|
|
80
80
|
linkFromConfMaps: {},
|
|
81
|
-
|
|
81
|
+
linkToConfMaps: {},
|
|
82
82
|
linkUniqueMaps: {},
|
|
83
83
|
uFoot: false,
|
|
84
84
|
resizeTableWidth: 0,
|