vxe-gantt 3.6.2 → 3.6.3
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 +9 -2
- package/es/gantt/src/gantt.js +28 -8
- package/es/gantt/style.css +27 -15
- package/es/gantt/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-gantt/style.css +27 -15
- package/es/vxe-gantt/style.min.css +1 -1
- package/lib/gantt/src/gantt-view.js +9 -2
- package/lib/gantt/src/gantt-view.min.js +1 -1
- package/lib/gantt/src/gantt.js +31 -7
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/gantt/style/style.css +27 -15
- package/lib/gantt/style/style.min.css +1 -1
- package/lib/index.umd.js +42 -11
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +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/lib/vxe-gantt/style/style.css +27 -15
- package/lib/vxe-gantt/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/gantt/src/gantt-view.ts +9 -2
- package/packages/gantt/src/gantt.ts +28 -8
- package/styles/components/gantt.scss +56 -21
|
@@ -98,6 +98,14 @@ function createReactData (): GanttReactData {
|
|
|
98
98
|
return {
|
|
99
99
|
tableLoading: false,
|
|
100
100
|
proxyInited: false,
|
|
101
|
+
// 是否存在纵向滚动条
|
|
102
|
+
overflowY: false,
|
|
103
|
+
// 是否存在横向滚动条
|
|
104
|
+
overflowX: false,
|
|
105
|
+
// 纵向滚动条的宽度
|
|
106
|
+
scrollbarWidth: 0,
|
|
107
|
+
// 横向滚动条的高度
|
|
108
|
+
scrollbarHeight: 0,
|
|
101
109
|
isZMax: false,
|
|
102
110
|
tableLinks: [],
|
|
103
111
|
tableData: [],
|
|
@@ -436,13 +444,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
436
444
|
const scrollbarOpts = $xeGantt.computeScrollbarOpts as VxeTablePropTypes.ScrollbarConfig
|
|
437
445
|
return !!(scrollbarOpts.y && scrollbarOpts.y.position === 'left')
|
|
438
446
|
},
|
|
439
|
-
|
|
447
|
+
computeWrapperStyle () {
|
|
440
448
|
const $xeGantt = this
|
|
441
449
|
const props = $xeGantt
|
|
442
450
|
const reactData = $xeGantt.reactData
|
|
443
451
|
|
|
444
452
|
const { height, maxHeight, taskBarSubviewConfig } = props
|
|
445
|
-
const { isZMax, tZindex } = reactData
|
|
453
|
+
const { isZMax, tZindex, overflowY, scrollbarWidth } = reactData
|
|
446
454
|
const taskViewOpts = $xeGantt.computeTaskViewOpts as VxeGanttPropTypes.TaskViewConfig
|
|
447
455
|
const { viewStyle, tableStyle } = taskViewOpts
|
|
448
456
|
const taskBarOpts = $xeGantt.computeTaskBarOpts as VxeGanttPropTypes.TaskBarConfig
|
|
@@ -450,7 +458,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
450
458
|
const taskBarSubviewOpts = $xeGantt.computeTaskBarSubviewOpts
|
|
451
459
|
const taskNowLineOpts = $xeGantt.computeTaskNowLineOpts
|
|
452
460
|
const { fontColor: nlfColor, bgColor: nlbgColor, width: nlWidth } = taskNowLineOpts
|
|
453
|
-
const stys: VxeComponentStyleType = {
|
|
461
|
+
const stys: VxeComponentStyleType = {
|
|
462
|
+
'--vxe-ui-gantt-scrollbar-width': (overflowY && scrollbarWidth ? scrollbarWidth : 0) + 'px'
|
|
463
|
+
}
|
|
454
464
|
if (isZMax) {
|
|
455
465
|
stys.zIndex = tZindex
|
|
456
466
|
} else {
|
|
@@ -2628,8 +2638,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2628
2638
|
},
|
|
2629
2639
|
renderChildLayout (h: CreateElement, layoutKeys: VxeGanttDefines.LayoutKey[]) {
|
|
2630
2640
|
const $xeGantt = this
|
|
2641
|
+
const reactData = $xeGantt.reactData
|
|
2631
2642
|
|
|
2643
|
+
const { showLeftView, showRightView } = reactData
|
|
2632
2644
|
const taskSplitOpts = $xeGantt.computeTaskSplitOpts
|
|
2645
|
+
const scrollbarXToTop = $xeGantt.computeScrollbarXToTop
|
|
2646
|
+
const scrollbarYToLeft = $xeGantt.computeScrollbarYToLeft
|
|
2633
2647
|
const { autoHideCollapseButton } = taskSplitOpts
|
|
2634
2648
|
const childVNs: VNode[] = []
|
|
2635
2649
|
layoutKeys.forEach(key => {
|
|
@@ -2648,7 +2662,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2648
2662
|
h('div', {
|
|
2649
2663
|
ref: 'refGanttContainerElem',
|
|
2650
2664
|
key: 'tv',
|
|
2651
|
-
class: ['vxe-gantt--gantt-container', {
|
|
2665
|
+
class: ['vxe-gantt--gantt-container', `sx-pos--${scrollbarXToTop ? 'top' : 'bottom'}`, `sy-pos--${scrollbarYToLeft ? 'left' : 'right'}`, {
|
|
2666
|
+
'show--left': showLeftView,
|
|
2667
|
+
'hide--left': !showLeftView,
|
|
2668
|
+
'show--right': showRightView,
|
|
2669
|
+
'hide--right': !showRightView,
|
|
2652
2670
|
'is--ah-split-btn': autoHideCollapseButton
|
|
2653
2671
|
}]
|
|
2654
2672
|
}, [
|
|
@@ -2777,9 +2795,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2777
2795
|
const props = $xeGantt
|
|
2778
2796
|
const reactData = $xeGantt.reactData
|
|
2779
2797
|
|
|
2780
|
-
const { showLeftView, showRightView, showSplitAnimat } = reactData
|
|
2798
|
+
const { showLeftView, showRightView, overflowY, overflowX, showSplitAnimat } = reactData
|
|
2781
2799
|
const vSize = $xeGantt.computeSize
|
|
2782
|
-
const
|
|
2800
|
+
const wrapperStyle = $xeGantt.computeWrapperStyle
|
|
2783
2801
|
const isLoading = $xeGantt.computeIsLoading
|
|
2784
2802
|
const taskSplitOpts = $xeGantt.computeTaskSplitOpts
|
|
2785
2803
|
const tableBorder = $xeGantt.computeTableBorder
|
|
@@ -2797,9 +2815,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
2797
2815
|
'show--left': showLeftView,
|
|
2798
2816
|
'hide--left': !showLeftView,
|
|
2799
2817
|
'show--right': showRightView,
|
|
2800
|
-
'hide--right': !showRightView
|
|
2818
|
+
'hide--right': !showRightView,
|
|
2819
|
+
'is--scroll-y': overflowY,
|
|
2820
|
+
'is--scroll-x': overflowX
|
|
2801
2821
|
}],
|
|
2802
|
-
style:
|
|
2822
|
+
style: wrapperStyle
|
|
2803
2823
|
}, $xeGantt.renderLayout(h))
|
|
2804
2824
|
}
|
|
2805
2825
|
},
|
|
@@ -73,13 +73,6 @@
|
|
|
73
73
|
flex-grow: 1;
|
|
74
74
|
overflow: hidden;
|
|
75
75
|
}
|
|
76
|
-
.vxe-gantt--view-split-bar {
|
|
77
|
-
flex-shrink: 0;
|
|
78
|
-
width: var(--vxe-ui-gantt-view-split-bar-width);
|
|
79
|
-
&.is--resize {
|
|
80
|
-
cursor: col-resize;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
76
|
.vxe-gantt--view-split-bar-handle {
|
|
84
77
|
background-color: var(--vxe-ui-gantt-view-split-bar-background-color);
|
|
85
78
|
&:hover,
|
|
@@ -87,8 +80,25 @@
|
|
|
87
80
|
background-color: var(--vxe-ui-gantt-view-split-bar-hover-background-color);
|
|
88
81
|
}
|
|
89
82
|
}
|
|
83
|
+
&.is--animat {
|
|
84
|
+
& .vxe-gantt--table-wrapper {
|
|
85
|
+
@include baseMixin.createAnimationTransition(width, .3s);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
&.show--animat {
|
|
89
|
+
&.hide--right {
|
|
90
|
+
.vxe-gantt--table-wrapper {
|
|
91
|
+
width: calc(100% - var(--vxe-ui-gantt-view-split-bar-width)) !important;
|
|
92
|
+
flex-shrink: 0;
|
|
93
|
+
flex-grow: unset;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.vxe-gantt--gantt-container {
|
|
90
100
|
&.hide--left {
|
|
91
|
-
.vxe-gantt--table-wrapper {
|
|
101
|
+
& > .vxe-gantt--table-wrapper {
|
|
92
102
|
width: 0px !important;
|
|
93
103
|
flex-shrink: 0;
|
|
94
104
|
flex-grow: unset;
|
|
@@ -96,7 +106,7 @@
|
|
|
96
106
|
}
|
|
97
107
|
&.show--left {
|
|
98
108
|
&.show--right {
|
|
99
|
-
.vxe-gantt--table-wrapper {
|
|
109
|
+
& > .vxe-gantt--table-wrapper {
|
|
100
110
|
flex-grow: unset;
|
|
101
111
|
flex-shrink: 0;
|
|
102
112
|
width: var(--vxe-ui-gantt-view-table-default-width);
|
|
@@ -104,28 +114,29 @@
|
|
|
104
114
|
}
|
|
105
115
|
}
|
|
106
116
|
&.hide--right {
|
|
107
|
-
.vxe-gantt--view-wrapper {
|
|
117
|
+
& > .vxe-gantt--view-wrapper {
|
|
108
118
|
width: 0px !important;
|
|
109
119
|
flex-shrink: 0;
|
|
110
120
|
flex-grow: unset;
|
|
111
121
|
}
|
|
112
122
|
}
|
|
113
|
-
&.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
&.show--animat {
|
|
119
|
-
&.hide--right {
|
|
120
|
-
.vxe-gantt--table-wrapper {
|
|
121
|
-
width: calc(100% - var(--vxe-ui-gantt-view-split-bar-width)) !important;
|
|
122
|
-
flex-shrink: 0;
|
|
123
|
-
flex-grow: unset;
|
|
123
|
+
&.show--left {
|
|
124
|
+
&.show--right {
|
|
125
|
+
.vxe-gantt--view-split-bar {
|
|
126
|
+
width: var(--vxe-ui-gantt-view-split-bar-width);
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
131
|
|
|
132
|
+
.vxe-gantt--view-split-bar {
|
|
133
|
+
width: 0;
|
|
134
|
+
flex-shrink: 0;
|
|
135
|
+
&.is--resize {
|
|
136
|
+
cursor: col-resize;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
129
140
|
.vxe-gantt--layout-body-wrapper {
|
|
130
141
|
display: flex;
|
|
131
142
|
flex-direction: row;
|
|
@@ -361,6 +372,30 @@
|
|
|
361
372
|
font-size: 0.5em;
|
|
362
373
|
}
|
|
363
374
|
}
|
|
375
|
+
.vxe-gantt--gantt-container {
|
|
376
|
+
&.sy-pos--right {
|
|
377
|
+
&.hide--right {
|
|
378
|
+
& > .vxe-gantt--view-split-bar {
|
|
379
|
+
.vxe-gantt--view-split-bar-action-btn {
|
|
380
|
+
&.is--prev {
|
|
381
|
+
left: calc(var(--vxe-ui-gantt-view-split-bar-action-btn-width) * -1 - var(--vxe-ui-gantt-scrollbar-width) - 0.2em);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
&.sy-pos--left {
|
|
388
|
+
&.hide--left {
|
|
389
|
+
& > .vxe-gantt--view-split-bar {
|
|
390
|
+
.vxe-gantt--view-split-bar-action-btn {
|
|
391
|
+
&.is--next {
|
|
392
|
+
right: calc(var(--vxe-ui-gantt-view-split-bar-action-btn-width) * -1 - var(--vxe-ui-gantt-scrollbar-width) - 0.2em);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
364
399
|
|
|
365
400
|
.vxe-gantt--resizable-split-tip {
|
|
366
401
|
display: none;
|