1
1
<template >
2
2
<v-data-table
3
- @click:row =" selectActivity($event.id)"
4
3
:headers =" headers"
5
4
:items =" items"
6
5
height =" 100%"
7
6
item-class =" class"
8
7
disable-pagination hide-default-footer fixed-header
9
8
class =" overview primary lighten-5" >
10
- <template #item .name =" { item , value } " >
11
- <div class =" d-flex" >
12
- <overview-name :value =" value" />
13
- <publishing-badge v-if =" isAdmin || isRepositoryAdmin" :activity =" item" />
14
- </div >
15
- </template >
16
- <template #item .status =" { value } " >
17
- <overview-status v-bind =" value" />
18
- </template >
19
- <template #item .assignee =" { value } " >
20
- <overview-assignee v-bind =" value" />
21
- </template >
22
- <template #item .priority =" { value } " >
23
- <overview-priority v-bind =" value" />
24
- </template >
25
- <template #item .dueDate =" { value } " >
26
- <overview-due-date v-if =" value" :value =" value" />
9
+ <template v-slot :item =" { item } " >
10
+ <v-lazy
11
+ v-model =" itemVisibility[item.id]"
12
+ @click =" selectActivity(item.id)"
13
+ :class =" { selected: isActivitySelected(item.id) }"
14
+ tag =" tr"
15
+ style =" height : 48px ;" >
16
+ <div style =" display : contents ;" >
17
+ <td class =" text-left" >
18
+ <v-col class =" d-flex text-left" >
19
+ <overview-name :value =" item.name" />
20
+ <publishing-badge v-if =" isAdmin || isRepositoryAdmin" :activity =" item" />
21
+ </v-col >
22
+ </td >
23
+ <td class =" text-left" >
24
+ <overview-status v-bind =" item.status" />
25
+ </td >
26
+ <td class =" text-left" >
27
+ <overview-assignee v-bind =" item.assignee" />
28
+ </td >
29
+ <td class =" text-left" >
30
+ <overview-priority v-bind =" item.priority" />
31
+ </td >
32
+ <td class =" text-left" >
33
+ <overview-due-date v-if =" item.dueDate" :value =" item.dueDate" />
34
+ </td >
35
+ </div >
36
+ </v-lazy >
27
37
</template >
28
38
</v-data-table >
29
39
</template >
@@ -45,6 +55,9 @@ export default {
45
55
props: {
46
56
activities: { type: Array , default : () => [] }
47
57
},
58
+ data : () => ({
59
+ itemVisibility: {}
60
+ }),
48
61
computed: {
49
62
... mapGetters ([' isAdmin' ]),
50
63
... mapGetters (' repository' , [' isRepositoryAdmin' , ' workflow' ]),
@@ -116,12 +129,13 @@ export default {
116
129
</script >
117
130
118
131
<style lang="scss" scoped>
119
- $row-background : var (--v-primary-lighten4 );
132
+ $row-background : var (--v-primary-lighten5 );
133
+ $row-hover-background : var (--v-primary-lighten4 );
120
134
121
135
.overview ::v-deep {
122
136
thead .v-data-table-header {
123
137
tr th {
124
- background : #eceff1 ;
138
+ background : $row-hover-background ;
125
139
}
126
140
}
127
141
@@ -133,16 +147,25 @@ $row-background: var(--v-primary-lighten4);
133
147
max-width : 11.5rem ;
134
148
}
135
149
136
- tr :hover {
137
- background : $row-background !important ;
150
+ .v-lazy {
151
+ background-color : $row-background ;
152
+ border-bottom : thin solid rgba (0 , 0 , 0 , 0.12 );
153
+
154
+ & :hover {
155
+ background-color : $row-hover-background !important ;
156
+ }
157
+
158
+ & .selected {
159
+ background : $row-hover-background !important ;
160
+ }
138
161
139
162
& :not (.selected ) {
140
163
cursor : pointer ;
141
164
}
142
- }
143
165
144
- .selected {
145
- background : $row-background ;
166
+ td {
167
+ height : 48px ;
168
+ }
146
169
}
147
170
}
148
171
</style >
0 commit comments