Vue 技巧

1、在 v-html 中执行 vue 绑定的事件,默认是不能执行的。这里需要把 html 重新解析一下

loadMsg:function(html){
    html = $.parseHTML(html)[0];
    this.vm.$compile(html);
    while (this.el.firstChild) {
        this.el.removeChild(this.el.firstChild);
    }
    this.el.appendChild(html);
}
原文地址:https://www.cnblogs.com/fws407296762/p/5306432.html