Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在弹窗中使用 #83

Open
30445 opened this issue Sep 23, 2021 · 4 comments
Open

在弹窗中使用 #83

30445 opened this issue Sep 23, 2021 · 4 comments

Comments

@30445
Copy link

30445 commented Sep 23, 2021

当在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

@MichalKrakow
Copy link

Error in beforeDestroy hook: "TypeError: function () { return scope_1.stop(); } is not a function
found in:

how come nobody else report this...
Can this be environment related?

@MichalKrakow
Copy link

// 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.

@30445
Copy link
Author

30445 commented Nov 13, 2021

我试一试吧

@laoer536
Copy link

我解决了这个问题。 只需要在这个组件上面加入v-if 判断有url 的时候才渲染。 而不是用v-if来关闭他,这会导致你上面的错误。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants