【fix ESLint】src/components、src/utils

This commit is contained in:
zhaoxiao
2023-03-06 14:04:51 +08:00
parent 8c5844500b
commit d564f67722
13 changed files with 106 additions and 121 deletions
+6 -6
View File
@@ -14,11 +14,11 @@ export function isEdge () {
export function getIEVersion () {
const userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
const isIE = isIE()
const isIE11 = isIE11()
const isEdge = isEdge()
const isIEFlag = isIE()
const isIE11Flag = isIE11()
const isEdgeFlag = isEdge()
if (isIE) {
if (isIEFlag) {
const reIE = new RegExp('MSIE (\\d+\\.\\d+);')
reIE.test(userAgent)
const fIEVersion = parseFloat(RegExp.$1)
@@ -27,9 +27,9 @@ export function getIEVersion () {
} else {
return 6// IE版本<7
}
} else if (isEdge) {
} else if (isEdgeFlag) {
return 'edge'
} else if (isIE11) {
} else if (isIE11Flag) {
return 11
} else {
return -1