Platform Detection
API
https://quasar.dev/options/platform-detection#platform-api
사용
template
import { useQuasar } from 'quasar'
setup () {
const $q = useQuasar()
$q.platform.is.mobile
}
외부에서 사용될 떄
js
import { Platform } from "quasar";
Platform.is의 return
json
{
"chrome": true,
"desktop": true,
"mac": true,
"name": "chrome",
"platform": "mac",
"version": "70.0.3538.110",
"versionNumber": 70,
"webkit": true
}
Api Property
Platform.is.mobile | ||
Platform.is.cordova | ||
Platform.is.capacitor | ||
Platform.is.nativeMobile | ||
Platform.is.nativeMobileWrapper | 'cordova' 'capacitor' undefined | |
Platform.is.electron | ||
Platform.is.desktop | ||
Platform.is.bex | ||
Platform.is.android | ||
Platform.is.blackberry | ||
Platform.is.cros | ||
Platform.is.ios | ||
Platform.is.ipad | ||
Platform.is.iphone | ||
Platform.is.ipod | ||
Platform.is.kindle | ||
Platform.is.linux | ||
Platform.is.mac | ||
Platform.is.win | ||
Platform.is.winphone | ||
Platform.is.playbook | ||
Platform.is.silk | ||
Platform.is.chrome | ||
Platform.is.opera | ||
Platform.is.safari | ||
Platform.is.edge | ||
Platform.is.ie | ||
Platform.has.touch | ||
Platform.within.iframe |