码迷,mamicode.com
首页 > 其他好文 > 详细

vue父组件给子传参

时间:2017-06-02 11:40:38      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:vue   ...   data   htm   html   ops   title   组件   tle   

父:

  html

  .......

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

  ......

  js

  data: sontitle

子:

  html

  {{title}}

  js

  props:[‘title‘]

就是这么明了

vue父组件给子传参

标签:vue   ...   data   htm   html   ops   title   组件   tle   

原文地址:http://www.cnblogs.com/hhweb/p/6931862.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!