我正在努力防止Vue提示出现在屏幕之外。 我有这个简单的实现: <span> class="features-tooltip" v-tooltip="{ content: 'Long string here' }"> </span> 如何使浮动提示框适应窗口大小? 感谢帮助。
你的问题的解决方案非常简单。你只需要将一个额外的属性boundariesElement: 'window'添加到你的工具提示对象中即可。所以在你的情况下,它应该是这样的:<span> class="features-tooltip" v-tooltip="{ content: 'Long string here', boundariesElement: 'window'}"> </span>