mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
chore(): sync with main
This commit is contained in:
@ -17,6 +17,10 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: '/lifecycle',
|
||||
component: () => import('@/views/Lifecycle.vue')
|
||||
},
|
||||
{
|
||||
path: '/lifecycle-setup',
|
||||
component: () => import('@/views/LifecycleSetup.vue')
|
||||
},
|
||||
{
|
||||
path: '/overlays',
|
||||
name: 'Overlays',
|
||||
|
@ -47,6 +47,9 @@
|
||||
<ion-item button router-link="/lifecycle" id="lifecycle">
|
||||
<ion-label>Lifecycle</ion-label>
|
||||
</ion-item>
|
||||
<ion-item button router-link="/lifecycle-setup" id="lifecycle-setup">
|
||||
<ion-label>Lifecycle (Setup)</ion-label>
|
||||
</ion-item>
|
||||
<ion-item button router-link="/delayed-redirect" id="delayed-redirect">
|
||||
<ion-label>Delayed Redirect</ion-label>
|
||||
</ion-item>
|
||||
|
56
packages/vue/test-app/src/views/LifecycleSetup.vue
Normal file
56
packages/vue/test-app/src/views/LifecycleSetup.vue
Normal file
@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<ion-page data-pageid="lifecycle-setup">
|
||||
<ion-header :translucent="true">
|
||||
<ion-toolbar>
|
||||
<ion-buttons>
|
||||
<ion-back-button></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title>Lifecycle (Setup)</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content :fullscreen="true">
|
||||
<ion-header collapse="condense">
|
||||
<ion-toolbar>
|
||||
<ion-title size="large">Lifecycle (Setup)</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<div class="ion-padding">
|
||||
onIonViewWillEnter: <div id="onWillEnter">{{ onWillEnter }}</div><br />
|
||||
onIonViewDidEnter: <div id="onDidEnter">{{ onDidEnter }}</div><br />
|
||||
onIonViewWillLeave: <div id="onWillLeave">{{ onWillLeave }}</div><br />
|
||||
onIonViewDidLeave: <div id="onDidLeave">{{ onDidLeave }}</div><br />
|
||||
|
||||
<ion-button router-link="/navigation" id="lifecycle-navigation">Go to another page</ion-button>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
IonButton,
|
||||
IonBackButton,
|
||||
IonButtons,
|
||||
IonContent,
|
||||
IonHeader,
|
||||
IonPage,
|
||||
IonTitle,
|
||||
IonToolbar,
|
||||
onIonViewWillEnter,
|
||||
onIonViewDidEnter,
|
||||
onIonViewWillLeave,
|
||||
onIonViewDidLeave
|
||||
} from '@ionic/vue';
|
||||
import { ref } from 'vue';
|
||||
const onWillEnter = ref(0);
|
||||
const onDidEnter = ref(0);
|
||||
const onWillLeave = ref(0);
|
||||
const onDidLeave = ref(0);
|
||||
|
||||
onIonViewWillEnter(() => onWillEnter.value += 1);
|
||||
onIonViewDidEnter(() => onDidEnter.value += 1);
|
||||
onIonViewWillLeave(() => onWillLeave.value += 1);
|
||||
onIonViewDidLeave(() => onDidLeave.value += 1);
|
||||
</script>
|
@ -31,6 +31,10 @@
|
||||
<ion-item button router-link="/tabs" id="tabs-primary">
|
||||
<ion-label>Go to Primary Tabs</ion-label>
|
||||
</ion-item>
|
||||
|
||||
<ion-item router-link="/tabs/tab1/child-one?key=value" id="child-one-query-string">
|
||||
<ion-label>Go to Tab 1 Child 1 with Query Params</ion-label>
|
||||
</ion-item>
|
||||
</ion-content>
|
||||
</ion-page>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user