File tree Expand file tree Collapse file tree 4 files changed +15
-2
lines changed
theme-saas/src/calendar-view Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 630
630
@apply ~ ' max-w-[theme(spacing.80)]' ;
631
631
632
632
.tooltip-main {
633
+ @apply overflow- auto;
634
+ @apply max - h- [80vh ];
633
635
@apply p- 2;
634
636
635
637
.title {
Original file line number Diff line number Diff line change 630
630
.inject-CalendarView-vars ();
631
631
position : absolute ;
632
632
max-width : 320px ;
633
+
633
634
.tooltip-main {
635
+ overflow : auto ;
636
+ max-height : 80vh ;
634
637
padding : var (--tv-CalendarView-tooltip-title-font-size );
638
+
635
639
.title {
636
640
font-size : var (--tv-CalendarView-tooltip-title-font-size );
637
641
font-weight : var (--tv-CalendarView-tooltip-title-font-weight );
638
642
}
643
+
639
644
.date {
640
645
margin : 6px 0 ;
641
646
color : var (--tv-CalendarView-tooltip-date-text-color );
Original file line number Diff line number Diff line change 3
3
<tiny-tooltip
4
4
ref =" tooltip"
5
5
v-model =" state.eventTipVisible"
6
- popper-class =" absolute max-w-[theme(spacing.80)]"
6
+ popper-class =" absolute max-w-[theme(spacing.80)] max-h-[80vh] overflow-auto "
7
7
:manual =" true"
8
8
effect =" light"
9
9
placement =" right"
Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ export default defineComponent({
136
136
component: {
137
137
render : () => {
138
138
let content = getContent (this )
139
+ // 当内容为纯文本时,添加一层wrapper,其他情况(插槽、renderContent)原样输出
140
+ const addWrapper = typeof content === ' string'
139
141
let propsData = { on: { ' after-leave' : this .doDestroy } }
140
142
let mouseenter = () => this .setExpectedState (true )
141
143
let mouseleave = () => {
@@ -163,7 +165,11 @@ export default defineComponent({
163
165
aria-hidden = { this .disabled || ! this .state .showPopper ? ' true' : ' false' }
164
166
onMouseenter = { () => mouseenter ()}
165
167
onMouseleave = { () => mouseleave ()} >
166
- <div style = { ` overflow:auto; max-height:${this .contentMaxHeight } ` } >{ content } </div >
168
+ { addWrapper ? (
169
+ <div style = { ` overflow:auto;max-height:${this .contentMaxHeight } ` } >{ content } </div >
170
+ ) : (
171
+ content
172
+ )}
167
173
{ this .visibleArrow ? (
168
174
<div
169
175
x-arrow
You can’t perform that action at this time.
0 commit comments