From 3af5ca5cd44bfe73b0cb1a46e50ed05ec729d7ce Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Sun, 18 Dec 2016 10:49:21 +0800 Subject: [PATCH] Correct calculation of whether the mobile browser --- CHANGELOG.md | 8 ++++++++ src/util.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84205b57..92f71fcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.1.5 +### Features +- Add table style + +### Bug fixes +- Not fixed position of hte navbar in the mobile browser +- Correct calculation of whether the mobile browser + ## 1.1.4 ### Bug fixes - Fixed chinese auchor link diff --git a/src/util.js b/src/util.js index 013b2769..c93b5888 100644 --- a/src/util.js +++ b/src/util.js @@ -97,6 +97,6 @@ export function getRoute () { } export function isMobile () { - return /mobile/i.test(navigator.userAgent) + return document.body.clientWidth <= 600 }