js大小写转换

1 <input @keyup="toUppercase(boJobtransportorder,'vesselVoyage')" v-model="boJobtransportorder.vesselVoyage" type="text" class="form-control input-sm" placeholder="Vessel/Voyage" value=""></div>

你在input框输入英文,它会自动转为大写

//把对象指定的属性值转换为大写
toUppercase: function (o, parName) {
if (o && o[parName]) {
o[parName] = o[parName].toUpperCase();
}
},
posted @ 2020-04-26 16:45  星期7  阅读(469)  评论(0编辑  收藏  举报