【fix ESLint】src/components、src/utils
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user