Install Quasar Dialog under root component or parent component: How to do it?
P粉9900084282024-03-27 13:46:14
0
2
528
The dynamically created Dialog is mounted under the <body> tag by default, so the global Provide and Inject cannot be used. How to mount Dialog under div#app or under parent?
You can use
You will then be able to useapp.provide()
to set the provider on Vueapp
instead of the <App/>component . For example, in the entry script
inject()
the same item in a Quasar dialog child, even if the dialog is installed under
<body>.
It is always installed under
<body>
(non-SSR) or nowhere (SSR mode) - not just "by default". Just check the source - https://github.com/quasarframework/quasar/blob/dev/ui/src/utils/private/global-nodes.js#L6