<script type="text/javascript">
import Msg from './msg.js'
export default{
data(){
return {
kk:0
}
},
mounted:function(){
var _this=this
Msg.$on('val',function(m){
_this.kk=m;
})
</script>
上面是默认KK=0的,下面是接收val传值