vue从后台接收字符串在前端展示为标签

118 阅读1分钟
<div v-html="str">{{ str }}</div>

str为从后台接收到的字符串。

例:str为‘<font class="red">你好</font>世界’