test: fix scrollIntoView (#5960)

This commit is contained in:
三咲智子 2022-02-11 12:35:26 +08:00 committed by GitHub
parent 39cb432cd9
commit 590538cd38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -278,7 +278,7 @@ export default defineComponent({
const activeNode =
menuElement.querySelector('.el-cascader-node.is-active') ||
menuElement.querySelector('.el-cascader-node.in-active-path')
container?.scrollIntoView(activeNode)
container?.scrollIntoView?.(activeNode)
}
})
}

View File

@ -227,7 +227,7 @@ export default defineComponent({
const scrollToField = (prop: string) => {
fields.forEach((item) => {
if (item.prop === prop) {
item.$el.scrollIntoView()
item.$el.scrollIntoView?.()
}
})
}

View File

@ -659,7 +659,7 @@ export const useSelect = (props, states: States, ctx) => {
'.el-select-dropdown__wrap'
)
if (menu) {
menu.scrollIntoView(target)
menu.scrollIntoView?.(target)
}
}
scrollbar.value?.handleScroll()