你好

uni-app null is not an object (evaluating 'this.$emit') __ERROR

uni-app 中组件里使用this.$emit

直接写在@click="this.$emit(‘“voucherChange”,{item,index})"中报错

uni-app null is not an object (evaluating 'this.$emit') __ERROR

 

解决方法

@click="voucherChange(item,index)"

在methods里写

voucherChange(item,index){
  this.$emit('voucherChange',{item,index})
}

posted @ 2021-08-19 09:10  ┕胡言亂語┑  阅读(336)  评论(0)    收藏  举报