npm install --save @nekoos/vue-wrap-directive
Register the directive
import Vue from "vue"
import Wrap from "@nekoos/vue-wrap-directive"
Vue.use(Wrap);
<div v-wrap="toggle">I am the content</div>
When toogle
is true, render this:
<div>I am the content</div>
When toogle
is false, render this:
I am the content