fix(vue): ion-page component is properly shown with HMR (#22319)

This commit is contained in:
Liam DeBeasi
2020-10-14 18:45:46 -04:00
committed by GitHub
parent 6e9e58ed61
commit c5ab562eaa
4 changed files with 52 additions and 11 deletions

View File

@ -3,7 +3,11 @@ import { h, defineComponent } from 'vue';
export const IonPage = defineComponent({
name: 'IonPage',
props: {
isInOutlet: { type: Boolean, default: false }
isInOutlet: { type: Boolean, default: false },
registerIonPage: { type: Function, default: () => {} }
},
mounted() {
this.$props.registerIonPage(this.$refs.ionPage);
},
setup(props, { attrs, slots }) {
const hidePageClass = (props.isInOutlet) ? 'ion-page-invisible' : '';