vue判断Android还是ios
appSource() {const u = navigator.userAgent;const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);if (isiOS) {return "ios";} else {return "andriod";}},
·
appSource() {
const u = navigator.userAgent;
const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
if (isiOS) {
return "ios";
} else {
return "andriod";
}
},
更多推荐
已为社区贡献16条内容
所有评论(0)