mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 13:01:01 +08:00
55 lines
949 B
Vue
55 lines
949 B
Vue
<template>
|
|
<ion-page>
|
|
<ion-header>
|
|
<ion-toolbar>
|
|
<ion-buttons>
|
|
<ion-button @click="dismiss" id="dismiss">Dismiss</ion-button>
|
|
</ion-buttons>
|
|
<ion-title>Modal</ion-title>
|
|
</ion-toolbar>
|
|
</ion-header>
|
|
<ion-content class="ion-padding">
|
|
{{ title }}
|
|
</ion-content>
|
|
</ion-page>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import {
|
|
IonPage,
|
|
IonButton,
|
|
IonButtons,
|
|
IonContent,
|
|
IonHeader,
|
|
IonTitle,
|
|
IonToolbar,
|
|
modalController
|
|
} from '@ionic/vue';
|
|
import { defineComponent } from 'vue';
|
|
|
|
export default defineComponent({
|
|
name: 'ModalContent',
|
|
props: {
|
|
title: { type: String, default: 'Default Title' }
|
|
},
|
|
components: {
|
|
IonPage,
|
|
IonButton,
|
|
IonButtons,
|
|
IonContent,
|
|
IonHeader,
|
|
IonTitle,
|
|
IonToolbar
|
|
},
|
|
setup() {
|
|
const dismiss = async () => {
|
|
await modalController.dismiss();
|
|
}
|
|
|
|
return {
|
|
dismiss
|
|
}
|
|
}
|
|
})
|
|
</script>
|