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({