File tree Expand file tree Collapse file tree 4 files changed +39
-12
lines changed
theme-saas/src/calendar-view
vue/src/calendar-view/src Expand file tree Collapse file tree 4 files changed +39
-12
lines changed Original file line number Diff line number Diff line change 449
449
@apply w- 12;
450
450
451
451
ul > li {
452
- @apply h- 5 ;
452
+ @apply h- 6 ;
453
453
@apply text- center;
454
454
@apply border- b;
455
455
@apply border- b- color - bg- 1;
494
494
& .is-even-num {
495
495
@apply border- dashed;
496
496
}
497
+
498
+ & .is-scroll-list {
499
+ @apply overflow- y- auto;
500
+ @apply overflow- x- hidden;
501
+ @apply scrollbar- size- 0;
502
+ }
497
503
}
498
504
499
505
.events-item {
502
508
@apply flex ;
503
509
@apply items- center;
504
510
@apply ~ ' px-1.5' ;
505
- @apply absolute ;
506
511
@apply top- 0;
507
512
@apply left- 0;
508
513
@apply z- 10;
509
514
@apply leading- normal;
510
515
@apply rounded- sm;
516
+ @apply ~ ' mb-0.5' ;
511
517
512
518
& .theme-blue {
513
519
@apply text- color - brand;
Original file line number Diff line number Diff line change 446
446
margin-left : 21px ;
447
447
448
448
ul > li {
449
- height : 20px ;
449
+ height : var (--tv-CalendarView-events-list-height );
450
+ padding : var (--tv-CalendarView-events-list-padding );
450
451
text-align : left ;
451
452
border-bottom-width : var (--tv-CalendarView-timeline-li-border-width );
452
453
border-bottom-style : solid ;
493
494
& .is-even-num {
494
495
border-bottom-style : dashed ;
495
496
}
497
+
498
+ & .is-scroll-list {
499
+ overflow-y : auto ;
500
+ overflow-x : hidden ;
501
+
502
+ & .is-scroll-list ::-webkit-scrollbar {
503
+ width : 0 ;
504
+ height : 0 ;
505
+ }
506
+ }
496
507
}
497
508
498
509
.events-item {
502
513
display : flex ;
503
514
align-items : center ;
504
515
padding : 0 6px ;
505
- position : absolute ;
506
516
top : 0 ;
507
517
left : 0 ;
508
518
z-index : 10 ;
509
519
line-height : 1.5 ;
510
520
border-radius : 2px ;
511
521
color : var (--tv-CalendarView-events-item-text-color );
522
+ margin-bottom : 1px ;
512
523
513
524
& .theme-blue {
514
525
border-left : 2px solid #1890ff ;
Original file line number Diff line number Diff line change 243
243
v-for =" (item, i) in state.dayTimes"
244
244
:key =" date.value + item.time"
245
245
class =" relative h-5 p-0.5 list-none border-b border-color-bg-2"
246
- :class =" [i % 2 === 0 ? 'border-dashed' : 'border-solid']"
246
+ :class =" {
247
+ 'border-dashed': i % 2 === 0,
248
+ 'border-solid': i % 2 !== 0,
249
+ 'overflow-hidden overflow-y-auto scrollbar-size-0':
250
+ getEventByTime(date.value, item.time, state.dayTimes[i + 1] && state.dayTimes[i + 1].time)
251
+ .length > 1
252
+ }"
247
253
>
248
254
<div
249
255
v-for =" (event, idx) of getEventByTime(
252
258
state.dayTimes[i + 1] && state.dayTimes[i + 1].time
253
259
)"
254
260
:key =" idx"
255
- class =" w-11/12 flex items-center px-1.5 absolute top-0 left-0 z-10 leading-normal rounded-sm"
261
+ class =" w-11/12 flex mb-0.5 items-center px-1.5 top-0 left-0 z-10 leading-normal rounded-sm"
256
262
:class =" [gcls(`theme-${event.theme || blue}`)]"
257
263
:style =" {
258
264
'height': event.height + 'px',
259
- 'left': event.left + 'px',
260
- 'width': `calc( 92% - ${event.left}px) `
265
+
266
+ 'width': `92%`
261
267
}"
262
268
>
263
269
<span >{{ event.title }}</span >
Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" tiny-calendar-view" :style =" { 'height': height ? `${parseInt(height)}px` : 'auto'}" >
2
+ <div class =" tiny-calendar-view" :style =" { 'height': height ? `${parseInt(height)}px` : 'auto' }" >
3
3
<div class =" tiny-calendar-view__header" >
4
4
<div >
5
5
<tiny-button v-if =" showBackToday" @click =" toToday" >{{ t('ui.calendarView.backToday') }}</tiny-button >
162
162
<li
163
163
v-for =" (item, i) in state.dayTimes"
164
164
:key =" date.value + item.time"
165
- :class =" i % 2 === 0 && 'is-even-num'"
165
+ :class =" {
166
+ 'is-even-num': i % 2 === 0,
167
+ 'is-scroll-list':
168
+ getEventByTime(date.value, item.time, state.dayTimes[i + 1] && state.dayTimes[i + 1].time)
169
+ .length > 1
170
+ }"
166
171
>
167
172
<div
168
173
v-for =" (event, idx) of getEventByTime(
175
180
:class =" [`theme-${event.theme || 'blue'}`]"
176
181
:style =" {
177
182
'height': event.height + 'px',
178
- 'left': event.left + 'px',
179
- 'width': `calc(92% - ${event.left}px)`
183
+ 'width': `92%`
180
184
}"
181
185
>
182
186
<span >{{ event.title }}</span >
You can’t perform that action at this time.
0 commit comments