@nextcloud/vue
Version:
Nextcloud vue components
16 lines (15 loc) • 450 B
JavaScript
import i from "vue";
const n = new i({ data() {
return { isMobile: !1 };
}, watch: { isMobile(e) {
this.$emit("changed", e);
} }, created() {
window.addEventListener("resize", this.handleWindowResize), this.handleWindowResize();
}, beforeDestroy() {
window.removeEventListener("resize", this.handleWindowResize);
}, methods: { handleWindowResize() {
this.isMobile = document.documentElement.clientWidth < 1024;
} } });
export {
n as I
};