vue-internet-checker
v2.0.1
Published
Check Internet Availability for your vue app
Downloads
1,056
Readme
vue-internet-checker
Check Internet Availability for your vue app 😃.
Get notifications regarding your internet Availability by using it. In needing of your feedback for my efforts.😃
This is on GitHub so let me know if I've b0rked it somewhere, give me a star :star: if you like it :beers:
Requirements
- Vue.js 2.x
:white_check_mark: Install :ok_hand:
npm install vue-internet-checker
# or
yarn add vue-internet-checker
CDN: UNPKG | jsDelivr (available as window.vueInternetChecker
)
:white_check_mark: Usage :mortar_board:
Register the component globally:
Vue.component('vueInternetChecker', require('vue-internet-checker'));
Or use locally
import vueInternetChecker from 'vue-internet-checker';
:white_check_mark: Example :four_leaf_clover:
template
<vue-internet-checker
@status="status"
@event="event"
/>
script
import vueInternetChecker from 'vue-internet-checker';
export default {
components: {
vueInternetChecker,
},
data: () => ({
onLine: null,
}),
methods: {
status(ele) {
console.log(ele);
this.onLine = ele;
},
event(ele) {
console.log(ele);
},
},
};
CSS
:white_check_mark: :ear: Events
| Name | Description |
| -------------------- | --------------------------------------------------------------------------- |
| status
| Emits an Boolean value which can be used for multiple purposes in your app. |
| event
| |
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
vue-internet-checker © Harsh Mendapara, Released under the MIT License. Authored and maintained by Harsh Mendapara with help from contributors (list).
GitHub @Harsh Mendapara
Gmail @Harsh Mendapara
Linkedin @Harsh Mendapara
Facebook @Harsh Mendapara
Let's fly together :)