用vue3基础语法操作
引入vue <script src="https://unpkg.com/vue@next"></script>
页面渲染代码
<div id="app"></div>
根组件
<template id="root">
<div>
form-table与list-table都是子组件的名字,把子组件放在根组件中渲染显示
<form-table @send="acceptChildMessage"></form-table>
<list-table :message="message" ></list-table>
</div>
</template>
表单组件
<template id="form">
<div>
<form>
<table>
<tr>
<td>姓名</td>
<td><input type="text" v-model="user.name"></td>
</tr>