forked from opentiny/tiny-vue
fix(tooltip): add a default value for the contentMaxHeight property (#3192)
This commit is contained in:
parent
3c8a5cbfe4
commit
4960a6a01f
|
|
@ -10,7 +10,6 @@
|
|||
}
|
||||
|
||||
&__content-wrapper {
|
||||
max-height: 50vh;
|
||||
@apply overflow-auto;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
}
|
||||
|
||||
&__content-wrapper {
|
||||
max-height: var(--tv-Tooltip-content-max-height);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,4 @@
|
|||
--tv-Tooltip-padding-x: var(--tv-space-xl, 16px);
|
||||
// 文字提示错误图标色
|
||||
--tv-Tooltip-validate-icon-color: var(--tv-color-error-icon, #f23030);
|
||||
// 文本内容容器最大高度
|
||||
--tv-Tooltip-content-max-height: 50vh;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ export const tooltipProps = {
|
|||
default: () => 'next'
|
||||
},
|
||||
contentMaxHeight: {
|
||||
type: String
|
||||
type: String,
|
||||
default: () => '80vh'
|
||||
}
|
||||
}
|
||||
export default defineComponent({
|
||||
|
|
|
|||
|
|
@ -96,6 +96,9 @@ export default defineComponent({
|
|||
zIndex: {
|
||||
type: String,
|
||||
default: () => 'next'
|
||||
},
|
||||
contentMaxHeight: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
setup(props, context) {
|
||||
|
|
@ -160,7 +163,7 @@ export default defineComponent({
|
|||
aria-hidden={this.disabled || !this.state.showPopper ? 'true' : 'false'}
|
||||
onMouseenter={() => mouseenter()}
|
||||
onMouseleave={() => mouseleave()}>
|
||||
{content}
|
||||
<div style={`overflow:auto; max-height:${this.contentMaxHeight}`}>{content}</div>
|
||||
{this.visibleArrow ? (
|
||||
<div
|
||||
x-arrow
|
||||
|
|
|
|||
Loading…
Reference in New Issue