s2e28 color names

This commit is contained in:
Tyrel Souza 2018-04-13 15:04:26 -04:00
parent f97f01c6da
commit a42d60c876
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0
2 changed files with 5 additions and 2 deletions

3
app.js
View File

@ -3,7 +3,8 @@ var app = new Vue({
data: {
attachRed: false,
attachGreen: false,
attachBlue: true
attachBlue: true,
color: "green"
},
computed:{
divClasses(){

View File

@ -12,7 +12,9 @@
:class="{red: attachRed}"
></div>
<div class="demo" :class="divClasses"></div>
<div class="demo"></div>
<div class="demo" :class="[color, {red: attachRed}]"></div>
<hr>
<input type="text" v-model="color">
</div>
<script src="app.js" charset="utf-8"></script>
</body>