mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 17:42:15 +08:00
fix(vue): pass props to component when using modal and popover controller (#22198)
resolves #22189
This commit is contained in:
@ -1,8 +1,16 @@
|
||||
import { createVNode, render } from 'vue';
|
||||
|
||||
export const VueDelegate = () => {
|
||||
const attachViewToDom = (parentElement: HTMLElement, component: any, _: any, classes?: string[]) => {
|
||||
const vueInstance = createVNode(component);
|
||||
const attachViewToDom = (parentElement: HTMLElement, component: any, componentProps: any, classes?: string[]) => {
|
||||
/**
|
||||
* Ionic Framework passes in modal and popover element
|
||||
* refs as props, but if these are not defined
|
||||
* on the Vue component instance as props, Vue will
|
||||
* warn the user.
|
||||
*/
|
||||
delete componentProps['modal'];
|
||||
delete componentProps['popover'];
|
||||
const vueInstance = createVNode(component, componentProps);
|
||||
|
||||
const div = document.createElement('div');
|
||||
classes && div.classList.add(...classes);
|
||||
|
Reference in New Issue
Block a user