Add (ai tool submission)
This commit is contained in:
57
resources/js/vue/ToastMessage.vue
Normal file
57
resources/js/vue/ToastMessage.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
<script>
|
||||
import { toast } from "vue3-toastify";
|
||||
export default {
|
||||
name: "ToastMessage",
|
||||
mixins: [],
|
||||
components: {},
|
||||
props: ["type", "message", "timeout"],
|
||||
data: () => ({}),
|
||||
watch: {},
|
||||
computed: {},
|
||||
methods: {
|
||||
triggerMounted() {
|
||||
if (this.type == "error") {
|
||||
toast(this.message, {
|
||||
position: "bottom-center",
|
||||
type: "error",
|
||||
timeout: 3000,
|
||||
closeOnClick: true,
|
||||
pauseOnFocusLoss: true,
|
||||
pauseOnHover: true,
|
||||
draggable: true,
|
||||
draggablePercent: 0.6,
|
||||
showCloseButtonOnHover: false,
|
||||
hideProgressBar: false,
|
||||
closeButton: true,
|
||||
icon: true,
|
||||
rtl: false,
|
||||
});
|
||||
}
|
||||
if (this.type == "success") {
|
||||
toast(this.message, {
|
||||
position: "bottom-center",
|
||||
type: "success",
|
||||
timeout: 3000,
|
||||
closeOnClick: true,
|
||||
pauseOnFocusLoss: true,
|
||||
pauseOnHover: true,
|
||||
draggable: true,
|
||||
draggablePercent: 0.6,
|
||||
showCloseButtonOnHover: false,
|
||||
hideProgressBar: false,
|
||||
closeButton: true,
|
||||
icon: true,
|
||||
rtl: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.triggerMounted();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user