fix(components): [dialog] error calling resetPostion before dialog is rendered (#17855)

fix: [Component][dialog]在dialog显示之前调用dialog.resetPostion()方法会抛异常 #17851

Co-authored-by: gao.dong <gao.dong@bestv.com.cn>
This commit is contained in:
donga-gao 2024-08-13 10:06:38 +08:00 committed by GitHub
parent c0f06a4fc4
commit 2d6c16fae9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -143,7 +143,7 @@ const overlayEvent = useSameTarget(onModalClick)
const draggable = computed(() => props.draggable && !props.fullscreen)
const resetPostion = () => {
dialogContentRef.value.resetPostion()
dialogContentRef.value?.resetPostion()
}
defineExpose({