.change{
width: 100px;
height: 100px;
background-color: red;
text-align: center;
line-height: 100px;
font-size: 40px;
color: white;
}
.changs{
width: 200px;
height: 200px;
background-color: blue;
text-align: center;
line-height: 100px;
font-size: 40px;
color: white;
}
点击
var one={
template:'
呵呵
'
};
new Vue({
el:'#demo',
data:{
isTrue:true,
styles:'change'
},
components:{
'ones':one
},
methods:{
doIt:function(){
this.styles='changs'
}
}
})