1.v-model.lazy
在用户对文本输入的时候,文本框的字不会随着用户按下的每个键立刻发生变化,而是等焦点彻底离开文本框才会显示。
input:<input v-model.lazy="inputValue" type="number"/>输入的值:{{inputValue}}
2.v-model.number
强制输入数字
input:<input v-model.number="inputValue" type="text"/>输入的值:{{inputValue}
3.v-model.trim
强制对输入值去掉前后空格
input:<input v-model.trim="inputValue" type="text"/>输入的值:{{inputValue}