vue-wrap-directive
v0.1.0
Published
A simple directive to handle conditional render of any DOM element or Vue component
Downloads
26
Maintainers
Readme
Install
npm install --save @nekoos/vue-wrap-directive
Usage
Register the directive
import Vue from "vue"
import Wrap from "@nekoos/vue-wrap-directive"
Vue.use(Wrap);
Component
<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