From 73b096560c5ce921c849e688e38b01f9c66f98b1 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Fri, 13 Apr 2018 15:10:41 -0400 Subject: [PATCH] s2e29 no css classes, but still style --- app.js | 12 +++++------- index.html | 14 ++++++-------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/app.js b/app.js index dc81d94..e41bcbe 100644 --- a/app.js +++ b/app.js @@ -1,16 +1,14 @@ var app = new Vue({ el: '#app', data: { - attachRed: false, - attachGreen: false, - attachBlue: true, - color: "green" + color: "gray", + width: 100 }, computed:{ - divClasses(){ + myStyle(){ return { - red: this.attachRed, - blue: !this.attachRed + backgroundColor: this.color, + width: this.width + "px" } } } diff --git a/index.html b/index.html index 7baf188..f3d613b 100644 --- a/index.html +++ b/index.html @@ -7,14 +7,12 @@
-
-
-
-
- +
+
+
+
+ +