Add New SweetAlert & Notification Components

This commit is contained in:
Aman Upadhyay
2021-04-09 12:35:50 +00:00
committed by Mohit Panjwani
parent 3f7db2793f
commit c3d3e5e35f
78 changed files with 2295 additions and 984 deletions

View File

@ -208,13 +208,17 @@ export default {
},
methods: {
...mapActions('user', ['uploadAvatar']),
...mapActions('notification', ['showNotification']),
onUploadHandler(cropper) {
this.previewAvatar = cropper
.getCroppedCanvas()
.toDataURL(this.cropperOutputMime)
},
onHandleUploadError() {
window.toastr['error']('Oops! Something went wrong...')
this.showNotification({
type: 'error',
message: 'Oops! Something went wrong...',
})
},
onChange(file) {
this.cropperOutputMime = file.type