Skip to content

Instantly share code, notes, and snippets.

@eserdinyo
Created February 11, 2018 19:31
Show Gist options
  • Save eserdinyo/ede6230292355b095d4a4897bc2ec4fb to your computer and use it in GitHub Desktop.
Save eserdinyo/ede6230292355b095d4a4897bc2ec4fb to your computer and use it in GitHub Desktop.
import Vue from 'vue'
import App from './App.vue'
Vue.directive('renk', {
bind(el, binding) {
if (binding.arg === 'background') {
el.style.backgroundColor = binding.value;
} else {
el.style.color = binding.value;
}
}
})
new Vue({
el: '#app',
render: h => h(App)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment