fix(renderless/common): [autocomplete] fix poperOptions undefind bug (#899)

This commit is contained in:
yoyo 2023-11-23 09:09:37 +08:00 committed by GitHub
parent 40322d75e7
commit c2277b8d5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ export default (options: IPopperInputParams) => {
// 如果触发源是隐藏的,其弹出层也设置为隐藏。组件可以通过 props.popperOptions.followReferenceHide = true/false来控制
const followHide = (popperInstance: PopperJS) => {
const { followReferenceHide = true } = props?.popperOptions
const { followReferenceHide = true } = props?.popperOptions || {}
const { _popper: popper, _reference: reference } = popperInstance
if (followReferenceHide && getComputedStyle(reference).position !== 'fixed' && reference.offsetParent === null) {