Vuejs使用 Prop 动态传递数据
//父组件data () {return {props_vues:'宇哥最帅~~~!!!!!哟sdsdsd哟sdhasdjasdh',},//子组件EmailEmail password{{counter}}export default
·
//父组件
<my-component :props_vue="props_vues"></my-component>
data () { return { props_vues:'宇哥最帅~~~!!!!!哟sdsdsd哟sdhasdjasdh', },
//子组件 <template> <div> <label>Email</label> <input placeholder="email address"><br/> <label>Email password</label> <input placeholder="password" key="email-possword"> <p>{{counter}}</p> </div> </template> <script> export default { props: ['props_vue'], data () { return { counter: this.props_vue } }, }
更多推荐
已为社区贡献2条内容
所有评论(0)