How to use multiline tooltips? #17574
-
Hi, I am using quasar. It's seem like Tooltip not support multiline text, and i can't find any option in docs. If It's possible add multiline text in Tooltip? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Founded solution <div v-for="item in items">
<q-tooltip anchor="top middle" self="center middle">
<div v-for="lines in get_tooltip(item)">
{{ lines }}
</div>
</q-tooltip>
</div> let items = [{ label : "foo", value : 0 },{ label : "bar", value : 1 }];
function get_tooltip(item){
let ret = [];
ret.push("label:"+item.label);
ret.push("value:"+item.value);
return ret;
} |
Beta Was this translation helpful? Give feedback.
-
for anyone who stumbles here while searching around the internet: Just use <q-tooltip style="white-space: pre">
tool <br />
tip
</q-tooltip> ref: https://developer.mozilla.org/en-US/docs/Web/CSS/white-space |
Beta Was this translation helpful? Give feedback.
Founded solution
like this