uptime-kuma/src/mixins/mobile.js

26 lines
401 B
JavaScript
Raw Normal View History

2021-08-10 07:02:46 +00:00
export default {
data() {
return {
windowWidth: window.innerWidth,
}
},
created() {
window.addEventListener("resize", this.onResize);
},
methods: {
onResize() {
this.windowWidth = window.innerWidth;
},
},
computed: {
isMobile() {
return this.windowWidth <= 767.98;
},
}
}