-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #345 from ybkuroki/develop
Fix remain some issues
- Loading branch information
Showing
4 changed files
with
61 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<script setup lang="ts"> | ||
import { useDialogPluginComponent } from 'quasar' | ||
const props = defineProps({ | ||
title: { type: String, required: true }, | ||
message: { type: String, required: true }, | ||
cancel: { type: Boolean, defalut: false }, | ||
persistent: { type: Boolean, defalut: false }, | ||
}) | ||
defineEmits([ | ||
// REQUIRED; need to specify some events that your | ||
// component will emit through useDialogPluginComponent() | ||
...useDialogPluginComponent.emits | ||
]) | ||
const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } = useDialogPluginComponent() | ||
// dialogRef - Vue ref to be applied to QDialog | ||
// onDialogHide - Function to be used as handler for @hide on QDialog | ||
// onDialogOK - Function to call to settle dialog with "ok" outcome | ||
// example: onDialogOK() - no payload | ||
// example: onDialogOK({ /*...*/ }) - with payload | ||
// onDialogCancel - Function to call to settle dialog with "cancel" outcome | ||
</script> | ||
|
||
<template> | ||
<q-dialog ref="dialogRef" @hide="onDialogHide" :persistent="persistent"> | ||
<q-card class="q-dialog-plugin"> | ||
<q-card-section> | ||
<div class="text-indigo text-h6">{{ title }}</div> | ||
</q-card-section> | ||
|
||
<q-card-section> | ||
<div class="text-subtitle2">{{ message }}</div> | ||
</q-card-section> | ||
|
||
<q-card-actions align="right"> | ||
<q-btn flat class="text-indigo text-bold" label="OK" @click="onDialogOK" /> | ||
<q-btn v-if="cancel" flat class="text-indigo text-bold" label="Cancel" @click="onDialogCancel" /> | ||
</q-card-actions> | ||
</q-card> | ||
</q-dialog> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters