Doesn’t it support to use “$event” in custom vue event?
See original GitHub issueVersion
2.5.17
Steps to reproduce
<my-component @my-event=“handleThis(123, $event)”>
What is expected?
no warning
What is actually happening?
[Vue warn]: Property or method “$event” is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
when I use $event in custom component, it shows vue warning in chrome console
[Vue warn]: Property or method "$event" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Doesn't it support to use "$event" in custom vue event?
when I use $event in custom component, it shows vue warning in chrome console <form-item @on-form-change=“onFormChange($event,item,data)”/>.
Read more >Custom event not captured by component in Vue.js
Instead, I am using my application state (built using Vuex store) as an event bus to update an errorObject and the ErrorMessage component...
Read more >Introduction to Vue.js Custom Events | by John Au-Yeung
Event names aren't automatically transformed by Vue. The names of an emitted event must match the name that's used to listen to the...
Read more >Receive events from Azure Event Grid to an HTTP endpoint
Describes how to validate an HTTP endpoint, then receive and deserialize Events from Azure Event Grid.
Read more >Window: popstate event - Web APIs | MDN
pushState() has been used to add a history entry to the history stack, that history entry is used instead. Syntax. Use the event...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For info, I get the same issue when using “v-bind:click” instead of “v-on:click”. https://jsfiddle.net/Lvqznx9f/
use @click or v-on:click syntax
пт, 10 янв. 2020 г. в 14:48, BonBonSlick notifications@github.com: