G
G
Gravio2019-06-08 15:34:26
JavaScript
Gravio, 2019-06-08 15:34:26

How to call function from component on button click in Vue js footer?

The structure is as follows:
There is a Layout, it has two components Footer and NavBar
In the same layout there is the main content () in this component there is a function.
The question is how, by clicking a button in the Footer, you can call a function in the main component.
Structure such
LayOut - Main component (router view (nuxt))
|
footer

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Kulakov, 2019-06-08
@Gravio

As an option, use eventbus - send a button click event in the footer, subscribe in the main component and call the desired function.

R
Rsa97, 2017-07-12
@Rsa97

The use of REGEX and LIKE '%xxx' in MySQL queries should be avoided, they are extremely slow expressions.

Need to split a string into an array and work with each element of the array separately?
If you have a comma-separated list of something in a MySQL field, and you need to search through this list, then you initially thought over the database schema incorrectly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question