[TOC]
### 2.组件传值
#### 父向子传
```
1.传值 <list-item v-for="(item, index) of list" :key="index"
:content="item" :index="index"
@delete="handleDelete" ></list-item>
```
```
2.接值
props: {
index:Number,
content:String
},
```
#### 子向父
```
1.传值
绑定事件: @click="handleClick"
methods: {
handleClick(){
this.$emit('delete',this.index)
}
},
```
```
2.接值
绑定事件:@delete="handleDelete"
handleDelete(index) {
this.list.splice(index, 1);
}
```