mounted(){ let self = this; window.addEventListener('online', self.updateOnlineStatus, true); window.addEventListener('offline', self.updateOnlineStatus, true);},methods: { updateOnlineStatus: function(){ var self = this; self.onLineInfo = navigator.onLine ? "online" : "offline"; },}