You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.0 KiB
67 lines
2.0 KiB
5 years ago
|
<template>
|
||
|
<v-dialog v-model="modal" :width="properties.width || '40%'" transition="slide-x-transition">
|
||
|
<v-card class="RTL">
|
||
|
<v-card-title class="red lighten-5" primary-title>
|
||
|
<WM-PartTitle
|
||
|
class="WM-Margin-T-20"
|
||
|
:TitleFa="properties.title || 'عنوان'"
|
||
|
:TitleEn="properties.titleEn || 'title'"
|
||
|
:color="properties.color || 'orange'"
|
||
|
></WM-PartTitle>
|
||
|
</v-card-title>
|
||
|
<v-card-text>
|
||
|
<div
|
||
|
class="WM-Align-R WM-Margin-T-10"
|
||
|
>{{ properties.message || 'پیام'}}</div>
|
||
|
</v-card-text>
|
||
|
|
||
|
<v-divider></v-divider>
|
||
|
<v-card-actions>
|
||
|
<v-spacer></v-spacer>
|
||
|
<v-btn
|
||
|
:color="properties.color || 'orange'"
|
||
|
depressed
|
||
|
dark
|
||
|
@click="$_closeModalStack()"
|
||
|
>
|
||
|
<v-icon dark right>fas fa-trash-alt</v-icon>
|
||
|
متوجه شدم!
|
||
|
</v-btn>
|
||
|
</v-card-actions>
|
||
|
</v-card>
|
||
|
</v-dialog>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import { mapActions, mapGetters } from "vuex";
|
||
|
import axios from 'axios';
|
||
|
import { url } from '@Common/mixins/urls';
|
||
|
export default {
|
||
|
name: "modal_modal_helper",
|
||
|
data: () => ({
|
||
|
properties: {}
|
||
|
}),
|
||
|
computed: {
|
||
|
...mapGetters("modal", ["isModalStack", "getModal"]),
|
||
|
modal: {
|
||
|
get() {
|
||
|
return this.isModalStack(this.$options.name);
|
||
|
},
|
||
|
set(value) {
|
||
|
if (!value) {
|
||
|
this.$_closeModalStack();
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
async created() {
|
||
|
if (this.modal) {
|
||
|
let response = await axios.get(url('helpers', {helper: this.getModal(this.$options.name).slug}));
|
||
|
if (response && response.status == 200) {
|
||
|
this.properties = response.data.data;
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
};
|
||
|
</script>
|