Skip to content

Commit a11b72b

Browse files
committed
♻️ Use MountingPortal and abandon targetEl
1 parent 681e751 commit a11b72b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"dependencies": {
3434
"a11y-dialog": "^5.2.0",
35-
"portal-vue": "^1.5.1"
35+
"portal-vue": "^2.1.0"
3636
},
3737
"peerDependencies": {
3838
"vue": "2.x"

src/A11yDialog.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<portal :target-el="portalTarget">
2+
<mounting-portal append :mount-to="portalTarget">
33
<div :id="id" :class="classNames.base" ref="rootElement">
44
<div
55
data-a11y-dialog-hide
@@ -31,12 +31,12 @@
3131
</div>
3232
</component>
3333
</div>
34-
</portal>
34+
</mounting-portal>
3535
</template>
3636

3737
<script>
3838
import A11yDialog from 'a11y-dialog'
39-
import { Portal } from 'portal-vue'
39+
import { MountingPortal } from 'portal-vue'
4040
4141
export default {
4242
name: 'VueA11yDialog',
@@ -53,7 +53,7 @@
5353
},
5454
5555
components: {
56-
Portal
56+
MountingPortal
5757
},
5858
5959
computed: {

0 commit comments

Comments
 (0)