mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-23 11:59:34 +08:00
fix(components): [autocomplete] SSR hydration error caused by random ID (#15523)
This commit is contained in:
parent
9e7709b58f
commit
9a7ea5c397
@ -107,8 +107,8 @@ 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'
|
||||
import { useAttrs, useNamespace } from '@element-plus/hooks'
|
||||
import { generateId, isArray, throwError } from '@element-plus/utils'
|
||||
import { useAttrs, useId, useNamespace } from '@element-plus/hooks'
|
||||
import { isArray, throwError } from '@element-plus/utils'
|
||||
import {
|
||||
CHANGE_EVENT,
|
||||
INPUT_EVENT,
|
||||
@ -154,7 +154,7 @@ const activated = ref(false)
|
||||
const suggestionDisabled = ref(false)
|
||||
const loading = ref(false)
|
||||
|
||||
const listboxId = computed(() => ns.b(String(generateId())))
|
||||
const listboxId = useId()
|
||||
const styles = computed(() => rawAttrs.style as StyleValue)
|
||||
|
||||
const suggestionVisible = computed(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user