Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom components in vuetify-dialog not working #8995

Closed
vcordes79 opened this issue Mar 16, 2021 · 0 comments · Fixed by #9008
Closed

custom components in vuetify-dialog not working #8995

vcordes79 opened this issue Mar 16, 2021 · 0 comments · Fixed by #9008

Comments

@vcordes79
Copy link

Versions

  • nuxt: v2.15.3
  • node: v12.20.2

Steps to reproduce

Use vuetify-dialog plugin with custom components

What is Expected?

components should work in dialogs as they do everywhere else

What is actually happening?

$nuxt is not accessible because vuetify-dialog uses a seperate Vue instance. Because of this for example fetch is not working.

Proposed fix

I fixed it by modifying the $nuxt property in index.js:

Object.defineProperty(Vue.prototype, '$nuxt', {
  get() {
    return this.$root.$options.$nuxt || window.$nuxt
  },
  configurable: true
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants