wip
This commit is contained in:
parent
cb965feab4
commit
32c4b079ba
4 changed files with 115 additions and 156 deletions
|
|
@ -14,6 +14,9 @@
|
|||
<mk-switch v-model:value="dialogCancel">
|
||||
<span>With cancel button</span>
|
||||
</mk-switch>
|
||||
<mk-switch v-model:value="dialogCancelByBgClick">
|
||||
<span>Can cancel by modal bg click</span>
|
||||
</mk-switch>
|
||||
<mk-switch v-model:value="dialogInput">
|
||||
<span>With input field</span>
|
||||
</mk-switch>
|
||||
|
|
@ -51,6 +54,7 @@ export default defineComponent({
|
|||
dialogTitle: 'Hello',
|
||||
dialogBody: 'World!',
|
||||
dialogCancel: false,
|
||||
dialogCancelByBgClick: true,
|
||||
dialogInput: false,
|
||||
dialogResult: null,
|
||||
faExclamationTriangle
|
||||
|
|
@ -59,10 +63,12 @@ export default defineComponent({
|
|||
|
||||
methods: {
|
||||
async showDialog() {
|
||||
this.dialogResult = null;
|
||||
this.dialogResult = await this.$store.dispatch('showDialog', {
|
||||
title: this.dialogTitle,
|
||||
text: this.dialogBody,
|
||||
showCancelButton: this.dialogCancel,
|
||||
cancelableByBgClick: this.dialogCancelByBgClick,
|
||||
input: this.dialogInput ? {} : null
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue