自定义过滤器
Vue.filter('uppercase', function(value) {
if (!value) { return ''}value = value.toString()
return value.toUpperCase() + value.slice(1)
})
Vue.filter('re',function(value){
return value.split('').reverse().join('');
});
el:'#app', //绑定dom
data:{
message:'aeaaqa',
book:['1',
'q','3'
],
books:{
'id':4
}
},
methods: { //方法
a:function(){
alert('dianjile a'+this.books.id);
},