Init project
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
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',
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user