vxe-gantt 0.0.3 → 4.0.0-beta.1
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/README.md +1 -1
- package/es/gantt/src/emits.js +5 -1
- package/es/gantt/src/gantt-body.js +11 -2
- package/es/gantt/src/gantt-chart.js +35 -14
- package/es/gantt/src/gantt-header.js +5 -2
- package/es/gantt/src/gantt-view.js +5 -1
- package/es/gantt/src/gantt.js +84 -32
- package/es/gantt/src/grid-props.js +1 -1
- package/es/gantt/src/props.js +1 -1
- package/es/gantt/src/table-props.js +1 -1
- package/es/gantt/style.css +36 -17
- 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 +9 -2
- package/es/ui/src/log.js +3 -2
- package/es/ui/src/utils.js +3 -0
- package/es/vxe-gantt/style.css +36 -17
- package/es/vxe-gantt/style.min.css +1 -1
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/gantt/src/emits.js +1 -1
- package/lib/gantt/src/emits.min.js +1 -1
- package/lib/gantt/src/gantt-body.js +16 -2
- package/lib/gantt/src/gantt-body.min.js +1 -1
- package/lib/gantt/src/gantt-chart.js +47 -10
- package/lib/gantt/src/gantt-chart.min.js +1 -1
- package/lib/gantt/src/gantt-header.js +6 -2
- package/lib/gantt/src/gantt-header.min.js +1 -1
- package/lib/gantt/src/gantt-view.js +6 -2
- package/lib/gantt/src/gantt-view.min.js +1 -1
- package/lib/gantt/src/gantt.js +101 -35
- package/lib/gantt/src/gantt.min.js +1 -1
- package/lib/gantt/src/grid-props.js +2 -2
- package/lib/gantt/src/grid-props.min.js +1 -1
- package/lib/gantt/src/props.js +2 -1
- package/lib/gantt/src/props.min.js +1 -1
- package/lib/gantt/src/table-props.js +2 -2
- package/lib/gantt/src/table-props.min.js +1 -1
- package/lib/gantt/style/style.css +36 -17
- package/lib/gantt/style/style.min.css +1 -1
- package/lib/index.umd.js +214 -73
- 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 +13 -3
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +6 -3
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/utils.js +4 -0
- package/lib/ui/src/utils.min.js +1 -1
- package/lib/vxe-gantt/style/style.css +36 -17
- package/lib/vxe-gantt/style/style.min.css +1 -1
- package/package.json +4 -4
- package/packages/gantt/src/emits.ts +6 -1
- package/packages/gantt/src/gantt-body.ts +11 -2
- package/packages/gantt/src/gantt-chart.ts +37 -15
- package/packages/gantt/src/gantt-header.ts +5 -2
- package/packages/gantt/src/gantt-view.ts +5 -1
- package/packages/gantt/src/gantt.ts +90 -32
- package/packages/gantt/src/grid-props.ts +1 -1
- package/packages/gantt/src/props.ts +2 -1
- package/packages/gantt/src/table-props.ts +1 -1
- package/packages/ui/index.ts +9 -1
- package/packages/ui/src/log.ts +3 -1
- package/packages/ui/src/utils.ts +4 -0
- package/styles/components/gantt-module/gantt-chart.scss +28 -9
- package/styles/components/gantt.scss +12 -7
- package/styles/theme/base.scss +5 -1
|
@@ -9,5 +9,6 @@ export const ganttProps = {
|
|
|
9
9
|
layouts: Array as PropType<VxeGanttPropTypes.Layouts>,
|
|
10
10
|
taskConfig: Object as PropType<VxeGanttPropTypes.TaskConfig>,
|
|
11
11
|
taskViewConfig: Object as PropType<VxeGanttPropTypes.TaskViewConfig>,
|
|
12
|
-
taskBarConfig: Object as PropType<VxeGanttPropTypes.TaskBarConfig
|
|
12
|
+
taskBarConfig: Object as PropType<VxeGanttPropTypes.TaskBarConfig>,
|
|
13
|
+
taskSplitConfig: Object as PropType<VxeGanttPropTypes.TaskSplitConfig>
|
|
13
14
|
}
|
package/packages/ui/index.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { VxeUI
|
|
1
|
+
import { VxeUI } from '@vxe-ui/core'
|
|
2
|
+
|
|
3
|
+
const { setConfig, setIcon } = VxeUI
|
|
2
4
|
|
|
3
5
|
VxeUI.ganttVersion = process.env.VUE_APP_VXE_VERSION as string
|
|
4
6
|
|
|
@@ -39,6 +41,12 @@ setConfig({
|
|
|
39
41
|
// afterDelete: null,
|
|
40
42
|
// beforeSave: null,
|
|
41
43
|
// afterSave: null
|
|
44
|
+
},
|
|
45
|
+
taskSplitConfig: {
|
|
46
|
+
enabled: true,
|
|
47
|
+
resize: true,
|
|
48
|
+
showCollapseTableButton: true,
|
|
49
|
+
showCollapseTaskButton: true
|
|
42
50
|
}
|
|
43
51
|
}
|
|
44
52
|
})
|
package/packages/ui/src/log.ts
CHANGED
package/packages/ui/src/utils.ts
CHANGED
|
@@ -48,3 +48,7 @@ export function formatText (value: any, placeholder?: any) {
|
|
|
48
48
|
export function eqEmptyValue (cellValue: any) {
|
|
49
49
|
return cellValue === '' || XEUtils.eqNull(cellValue)
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
export function getStringValue (cellValue: any) {
|
|
53
|
+
return eqEmptyValue(cellValue) ? '' : cellValue
|
|
54
|
+
}
|
|
@@ -6,19 +6,31 @@
|
|
|
6
6
|
}
|
|
7
7
|
.vxe-gantt-view--chart-row {
|
|
8
8
|
position: relative;
|
|
9
|
+
&.is--round {
|
|
10
|
+
& > .vxe-gantt-view--chart-bar {
|
|
11
|
+
border-radius: var(--vxe-ui-gantt-view-task-bar-border-radius);
|
|
12
|
+
&:hover {
|
|
13
|
+
&::after {
|
|
14
|
+
border-radius: var(--vxe-ui-gantt-view-task-bar-border-radius);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
& > .vxe-gantt-view--chart-progress {
|
|
18
|
+
border-radius: var(--vxe-ui-gantt-view-task-bar-border-radius) 0 0 var(--vxe-ui-gantt-view-task-bar-border-radius);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
9
22
|
}
|
|
10
23
|
.vxe-gantt-view--chart-bar {
|
|
11
24
|
display: flex;
|
|
12
25
|
flex-direction: row;
|
|
26
|
+
align-items: center;
|
|
13
27
|
position: absolute;
|
|
14
|
-
width: 100px;
|
|
15
28
|
top: 50%;
|
|
16
29
|
left: 0;
|
|
17
30
|
color: #ffffff;
|
|
18
31
|
transform: translateY(-50%);
|
|
19
|
-
border-radius: var(--vxe-ui-base-border-radius);
|
|
20
32
|
height: var(--vxe-ui-gantt-view-chart-bar-height);
|
|
21
|
-
background-color: var(--vxe-ui-
|
|
33
|
+
background-color: var(--vxe-ui-gantt-view-task-bar-background-color);
|
|
22
34
|
pointer-events: all;
|
|
23
35
|
&:hover {
|
|
24
36
|
&::after {
|
|
@@ -29,18 +41,25 @@
|
|
|
29
41
|
width: 100%;
|
|
30
42
|
height: 100%;
|
|
31
43
|
background-color: rgba(0, 0, 0, 0.1);
|
|
32
|
-
border-radius: var(--vxe-ui-base-border-radius);
|
|
33
44
|
}
|
|
34
45
|
}
|
|
35
46
|
}
|
|
36
47
|
.vxe-gantt-view--chart-progress {
|
|
37
48
|
flex-shrink: 0;
|
|
38
|
-
width:
|
|
49
|
+
width: 0;
|
|
50
|
+
height: 100%;
|
|
39
51
|
text-align: left;
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
background-color: var(--vxe-ui-gantt-view-task-bar-completed-background-color);
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
text-overflow: ellipsis;
|
|
55
|
+
white-space: nowrap;
|
|
42
56
|
}
|
|
43
57
|
.vxe-gantt-view--chart-content {
|
|
44
|
-
|
|
45
|
-
|
|
58
|
+
position: absolute;
|
|
59
|
+
width: 100%;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
text-overflow: ellipsis;
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
font-size: 0.9em;
|
|
64
|
+
padding: 0 0.6em;
|
|
46
65
|
}
|
|
@@ -75,9 +75,11 @@
|
|
|
75
75
|
}
|
|
76
76
|
.vxe-gantt--view-split-bar {
|
|
77
77
|
flex-shrink: 0;
|
|
78
|
-
cursor: col-resize;
|
|
79
78
|
width: var(--vxe-ui-gantt-view-split-bar-width);
|
|
80
79
|
background-color: var(--vxe-ui-gantt-view-split-bar-background-color);
|
|
80
|
+
&.is--resize {
|
|
81
|
+
cursor: col-resize;
|
|
82
|
+
}
|
|
81
83
|
}
|
|
82
84
|
&.show--left {
|
|
83
85
|
.vxe-gantt--table-wrapper {
|
|
@@ -87,7 +89,7 @@
|
|
|
87
89
|
.vxe-gantt--table-wrapper {
|
|
88
90
|
flex-grow: unset;
|
|
89
91
|
flex-shrink: 0;
|
|
90
|
-
width:
|
|
92
|
+
width: var(--vxe-ui-gantt-view-table-default-width);
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
}
|
|
@@ -279,6 +281,12 @@
|
|
|
279
281
|
transform: translate(-50%, -50%);
|
|
280
282
|
z-index: 15;
|
|
281
283
|
pointer-events: none;
|
|
284
|
+
& > div {
|
|
285
|
+
margin-top: 1em;
|
|
286
|
+
&:first-child {
|
|
287
|
+
margin-top: 0;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
282
290
|
}
|
|
283
291
|
.vxe-gantt--view-split-bar-left-btn,
|
|
284
292
|
.vxe-gantt--view-split-bar-right-btn {
|
|
@@ -304,9 +312,6 @@
|
|
|
304
312
|
transform: scale(0.9);
|
|
305
313
|
}
|
|
306
314
|
}
|
|
307
|
-
.vxe-gantt--view-split-bar-right-btn {
|
|
308
|
-
margin-top: 1em;
|
|
309
|
-
}
|
|
310
315
|
.vxe-gantt--resizable-split-tip {
|
|
311
316
|
display: none;
|
|
312
317
|
position: absolute;
|
|
@@ -496,7 +501,7 @@
|
|
|
496
501
|
overflow: hidden;
|
|
497
502
|
}
|
|
498
503
|
.vxe-gantt-view--column-info {
|
|
499
|
-
width: var(--vxe-ui-gantt-view-
|
|
504
|
+
width: var(--vxe-ui-gantt-view-default-cell-width);
|
|
500
505
|
}
|
|
501
506
|
|
|
502
507
|
// 任务视图
|
|
@@ -523,7 +528,7 @@
|
|
|
523
528
|
border-collapse: separate;
|
|
524
529
|
table-layout: fixed;
|
|
525
530
|
col {
|
|
526
|
-
width: var(--vxe-ui-gantt-view-
|
|
531
|
+
width: var(--vxe-ui-gantt-view-default-cell-width);
|
|
527
532
|
}
|
|
528
533
|
}
|
|
529
534
|
.vxe-gantt-view--header-wrapper,
|
package/styles/theme/base.scss
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
/*gantt*/
|
|
3
|
-
--vxe-ui-gantt-view-
|
|
3
|
+
--vxe-ui-gantt-view-default-cell-width: 40px;
|
|
4
4
|
--vxe-ui-gantt-view-chart-bar-height: 1.6em;
|
|
5
5
|
--vxe-ui-gantt-view-split-bar-width: 10px;
|
|
6
6
|
--vxe-ui-gantt-view-split-bar-height: 6.8em;
|
|
7
|
+
--vxe-ui-gantt-view-table-default-width: 30%;
|
|
8
|
+
--vxe-ui-gantt-view-task-bar-border-radius: calc(var(--vxe-ui-gantt-view-split-bar-height) / 2);
|
|
9
|
+
--vxe-ui-gantt-view-task-bar-background-color: var(--vxe-ui-font-primary-lighten-color);
|
|
10
|
+
--vxe-ui-gantt-view-task-bar-completed-background-color: var(--vxe-ui-font-primary-color);
|
|
7
11
|
}
|