Display unescaped HTML in Vue.js

后端 未结 5 2106
孤城傲影
孤城傲影 2020-11-28 04:02

How can I manage to get HTML interpreted inside a mustache binding? At the moment the break (
) is just displayed/escaped.

Small Vue app:

5条回答
  •  北海茫月
    2020-11-28 04:51

    Starting with Vue2, the triple braces were deprecated, you are to use v-html.

    It is unclear from the documentation link as to what we are supposed to place inside v-html, your variables goes inside v-html.

    Also, v-html works only with

    or but not with