v-mode总是提示错误 v-model directives require the attribute value which is valid as LHS.
解决方法
v-model 的值只能是一个变量,是无法应用 filter 的。如果需要应用 filter:
v-model="msgFilteredHTML" export default { ... computed: { msgFilteredHTML: { get() { return this.filterHTML(this.msg) }, set(val) { this.msg = val } } } }原文链接:https://www.f2er.com/vue/538117.html