From 0ff293b3e9d87a17079b0dd95f7dbfb9b6c84282 Mon Sep 17 00:00:00 2001 From: JeremyWuuuuu <15975785+JeremyWuuuuu@users.noreply.github.com> Date: Fri, 25 Mar 2022 17:39:01 +0800 Subject: [PATCH] chore(hooks): [floating] fix eslint warnigns (#6827) - Update importing order --- packages/hooks/__tests__/use-floating.tsx | 4 ++-- packages/hooks/use-floating/index.ts | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/hooks/__tests__/use-floating.tsx b/packages/hooks/__tests__/use-floating.tsx index 3860c01beb..aa6a39585e 100644 --- a/packages/hooks/__tests__/use-floating.tsx +++ b/packages/hooks/__tests__/use-floating.tsx @@ -1,10 +1,10 @@ import { computed, nextTick, reactive, ref, watch } from 'vue' import { mount } from '@vue/test-utils' import { rAF } from '@element-plus/test-utils/tick' -import { useFloating, arrowMiddleware } from '../use-floating' +import { arrowMiddleware, useFloating } from '../use-floating' import type { CSSProperties } from 'vue' -import type { Placement, Strategy, Middleware } from '@floating-ui/dom' +import type { Middleware, Placement, Strategy } from '@floating-ui/dom' describe('useFloating', () => { const createComponent = (arrow = false) => { diff --git a/packages/hooks/use-floating/index.ts b/packages/hooks/use-floating/index.ts index 8041b0ed90..a08fe7cd54 100644 --- a/packages/hooks/use-floating/index.ts +++ b/packages/hooks/use-floating/index.ts @@ -1,17 +1,17 @@ -import { ref, onMounted, watch, unref } from 'vue' +import { onMounted, ref, unref, watch } from 'vue' import { isClient, unrefElement } from '@vueuse/core' import { isNil } from 'lodash-unified' -import { computePosition, arrow as arrowCore } from '@floating-ui/dom' +import { arrow as arrowCore, computePosition } from '@floating-ui/dom' import { buildProps } from '@element-plus/utils' -import type { ToRefs, Ref } from 'vue' +import type { Ref, ToRefs } from 'vue' import type { ComputePositionReturn, - Placement, - Strategy, Middleware, + Placement, SideObject, + Strategy, VirtualElement, } from '@floating-ui/dom'