You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.
Consider the following example, where we can have the v-transfer-dom directive applied to the main template element of the modal component directly, so it will always transfer the modal to the body without having to explicitly use the directive on the modal component:
The example above works only in combination with v-if applied to the main template element of the modal component. If you'd replace v-if with v-show, it won't work and v-if feels more like a hack to make this work.
Let me know what you think.
The text was updated successfully, but these errors were encountered:
Vue instance need the root element in the original position, and vue will wrap root element as an fragment and treat this fragment as root element if detected directives will change the root element position, this is why v-transfer-dom can work with v-if, but not v-show.
Workaround for this is turn it into an fragment instance, such as multiple top-level elements (just add a comment tag) http://jsfiddle.net/9gb0o905/1/
Consider the following example, where we can have the
v-transfer-dom
directive applied to the main template element of the modal component directly, so it will always transfer the modal to the body without having to explicitly use the directive on the modal component:http://jsfiddle.net/lazabogdan/wobmzd87/
The example above works only in combination with
v-if
applied to the main template element of the modal component. If you'd replacev-if
withv-show
, it won't work andv-if
feels more like a hack to make this work.Let me know what you think.
The text was updated successfully, but these errors were encountered: