s2e28 color names
This commit is contained in:
parent
f97f01c6da
commit
a42d60c876
3
app.js
3
app.js
|
@ -3,7 +3,8 @@ var app = new Vue({
|
|||
data: {
|
||||
attachRed: false,
|
||||
attachGreen: false,
|
||||
attachBlue: true
|
||||
attachBlue: true,
|
||||
color: "green"
|
||||
},
|
||||
computed:{
|
||||
divClasses(){
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user