1.0.0 • Published 8 years ago
vue-directive-hoist v1.0.0
vue-directive-hoist 
A Vue directive for hoisting DOM elements to a higher parent node.
Install
# npm
npm install --save-dev vue-directive-hoist# yarn
yarn add --dev vue-directive-hoistUse
// In main.js
import Hoist from 'vue-directive-hoist';
Vue.use(Hoist);<!-- In a component -->
<template>
<div class="modal" v-hoist>
<div class="modal-content">
<p>
A common use case for hoist is to place modals as a direct descendant of body,
so it can properly overlay the page.
</p>
</div>
</div>
</template>If no value is provided, by default the element is hoisted to <body>.
1.0.0
8 years ago