Files
asco_admin/src/notify.js
T

38 lines
1002 B
JavaScript

export default {
install(Vue, options) {
// 4. add an instance method
Vue.prototype.$ntSetError = function (msg) {
this.$vs.notify({
title: 'خطا در ثبت اطلاعات',
text: msg || 'اطلاعات ثبت نگردید.',
color: 'danger',
})
}
Vue.prototype.$ntSet = function (msg) {
this.$vs.notify({
//title: 'اطلاعات ثبت شد.',
text: msg || 'اطلاعات با موفقیت به ثبت رسید',
color: 'primary',
})
}
Vue.prototype.$ntRemove = function (msg) {
this.$vs.notify({
title: 'اطلاعات با موفقیت حذف شد',
text: msg || '',
color: 'warning',
})
}
Vue.prototype.$ntGetError = function (msg) {
this.$vs.notify({
title: 'خطا در ثبت اطلاعات',
text: msg || 'در اطلاعات دریافت شده خطایی رخ داده ',
color: 'danger',
})
}
}
};