learnin-some-vue/app.js

17 lines
243 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,
attachBlue: true
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
});