任一存 %!s(int64=2) %!d(string=hai) anos
pai
achega
b96c54ccf7
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/main.js

+ 2 - 1
src/main.js

@@ -23,10 +23,11 @@ document.body.appendChild(audioNode)
 
 const uaParser = new UAParser()
 const uaInfo = uaParser.getResult()
-console.log(uaInfo)
+console.log('user agent: ', uaInfo)
 Vue.prototype.$uaInfo = uaInfo
 if (uaInfo.device.type === 'mobile') {
   Vue.prototype.$isMobile = true
+  document.getElementById('app').classList.add('mobile')
 } else {
   Vue.prototype.$isMobile = false
 }