0
Follow
2
View

$emit not being caught by listener

dbwjik 注册会员
2023-01-26 09:33

Listeners need to be camelCas'ed like this


and not kebab-case'ed.

As you can see in the Vue devtools, since you're emitting listenButtonEvent here.


A better convention being emitting a update:listenButtonEvent btw, cannot find an official recommendation for that one again.

crispenn 注册会员
2023-01-26 09:33

listen-button-event shouldn't be on the div it should be on the CategoryWrapper Component.

About the Author

Question Info

Publish Time
2023-01-26 09:33
Update Time
2023-01-26 09:33