fix(components): [autocomplete] tooltip offset (#12216)

* fix(components): [autocomplete] tooltip offset

* fix(components): [autocomplete] remove nextTick
This commit is contained in:
井柏然
2023-08-10 22:15:06 +08:00
committed by GitHub
parent 6d4b81e290
commit 3245b4e79f

View File

@@ -101,13 +101,7 @@
</template>
<script lang="ts" setup>
import {
computed,
nextTick,
onMounted,
ref,
useAttrs as useRawAttrs,
} from 'vue'
import { computed, onMounted, ref, useAttrs as useRawAttrs } from 'vue'
import { debounce } from 'lodash-unified'
import { onClickOutside } from '@vueuse/core'
import { Loading } from '@element-plus/icons-vue'
@@ -177,8 +171,7 @@ const refInput = computed<HTMLInputElement[]>(() => {
return []
})
const onSuggestionShow = async () => {
await nextTick()
const onSuggestionShow = () => {
if (suggestionVisible.value) {
dropdownWidth.value = `${inputRef.value!.$el.offsetWidth}px`
}