utils: add isMobile

This commit is contained in:
Micooz
2017-07-28 10:27:42 +08:00
parent c77403baef
commit 339baea876
+6
View File
@@ -35,4 +35,10 @@ module.exports = {
}
return actualLeft - elementScrollLeft;
},
/**
* check if user is using mobile or not
*/
isMobile: /mobile/i.test(window.navigator.userAgent)
};