1.父传子
<!-- 父组件 App.vue -->
<template>
<div id="app">
<Child :msg="msg"></Child>
</div>
</template>
<script>
import Child from './components/child.vue'
export default {
name: 'app',
data(){
return{
msg:'我是父组件的值',
}
},
components: {
Child
},
methods:{
}
}
</script>
<style>
</style>
------------------------------------------