vue-gantt-3
Version:
A gantt component for Vue 3
286 lines • 7.81 kB
CSS
.vg-cell-expandable {
margin-left: -7px;
height: 100%;
position: relative;
}
.vg-cell-expandable .vg-cell-expand-box {
position: absolute;
top: 50%;
transform: translateY(-50%);
display: inline-block;
line-height: 1;
font-size: 0;
}
.vg-cell-expandable .vg-cell-expand-box img {
vertical-align: middle;
}.vg-table-view {
height: 100%;
display: flex;
flex-direction: column;
}
.vg-table-view .first-level-header {
background: #F3F3F4;
border-bottom: 1px solid #D0D0D0;
}
.vg-table-view .ag-theme-mgantttheme {
flex: 1;
height: 100%;
overflow: hidden;
--ag-borders: none,
--ag-odd-row-background-color: #fff;
--ag-border-color: #e9e9e9;
--ag-row-border-color: #e9e9e9;
--ag-cell-horizontal-border: 1px solid #e9e9e9;
--ag-header-column-resize-handle-height: 100%;
--ag-header-column-resize-handle-width: 1px;
--ag-header-column-resize-handle-color: #e9e9e9;
--ag-header-background-color: #fff;
--ag-cell-horizontal-padding: 9px;
--ag-selected-row-background-color: #0078d7;
--ag-odd-row-background-color: #fff;
}
.vg-table-view .ag-theme-mgantttheme .ag-header {
--ag-borders-critical: 1px solid;
}
.vg-table-view .ag-theme-mgantttheme .ag-row-last.no-bottom-border-row {
border-bottom: 0;
}.vg-scrollbar-thumb-wrap {
position: absolute;
overflow: auto;
}
.vg-scrollbar-thumb-wrap.is-horizontal {
left: 0;
bottom: 0;
overflow-y: hidden;
}
.vg-scrollbar-thumb-wrap.is-vertical {
top: 0;
right: 0;
overflow-x: hidden;
}.vg-scrollbar {
position: relative;
overflow: hidden;
}
.vg-scrollbar .vg-scrollbar-wrap {
width: 100%;
height: 100%;
overflow: auto;
}
.vg-scrollbar .vg-scrollbar-wrap::-webkit-scrollbar {
display: none;
}
.vg-scrollbar .vg-scrollbar-wrap .vg-scrollbar-view {
width: fit-content;
height: fit-content;
}.vg-header {
min-width: 100%;
max-width: 100%;
overflow: hidden;
color: #000;
}
.vg-header .vg-header-first-level, .vg-header .vg-header-second-level {
position: relative;
}
.vg-header .vg-header-first-level .vg-header-block, .vg-header .vg-header-second-level .vg-header-block {
position: absolute;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
border-right: 1px solid #e9e9e9;
border-bottom: 1px solid #e9e9e9;
}
.vg-header .vg-header-first-level .vg-header-block .vg-header-block-text, .vg-header .vg-header-second-level .vg-header-block .vg-header-block-text {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.vg-header .vg-header-first-level .vg-header-block.vg-header-block-hide-right-border, .vg-header .vg-header-second-level .vg-header-block.vg-header-block-hide-right-border {
border-right: none;
}.vg-grid-container {
width: 100%;
height: 100%;
position: relative;
}.vg-time-line-view {
width: 100%;
height: 100%;
left: 0;
top: 0;
position: absolute;
font-size: 16px;
}
.vg-time-line-view .vg-time-line-row {
position: absolute;
width: 100%;
}
.vg-time-line-view .vg-time-line-row.vg-selected-row {
background-color: #0078d7;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line {
position: absolute;
left: 0;
height: 100%;
user-select: none;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-normal {
position: absolute;
width: 100%;
left: 0;
top: 50%;
transform: translateY(-50%);
cursor: grab;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-normal.moving {
cursor: grabbing;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-normal.disabledMove {
cursor: default;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-normal .vg-time-line-normal-body {
height: 16px;
border-radius: 6px;
border: 1px solid #000;
background: #fff;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-normal .vg-time-line-normal-time-points {
cursor: move;
position: absolute;
left: 0;
top: 50%;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-normal .vg-time-line-normal-time-points > img {
width: 100%;
height: 100%;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-normal .vg-move-block {
position: absolute;
width: 6px;
height: 100%;
top: 0;
cursor: ew-resize;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-normal .vg-move-block.first-block {
left: 0;
transform: translateX(-100%);
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-normal .vg-move-block.last-block {
right: 0;
transform: translateX(100%);
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-sameNode {
width: 8px;
height: 8px;
position: absolute;
left: 0;
top: 50%;
background-color: #000;
transform: translate(-50%, -50%) rotate(45deg);
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-parentNode {
position: absolute;
width: 100%;
left: 0;
top: 50%;
transform: translateY(-50%);
height: 16px;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-parentNode .vg-time-line-parentNode-bar {
position: absolute;
width: 100%;
top: 3px;
height: 5px;
background-color: #000;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-parentNode .vg-time-line-parentNode-triangle {
position: absolute;
top: 50%;
font-size: 0;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-parentNode .vg-time-line-parentNode-triangle.vg-time-line-parentNode-triangle-left {
left: 0;
transform: translateX(-50%) translateY(-50%);
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-parentNode .vg-time-line-parentNode-triangle.vg-time-line-parentNode-triangle-right {
right: 0;
transform: translateX(50%) translateY(-50%);
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-label {
position: absolute;
height: 100%;
max-width: 100%;
display: inline-flex;
align-items: center;
white-space: nowrap;
overflow: hidden;
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-label.toLeft {
max-width: unset;
left: -4px;
transform: translateX(-100%);
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-label.toRight {
max-width: unset;
right: -4px;
transform: translateX(100%);
}
.vg-time-line-view .vg-time-line-row .vg-time-line-row-time-line .vg-time-line-label span {
overflow: hidden;
text-overflow: ellipsis;
}.vg-body {
position: relative;
font-size: 0;
}.vg-gantt-view {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}
.vg-gantt-view .vg-scrollbar {
flex: 1;
}.c-expandable-box {
height: 100%;
position: relative;
}
.c-expandable-box ._drag-line {
position: absolute;
background: transparent;
right: 1px;
width: 4px;
cursor: col-resize ;
height: 100%;
top: 0;
z-index: 1;
}
.c-expandable-box ._drag-line.indragging {
background-color: #A2B3CD;
}.vue-gantt-3 {
width: 100%;
height: 100%;
display: flex;
overflow: hidden;
box-sizing: border-box;
border: 1px solid #e9e9e9;
background-color: #fff;
}
.vue-gantt-3 *, .vue-gantt-3 :before, .vue-gantt-3 :after {
box-sizing: border-box;
}
.vue-gantt-3 img {
border: 0;
vertical-align: middle;
-webkit-user-drag: none;
user-select: none;
}
.vue-gantt-3 .c-expandable-box {
margin-right: 4px;
}
.vue-gantt-3 .c-expandable-box ._drag-line {
right: -4px ;
}
.vue-gantt-3 .vg-table-view {
border-right: 1px solid #e9e9e9;
}
.vue-gantt-3 .vg-gantt-view {
flex: 1;
border-left: 1px solid #e9e9e9;
}