Parent and child components pass values?

parent father.vue:
< template >

<div>
    <A></A>
    <B></B>
</div>

< / template >
where component An is the table component, and the data in the table is passed in by the father component.
B is a component that adds Form form data. If you want to add data to the table of component A through component B, how do you write vue code?

Aug.17,2021

<template>
  <div>
    <A :table-data="tableData"></A>
    <B @on-add="onAddTableData"></B>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        tableData: [],
      };
    },
    methods: {
      onAddTableData(data) {
        this.tableData.push(data);
      },
    },
  };
</script>

is something like this: component B adds the form and notifies the parent component to add data through $emit ('on-add', newData) , and component A updates

accordingly.

to achieve bidirectional data binding between parent and child components, you can use sync

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eac168-20af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eac168-20af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?