mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2026-04-25 01:00:41 +03:00
added mixin for mobile check
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export const Mixins = {
|
||||
methods: {
|
||||
checkWindowSize() {
|
||||
this.mobile = window.innerWidth <= 600
|
||||
},
|
||||
AddWindowListener() {
|
||||
window.addEventListener('resize', this.checkWindowSize)
|
||||
},
|
||||
RemoveWindowListener() {
|
||||
window.removeEventListener('resize', this.checkWindowSize)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user