R
R
Roweb2022-02-05 02:56:56
Vue.js
Roweb, 2022-02-05 02:56:56

How to get data from emit in Vue 3?

<component1 v-for="(item, i) in list" v-on:customevent="func1(i)"> </component1>


Vue.createApp({
 methods:{
 func1(){
}
}
})


How to get access to the data passed by the component to emit inside the func1 function, even though you also need to pass the i variable from the loop?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2022-02-05
@Roweb

https://vueframework.com/docs/v3/ru/ru/guide/event...
See about $event

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question