Skip to content

Commit 2b3ccb3

Browse files
committed
fix: make it work when paired with @vue3 + @vue/compat
TL;DR - default vue-compat mode is `2` which makes slots behave like vue 2 (not functions) but our isVue3 still evals to true, forwarding access to the correct property but that is not a function because of compat mode. This config overrides it.
1 parent e182149 commit 2b3ccb3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/A11yDialog.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ const getInitialState = () => ({
2727
export const VALID_ROLES = ["dialog", "alertdialog"];
2828
2929
export default {
30+
compatConfig: {
31+
MODE: 3 // opt-in to Vue 3 if loaded in compat mode
32+
},
3033
name: "a11y-dialog",
3134
emits: ['show', 'hide', 'close'],
3235
props: {

0 commit comments

Comments
 (0)