Open 30445 opened 3 years ago
Error in beforeDestroy hook: "TypeError: function () { return scope_1.stop(); } is not a function found in:
// mixins.js
...
removeAllEvents () {
for (let item in this._events) {
_ee.off(item, this._events[item]) // this._events[item] on "beforeDestroy" returns array of handler functions
}
},
so quick fix would be to check if this._events[item] is array and if so iterate over it
removeAllEvents: function removeAllEvents() {
for (var item in this._events) {
if(Array.isArray(this._events[item]))
{
for(var ev in this._events[item])
{
_ee.off(item, this._events[item][ev]);
}
}
else
{
_ee.off(item, this._events[item]);
}
}
},
ugly but with 4-yo over my head cant come up with nicer thing.
我试一试吧
我解决了这个问题。 只需要在这个组件上面加入v-if 判断有url 的时候才渲染。 而不是用v-if来关闭他,这会导致你上面的错误。
当在element-ui的dialog组件内使用时,销毁dialog组件会导致播放器报错vue.runtime.esm.js:619 [Vue warn]: Error in beforeDestroy hook: "TypeError: function () { src_instanceMap.delete(instance.VUE_DEVTOOLS_UID) } is not a function"
found in