VUE V-Tooltip线路休息
我正在使用 v-tooltip 。我想将一些工具提示文本添加到一个按钮中,我想划线,但是我无法弄清楚是否有可能使用此方法折断。我查看了该文档,看不到任何地方引用的文档。
<button v-tooltip="`This is one line \n This is another line`">
理想的工具提示:
This is one line
This is another line
但是文本出现在一行上。也许使用\ n
不是其他建议吗? 谢谢。
I am using v-tooltip. I want to add some tooltip text to a button and I want a line break, but I cannot figure out if it's possible to have a line break with this method. I looked at the documentation and can't see this being referenced anywhere.
<button v-tooltip="`This is one line \n This is another line`">
Ideal ouput for tooltip:
This is one line
This is another line
However the text comes on one line. Maybe using \n
is not the way, any other suggestions?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将对象用作指令的值,其中包含
br
标签的内容属性,以破坏行,html:true
作为第二属性:You could use an object as value of the directive with content property that have
br
tag in the content to break the line andhtml:true
as second property :使用
&lt;/br&gt;
\ n
的INTEAD。演示:
Use
</br>
intead of\n
.Demo :