首页 > 代码库 > vue父组件给子传参

vue父组件给子传参

父:

  html

  .......

  <child :title="sontitle"></child>

  ......

  js

  data: sontitle

子:

  html

  {{title}}

  js

  props:[‘title‘]

就是这么明了

vue父组件给子传参