您好,我有一个包含 <br/>
的字符串新行的标签。它看起来像这样:
"s = rod/Rel = ecc 6.7.3 6.5.0 6.7.0 6.7.1 6.6.0 6.7.2 6.2.0 6.1.0<br />Metric = Backlog<br />Severity = minor<br />Views = Monthly<br />"
我想在文本 Sprite 中使用它,但文本似乎不理解 html 标签。请问我该怎么做?
var sprite = Ext.create('Ext.draw.Sprite', {
type: 'text',
surface: chart.surface,
text: Ext.util.Format.format('Metric generated with : '+ s),
font: '12px Arial',
x: 50,
y: 10,
width: 100,
height: 100
});
最佳答案
尝试使用:\n
用于 linbreak 而不是 <br/>
"s = rod/Rel = ecc 6.7.3 6.5.0 6.7.0 6.7.1 6.6.0 6.7.2 6.2.0 6.1.0\nMetric = Backlog\nSeverity = minor\nViews = Monthly\n"
关于javascript - Extjs 4新线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20197555/