你好

this.$refs使用组件里的方法失效

例如this.$refs.cModal.getShoppingVoucherList

在app中说此方法undefined

解决方法 使用$nextTick

this.$nextTick(()=>{
       this.$refs.cModal.getShoppingVoucherList((data)=>{
 
  })
})

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