SOURCE

console 命令行工具 X clear

                    
>
console
Vue.component('parent', {
  props: ['message'],
  template: '<input v-model="mydata" @input="test"/>',
  data () {
    return {
      mydata: ''
    }
  },
  methods:{
    test() {
      this.mydata = this.test
    }
  },
  components:{
    props:['childMsg']
    template: '<span>{{childMsg}}</span>'
  }
})
// 创建根实例
new Vue({
  el: '#example',
  data() {
    return {
      parentMsg:123,
    }
	}
})
<div id="example">
  <input v-model="parentMsg">
  <br>
  <parent :message="parentMsg"></parent>
</div>

本项目引用的自定义外部资源