2022年6月15日

props双向绑定?v-bind.sync=''

摘要: <template> <div> <children v-bind:title.sync="title"/> </div> </template> <script> export default { data(){ return{ title:"学习vue" } } } </script> 子组件: 阅读全文

posted @ 2022-06-15 14:55 久居我梦 阅读(67) 评论(0) 推荐(0) 编辑

Vue的v-bind="$attrs"如何使用

摘要: /这是是爷爷组件 <template> /传两个prop,parent和child <parent parent='40' child="18"/> </template> <script> export default{ name:"grandpa" } </script> //这是是爸爸组件 < 阅读全文

posted @ 2022-06-15 14:36 久居我梦 阅读(261) 评论(0) 推荐(0) 编辑

导航