V
V
vitaly_742021-10-26 08:25:45
Vue.js
vitaly_74, 2021-10-26 08:25:45

Is it possible to add a default action to vue?

For example, in all Vue instances, in the updated method, I need to add some code, such as raising an event. (for example, to listen to this event in a third-party plugin) how can this be done without copying the code? maybe you can do it somehow in main.js?
(I'm a beginner and the front is not my main activity but I need to master it a bit)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2021-10-26
@firedragon

https://ru.vuejs.org/v2/guide/mixins.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question