Vue的数据双向绑定例子
可以参考该网址https://www.cnblogs.com/xxcanghai/p/6124699.html
我写的这个是使用vue-cli编写的一个例子。
以下是父组件源码,绑定了一个对象然后使用props在子组件获取(此为单项绑定)。
<template>
<div>
<table id="person-message">
<tr>
<th>姓名</th>
<th>年龄</th>
<th>性别</th>
<th>操作</th>
</tr>
<tr v-for="(person,index) in persons"
:key="person.id"
is="sideler"
:person="{
name:person.name,
age:person.age,
sex:person.sex,
isEdit:person.show,
}"
@edit="conten