簡體   English   中英

工具提示沒有換行

[英]Tool tip is not taking line breaks

我在使用 stackoverflow 上所有可用的東西進行搜索和嘗試時遇到了有關工具提示的問題,

我正在使用 reactjs 並使用 createElement 創建元素並應用工具提示類來啟用它。

createElement('span', { toolTip, 'data-title': 'line1 <br/> line 2'},numericValue);

我也試過

'/n'
'&#013;'

一切都如其所是。 data-title 沒有執行任何標簽。

我沒有使用createElement ,但我在其他工具提示(如 react-bootstrap、reactstrap)中嘗試過的一件事是將項目分離到一個數組中。

const label = ["Hello", <br />, "world!"]

return <Tooltip label={label} />

希望有幫助!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM