Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1657 breaks unrefElement(exposedComponent) #1702

Closed
7 tasks done
CarterLi opened this issue Jun 18, 2022 · 3 comments · Fixed by #1703
Closed
7 tasks done

#1657 breaks unrefElement(exposedComponent) #1702

CarterLi opened this issue Jun 18, 2022 · 3 comments · Fixed by #1703

Comments

@CarterLi
Copy link

CarterLi commented Jun 18, 2022

Describe the bug

exposed component is a proxy object which only contains exposed properties. You can get values of public properties like$el but testing their existence will fail if users didn't expose them manually.

'$el' in (plain as VueInstance)

Reproduction

https://stackblitz.com/edit/vitejs-vite-amsrj4/

System Info

With minimal reproduction is provided, this section is meaningless

Used Package Manager

npm

Validations

@CarterLi CarterLi changed the title https://github.com/vueuse/vueuse/pull/1657 breaks exposed component #1657 breaks exposed component Jun 18, 2022
@CarterLi CarterLi changed the title #1657 breaks exposed component #1657 breaks unrefElement(exposedComponent) Jun 18, 2022
@CarterLi
Copy link
Author

Ref: element-plus/element-plus#8338 (comment)

@DrJume Ideas?

@DrJume
Copy link
Contributor

DrJume commented Jun 18, 2022

I'm sorry for causing this trouble! This issue seems to happen only with Vue components which use expose/defineExpose but don't expose a custom $el property.

It's very likely to be caused by a bug in Vue.js:

@DrJume
Copy link
Contributor

DrJume commented Jun 18, 2022

Thank you for your insight! I submitted a PR in vuejs/core to fix the underlying? issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants