动力网站建设,wordpress tag小图标,网站内容分析,做外贸上哪些网站找客户vue指令-v-model修饰符 1、目标2、语法 1、目标
让v-modelv-mode拥有更强大的功能
2、语法
v-model.修饰符“Vue数据变量”
.number 以parseFloat转成数字类型
.trime 去除首位空白字符
.lazy 在change时触发而非input时示例1
templatediv idapp“Vue数据变量”
.number 以parseFloat转成数字类型
.trime 去除首位空白字符
.lazy 在change时触发而非input时示例1
templatediv idappdivspan年龄:/spaninput typenumber v-model.numberage/div/div/templatescriptexport default {data(){return{age:0}},}
/script示例2
templatediv idappdiv!--.trim去除首尾空格--span人生格言:/spaninput typetext v-model.trimmotto/div/div/templatescriptexport default {data(){return{motto:}},}
/script示例3
templatediv idappdiv!--.lazy失去焦点同步数据--span个人简介:/spantextarea v-model.lazyintro/textarea/div/div/templatescriptexport default {data(){return{intro:}},}
/script