Skip to content

Instantly share code, notes, and snippets.

@eserdinyo
Created February 12, 2018 13:17
Show Gist options
  • Save eserdinyo/6ed345bedd07b52d0a3a1c5ef886e7da to your computer and use it in GitHub Desktop.
Save eserdinyo/6ed345bedd07b52d0a3a1c5ef886e7da to your computer and use it in GitHub Desktop.
Vue.directive('renk', {
bind(el, binding) {
if (binding.arg === 'background') {
el.style.backgroundColor = binding.value;
} else {
el.style.color = binding.value;
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment