1.创建移动端和PC端两套CSS样式
2.在页面里通过设备判断加载不同的CSS样式
代码如下:
created: function () {
if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){
//移动端CSS
require('../assets/css/mobile/certificationTakePicture_mobile.css');
}else{
//PC端CSS
require('../assets/css/pc/certificationTakePicture_pc.css');
}
},