Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/rhyzx/vue-transfer-dom

Transfer DOM to another place.
https://github.com/rhyzx/vue-transfer-dom

Last synced: 24 days ago
JSON representation

Transfer DOM to another place.

Lists

README

        

# vue-transfer-dom
> requires Vue v1.0.19+

Transfer DOM to another place (eg. ``).

Useful in some situations such as z-index management, see discussion [here](https://github.com/vuejs/vue/issues/2130).

## Demo (prevent modal overlap by other elements)
http://jsfiddle.net/rhyzx/br5cepu3/

## Installation
```sh
npm install vue-transfer-dom
```

## Usage

```js
Vue.use(VueTransferDom /*, {name: 'transferDom'}*/)

new Vue({
template: '

foo
', // div will be appended to body(default)
})

// append to specific place
new Vue({
template: '

foo
', // div will be appended to #bar(document.getElementById)
})
```