From ce9df3a9eaf06cb72a0094d6146ae79f863077ab Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Fri, 20 Apr 2018 15:26:35 -0400 Subject: [PATCH] s12e159 v-highlight green --- s12/src/App.vue | 2 +- s12/src/main.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/s12/src/App.vue b/s12/src/App.vue index 351d5bd..00db3fd 100644 --- a/s12/src/App.vue +++ b/s12/src/App.vue @@ -10,7 +10,7 @@

Custom Directives

-

Color This

+

Color This

diff --git a/s12/src/main.js b/s12/src/main.js index 299e427..92f34c3 100644 --- a/s12/src/main.js +++ b/s12/src/main.js @@ -1,8 +1,11 @@ import Vue from 'vue' import App from './App.vue' -Vue.directive('highlight',{ +Vue.directive('highlight', { + bind(el, binding, vnode){ + el.style.backgroundColor = 'green' + } }) new Vue({