vue-isoffline
v1.0.2
Published
A vue plugin detect change on navigator.online
Downloads
10
Readme
vue-isoffline
A tiny plugin to detect offline status & respond to changes in the browser for vue.js 2.x
Installation
npm install -S vue-isoffline
Usage
import VueisOffLine from 'vue-isoffline'
Vue.use(VueisOffLine)
<h1 v-if="isOffLine">offline</h1>
or
watch: {
isOffLine (val) {
if (val) {
console.log('I am offline')
}
}
}