https://github.com/paraself/vue-noti
A Vue Notification plugin which fallback to web notification api when page visibility is off.
https://github.com/paraself/vue-noti
notification vue
Last synced: 11 months ago
JSON representation
A Vue Notification plugin which fallback to web notification api when page visibility is off.
- Host: GitHub
- URL: https://github.com/paraself/vue-noti
- Owner: paraself
- Created: 2019-05-09T10:50:21.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-08T07:49:02.000Z (about 6 years ago)
- Last Synced: 2025-05-28T03:50:38.100Z (about 1 year ago)
- Topics: notification, vue
- Language: Vue
- Homepage:
- Size: 319 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-noti
A Vue Notification plugin which fallback to web notification api when page visibility is off.
**install**
```npm i vue-noti```
Make sure you have both ``vue`` and ``vue-notification`` as peer dependencies.
Init both ``vue-notification`` and ``vue-noti``
``` javascript
import Vue from 'vue'
import Notifications from 'vue-notification'
import VueNoti from 'vue-noti'
Vue.use(Notifications)
Vue.use(VueNoti)
```
In App.vue:
```
```
Head to [vue-notification](https://www.npmjs.com/package/vue-notification) for a detailed documentation on how to config the notification component.
**Usage**
In any of you vue script file,
```javascript
this.$noti({
group: 'foo',
title: 'Important message',
text: 'Hello user! This is a notification!'
})
```
You can sue ```Vue.notify``` as well.
**Test**
To run the example, you have make sure ```@vue/cli-service-global``` is installed globally. If you don't know how to do it, refer to [Vue Instant Prototyping](https://cli.vuejs.org/guide/prototyping.html) to see how to config the environment.
Then just run ```npm run test``` to make the example working.