fix(vue): modal, popover, and nav are now created within application context (#22282)

resolves #22079
This commit is contained in:
Liam DeBeasi
2020-10-12 15:07:49 -04:00
committed by GitHub
parent 181d322192
commit 6026c65b1a
20 changed files with 405 additions and 136 deletions

View File

@ -16,8 +16,6 @@ export const defineOverlayContainer = <Props extends object>(name: string, compo
const Container = defineComponent<Props & OverlayProps>((props, { slots, emit }) => {
const overlay = ref();
const content = ref();
const onVnodeMounted = async () => {
const isOpen = props.isOpen;
isOpen && (await present(props))
@ -39,7 +37,7 @@ export const defineOverlayContainer = <Props extends object>(name: string, compo
}
const present = async (props: Readonly<Props>) => {
const component = (slots) ? h('div', { ref: content }, slots) : undefined;
const component = slots.default && slots.default()[0];
overlay.value = await controller.create({
...props,
component