V-tooltip在移动设备上出现在屏幕外

4

我正在努力防止Vue提示出现在屏幕之外。

我有这个简单的实现:

<span>
    class="features-tooltip"
    v-tooltip="{ content: 'Long string here' }">
</span>

浮动提示框

如何使浮动提示框适应窗口大小?

感谢帮助。

1个回答

2
你的问题的解决方案非常简单。你只需要将一个额外的属性boundariesElement: 'window'添加到你的工具提示对象中即可。
所以在你的情况下,它应该是这样的:
<span>
    class="features-tooltip"
    v-tooltip="{ content: 'Long string here', boundariesElement: 'window'}">
</span>

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接