Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcalixte/vue-online-offline
Vue Component for Online & offline events
https://github.com/jcalixte/vue-online-offline
component event offline online slot vue vuejs
Last synced: about 2 months ago
JSON representation
Vue Component for Online & offline events
- Host: GitHub
- URL: https://github.com/jcalixte/vue-online-offline
- Owner: jcalixte
- Created: 2019-11-12T20:00:28.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T15:19:29.000Z (7 months ago)
- Last Synced: 2024-11-03T14:50:07.755Z (2 months ago)
- Topics: component, event, offline, online, slot, vue, vuejs
- Language: Vue
- Size: 898 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-online-offline
Vue Component with online/offline slots
## Project setup
```
npm install vue-online-offline
```
or
```
yarn add vue-online-offline
```## Usage
```vue
I'm online! ๐
I'm offline. ๐คจ
import VueOnlineOffline from 'vue-online-offline'
export default {
components: { VueOnlineOffline },
methods: {
isOnline() {
console.log(`Now I'm online!`)
},
isOffline() {
console.log(`Now I'm offline.`)
}
}
}```