Vuejs 2 : How to make data lowercase
问题 I trying to make some data to lowercase (alway lowercase) I making and search input like : <template id="search"> <div> <input type="text" v-model="search"> <li v-show="'hello'.includes(search) && search !== ''">Hello</li> </div> </template> Vuejs : (component) Vue.component('search', { template : '#search', data: function(){return{ search : '', }} }); I tried watch , But I dont want input showing lowercase when typing watch: { 'search' : function(v) { this.search = v.toLowerCase().trim(); }