子组件的type和onlyContent,父组件接收不到,导致只看评价内容点击不生效

来源:18-14 评价列表(3)

wudd

2018-11-13

图片描述

写回答

1回答

ustbhuangyi

2018-11-13

有和我的源码做比较么 https://github.com/ustbhuangyi/vue-sell

0
1
wudd
比较了,还是传不过来 events: { 'ratingtype.select'(type) { this.selectType = type; console.log(type); this.$nextTick(() => { this.scroll.refresh(); }); }, 'content.toggle'(onlyContent) { this.onlyContent = onlyContent; this.$nextTick(() => { this.scroll.refresh(); }); } }, methods: { select(type, event) { if (!event._constructed) { return; } this.selectType = type; this.$dispatch('ratingtype.select', type); }, toggleContenct(event) { if (!event._constructed) { return; } this.onlyContent = !this.onlyContent; this.$dispatch('content.toggle', this.onlyContent); } }
2018-11-14
共1条回复

Vue.js2.5+cube-ui重构饿了么App(经典再升级)

掌握Vue1.0到2.0再到2.5最全版本应用与迭代,打造极致流畅的WebApp

9868 学习 · 4162 问题

查看课程