这里用一个代码实例来解释一下
- 子组件向父组件传值
<!DOCTYPE html>
<html>
<head>
<!-- send child component to father's component -->
<title>learn vue</title>
<script src='vue.js'></script>
<script>
window.onload=function(){
var vm = new Vue({
data:{
},
methods:{
},
components:{
aaa:{
data(){
return {
msg:'hello'
}
},
methods:{
get(a){
alert(a);
}
},
template:'#wrapper',
components:{