Event Parameters in Vue

It is possible to pass parameters to emitted events. Let's look at an example. Let's assume that the parent component function accepts parameters:

App.vuemethods: {
  func(arg1, arg2) {
    console.log(arg1, arg2);
  }
}

These parameters must be specified as parameters of the function $emit, after the event name:

components/User.vuemethods: {
  handle() {
    this.$emit('show', 'xxx', 'yyy');
  }
}
Задание 1

Pass the following method from the parent component to the child:

App.vuemethods: {
  func(name) {
    console.log(name);
  }
}

Make a button in the component with the employee, when clicked, the employee's name will be transferred to the parent component.

Задание 2

Pass the following method from the parent component to the child:

App.vuemethods: {
  func(name, salary) {
    console.log(name, salary);
  }
}

Make a button in the employee component that, when clicked, will transfer the employee's name and salary to the parent component.