How to resolve Vue warnings that occur when implementing a [button group] component and triggering dynamic emit events? #10822
Unanswered
Hobeein
asked this question in
Help/Questions
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need a [button group] component, use props.btns to control button number and event name, for example:
Here's why I didn't declare the event name in defineEmits:
1、declare the event name(after external props passed to the component) in defineEmits will alert an error because of Variable Hoisting
2、I need do something before emit event, so I don't want to emit custom events directly :
Is there a better way to implement the component I need and No Warning?
thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions