1.组件
组件就是一大口代码的集合
<template>
<!-- <one :title="title" :arr="arr"></one> -->
<p>{{teacher}}</p>
<two @app_edit="app_edit"></two>
</template>
<script>
import One from './components/One.vue'
import Two from './components/Two.vue'
export default{
data(){
return {
title:'asdjk',
arr:['as','df','gh'],
teacher:'yk'
}
},
methods:{
app_edit(e)
{
console.log('我的父');
this.teacher = e;
},
fun1()
{
console.log('123');
},
fun3()
{
}
},
components:{
one:One,
two:Two
}
}
</script>
<style>
</style>