|
@@ -2,7 +2,7 @@ import UAParser from "ua-parser-js";
|
|
|
|
|
|
const ua = new UAParser();
|
|
|
|
|
|
-export function printUA() {
|
|
|
+function printUA() {
|
|
|
console.log(
|
|
|
`浏览器名称:${ua.getBrowser().name} 浏览器版本:${
|
|
|
ua.getBrowser().version
|
|
@@ -13,3 +13,15 @@ export function printUA() {
|
|
|
}
|
|
|
|
|
|
printUA();
|
|
|
+
|
|
|
+export default function () {
|
|
|
+ console.log(parseInt(ua.getBrowser().version || "", 10));
|
|
|
+ if (
|
|
|
+ ua.getBrowser().name !== "Blink" ||
|
|
|
+ parseInt(ua.getBrowser().version || "", 10) <= 80
|
|
|
+ ) {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+}
|