SOURCE

console 命令行工具 X clear

                    
>
console
Vue.component('form-component', {
  template: '#from',
  props: ['user']
})

Vue.component('hello-component', {
  template: '#hello',
  props: ['user'],
  data: function() {
    return {
      msg: 'hello'
    }
  }
})

new Vue({
  el: '#app'
})
<template id="form">
  <div>
    <label for="name">
      type your name:
    </label>
    <input type="text" v-model:user="user" id="name" />
  </div>
</template>
<template id="hello">
  <h1>
    {{msg}} {{user}}
  </h1>
</template>

<div id="app"></div>