learnin-some-vue/app.js

18 lines
263 B
JavaScript
Raw Normal View History

2018-04-13 14:54:53 +00:00
var app = new Vue({
el: '#app',
data: {
2018-04-13 18:55:09 +00:00
attachRed: false,
attachGreen: false,
2018-04-13 19:04:26 +00:00
attachBlue: true,
color: "green"
2018-04-13 14:56:49 +00:00
},
2018-04-13 18:57:51 +00:00
computed:{
divClasses(){
return {
red: this.attachRed,
blue: !this.attachRed
}
}
}
2018-04-13 18:55:09 +00:00
});