"platform" is undefined when using quasar components and rendering component manually #16727
Unanswered
gkovalechyn
asked this question in
General - Components / Directives / etc
Replies: 2 comments 3 replies
-
I also encountered the same problem. Have you solved this problem? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Are you using the Quasar CLI? If not, most Quasar components use some internal logic which means you can't simply import Quasar components without a build/bundler configuration (e.g. the Vite plugin). |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I'm currently trying to setup a simple confirmation dialog composable that uses quasar components and the HTML
dialog
element but when I try to add any quasar elements an error is thrown saying it's not able to access theplatform
field.The composable is this:
Which renders this component:
The composable is called like this:
The issue is that when the function is called it throws this error:
It refers to the following section inside the button component:
I'm assuming this has something to do with the way I am rendering the component it does not have access to the vue instance. I couldn't find much information in the vue documentation since this render method seems to be used only internally.
Does anyone have any idea on how I could get this to work? The main idea is to render a simple dialog without having to insert any other components in the component that wants to display a confirmation dialog or adding other elements to my main App component.
Worst case I can just use normal elements and style them but I would like to use quasar components for this dialog.
Beta Was this translation helpful? Give feedback.
All reactions