se-panfilov / vue-notifications

Vue.js agnostic library for non-blocking notifications
https://se-panfilov.github.io/vue-notifications/
MIT License
698 stars 54 forks source link

Browser warnings when created notifications as global mixin #175

Open Yorikkk opened 5 years ago

Yorikkk commented 5 years ago

Hello! I want to create showError and showSuccess notifications one time and use its as a global mixin: Vue.mixin({ notifications: { showError: { title: 'Attention!', message: 'Error message', type: 'error', code: '0' }, showSuccess: { title: '', message: 'Success message', type: 'success', backgroundColor: '#f0f3f5', code: '0' } } })

but browser show warnings (for every component on page): "VueNotifications: trying to create method which is already exist: showError" "VueNotifications: trying to create method which is already exist: showSuccess"

How it include in "methods" and which methods I can create (if I can) for global mixin without "notifications"?

frangte commented 4 years ago

@Yorikkk Have you solved this problem yet?

Yorikkk commented 4 years ago

@frangte Unfortunately no. I use it as local mixin and add on every page as I need

Delari commented 4 years ago

how fix this if want create global mixin?