This commit is contained in:
@@ -1,44 +1,13 @@
|
||||
<template>
|
||||
<!-- <v-dialog
|
||||
v-model="dialog"
|
||||
:max-width="options.width"
|
||||
:style="{ zIndex: options.zIndex }"
|
||||
@keydown.esc="cancel"
|
||||
>
|
||||
<v-card>
|
||||
<v-toolbar dark :color="options.color" dense flat>
|
||||
<v-toolbar-title class="white--text">{{ title }}</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text v-show="!!message" class="pa-4">{{ message }}</v-card-text>
|
||||
<v-card-actions class="pt-0">
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary darken-1" text @click.native="agree">Yes</v-btn>
|
||||
<v-btn color="grey" text @click.native="cancel">Cancel</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog> -->
|
||||
<!-- <v-snackbar
|
||||
:color="options.color"
|
||||
:value="snackbar"
|
||||
:timeout="options.timeout"
|
||||
>
|
||||
<v-icon color="white">fa-info-circle</v-icon>
|
||||
<div>
|
||||
{{ message }}
|
||||
</div>
|
||||
<v-btn icon @click="snackbar = false">
|
||||
<v-icon color="white">fa-times-circle</v-icon>
|
||||
</v-btn>
|
||||
</v-snackbar> -->
|
||||
<v-snackbar
|
||||
:value="snackbar"
|
||||
:color="options.color"
|
||||
:value="isVisible"
|
||||
:color="options.type"
|
||||
:timeout="options.timeout"
|
||||
>
|
||||
<v-alert type="info">
|
||||
<v-alert :type="options.type">
|
||||
{{ message }}
|
||||
</v-alert>
|
||||
<v-btn icon @click="snackbar = false">
|
||||
<v-btn icon @click="isVisible = false">
|
||||
<v-icon color="white">fa-times-circle</v-icon>
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
@@ -47,17 +16,17 @@
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({
|
||||
snackbar: false,
|
||||
isVisible: false,
|
||||
|
||||
message: null,
|
||||
options: {
|
||||
color: "primary",
|
||||
type: "info", //one of success, info, warning, and error, see v-alert docs for more info
|
||||
timeout: 3000
|
||||
}
|
||||
}),
|
||||
methods: {
|
||||
open(message, options) {
|
||||
this.snackbar = true;
|
||||
this.isVisible = true;
|
||||
this.message = message;
|
||||
this.options = Object.assign(this.options, options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user