摘要: 1 ``` 2 方法一: 3 子组件: 4 methods: { 5 menubtn(index) { 6 this.num=index 7 // 子传父 调试父组件方法 parent 8 //把index传过去了 9 this.$parent.fatherMethod(index) 10 11 } 阅读全文
posted @ 2020-09-11 14:44 金翅扑街鸟 阅读(599) 评论(0) 推荐(0)
摘要: 1 ``` 2 根据子元素传过来的index,赋值给data里面的hideing 3 4 methods: { 5 // 被子组件tabs调用的方法 6 fatherMethod(index) { 7 this.hideing = index; 8 }, 9 10 11 <Ordering :cla 阅读全文
posted @ 2020-09-11 14:43 金翅扑街鸟 阅读(422) 评论(0) 推荐(0)