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

Child component defineExpose methods out of the third party component, the parent component ref cannot trigger the child component exposed methods, when the child component is wrapped in the outermost div #11920

Closed
GG-BOYcai opened this issue Sep 13, 2024 · 3 comments

Comments

@GG-BOYcai
Copy link

Vue version

3.4.29

Link to minimal reproduction

https://github.com/GG-BOYcai/test/tree/master

Steps to reproduce

Click btn2, the parent component will trigger the focus method of the child component (when the child component my-button is not wrapped by div), but when the child component is wrapped by div, the parent component cannot trigger the focus method of the child component

What is expected?

{{ title }}:
The parent component can then trigger the child component's methods

What is actually happening?

A parent component cannot trigger a child component's method

System Info

No response

Any additional comments?

No response

@edison1105
Copy link
Member

It can't reproduce. please confirm your reproduction.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2024
@GG-BOYcai
Copy link
Author

It can't reproduce. please confirm your reproduction.

There is no problem with this submission.
and the specific operation and performance are as follows: clicking btn2 will trigger the focus method of the sub-component a-button. At this time, the performance is that the query button will focus, but the current click does not focus, which is a problem; When you remove the outermost div of the subcomponent my-button, click btn2 and the query button will focus.

The question is why clicking btn2 does not trigger the method of the child component when the outermost layer of the child component is wrapped by div

@edison1105
Copy link
Member

@GG-BOYcai
I can't reproduce it with your reproduction. Please confirm your reproduction can directly reproduce your problem without any change require.

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

No branches or pull requests

2 participants