0👍
I dont think you can. I can however suggest a convenient computed property:
<input v-model="valueThatNeedsTrim" />
data() {
return {
valueFromData: "",
}
},
computed() {
valueThatNeedsTrim: {
get() {
return this.valueFromData
},
set(value) {
this.valueFromData = value.trim()
}
}
}
- [Vuejs]-Display elements based on instantaneous change and full or empty input on vue js
- [Vuejs]-What causes this "maximum call stack size exceeded" error?
Source:stackexchange.com