For <component :is="Math.random() > 0.5 ? Foo : Bar" />, I define a function ChangeFooName in Foo and a function ChangeBarName in Bar, how to use the function in Foo or Bar when Foo or Bar is rendered? #9415
Replies: 2 comments
-
What do you mean exactly when you say you want to "use" that function. Where? When? How? Are you asking about how to use it in the parent via a template ref? |
Beta Was this translation helpful? Give feedback.
-
The parent is like this:
and the ShowThumbImage is:
I want to use setThumbImage, deleteThumbImage, myTest from ShowThumbImage in handleThumbImage from The parent vue file. |
Beta Was this translation helpful? Give feedback.
-
For , I define a function ChangeFooName in Foo and a function ChangeBarName in Bar, when the result of ":is" is Foo, I want to use the function ChangeFooName. I have no idea how to make it.
Beta Was this translation helpful? Give feedback.
All reactions