mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
refactor(utils): remove isFF (#6507)
* refactor(utils): remove isFF * chore: remove isObject
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { rAF, cAF } from '@element-plus/utils'
|
||||
import { isFF } from '../utils'
|
||||
import { rAF, cAF, isFirefox } from '@element-plus/utils'
|
||||
|
||||
import type { ComputedRef } from 'vue'
|
||||
|
||||
@@ -43,7 +42,7 @@ export const useGridWheel = (
|
||||
xOffset += x
|
||||
yOffset += y
|
||||
|
||||
if (!isFF) {
|
||||
if (!isFirefox()) {
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { rAF, cAF } from '@element-plus/utils'
|
||||
import { isFF } from '../utils'
|
||||
import { rAF, cAF, isFirefox } from '@element-plus/utils'
|
||||
import { HORIZONTAL, VERTICAL } from '../defaults'
|
||||
|
||||
import type { ComputedRef } from 'vue'
|
||||
@@ -50,7 +49,7 @@ const useWheel = (
|
||||
|
||||
offset += newOffset
|
||||
|
||||
if (!isFF) {
|
||||
if (!isFirefox()) {
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { isObject } from '@vue/shared'
|
||||
import {
|
||||
FORWARD,
|
||||
BACKWARD,
|
||||
@@ -86,8 +85,3 @@ export function renderThumbStyle({ move, size, bar }, layout: string) {
|
||||
|
||||
return style
|
||||
}
|
||||
|
||||
export const isFF =
|
||||
typeof navigator !== 'undefined' &&
|
||||
isObject(navigator) &&
|
||||
/Firefox/i.test(navigator.userAgent)
|
||||
|
||||
Reference in New Issue
Block a user