v-mode总是提示错误 v-model directives require the attribute value which is val ID as LHS.
为什么调用过滤总是提示这个错呢?
解决方法
v-model 的值只能是一个变量,是无法应用 filter 的。如果需要应用 filter:
v-model="msgFilteredHTML"
export default {
...
computed: {
msgFilteredHTML: {
get() {
return this.filterHTML(this.msg)
},
set(val) {
this.msg = val
}
}
}
}
链接1:v-mode 提示错误 v-model directives require the attribute value which is valid as LHS.
链接2:‘v-model’ directives require the attribute value which is valid as LHS
链接3:vue3.0 v-model value must be a valid JavaScript member expression.
Original: https://www.cnblogs.com/rainbow70626/p/16459925.html
Author: rainbow70626
Title: [转]v-mode 提示错误 v-model directives require the attribute value which is valid as LHS.
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/553226/
转载文章受原作者版权保护。转载请注明原作者出处!