有個組件中發(fā)射了這么一個事件this.$emit('fail-to-load', this.src);在vue中template如下寫法可以監(jiān)聽到事件<component @fail-to-load="failToLoad"></component>jsx中如下兩種寫法都監(jiān)聽不到事件onFailToLoad={() => this.failToLoad}
nativeOnFailToLoad={() => this.failToLoad}請問,該如何解決?
添加回答
舉報
0/150
提交
取消