This commit is contained in:
fengchenchen
2023-08-14 17:10:11 +08:00
commit 37f6ec895d
1145 changed files with 437754 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import enquireJs from 'enquire.js'
const enquireScreen = function (call) {
// tablet
const handler = {
match: function () {
call && call(0)
},
unmatch: function () {
call && call(-1)
}
}
// mobile
const handler2 = {
match: () => {
call && call(1)
}
}
enquireJs.register('screen and (max-width: 1087.99px)', handler)
enquireJs.register('screen and (max-width: 767.99px)', handler2)
}
export default enquireScreen