antvis/G2

浏览器丢失响应,报错 Uncaught Error: It is illegal to free an event not managed by this EventBoundary! #5670

Lionad-Morotar posted onGitHub

我在 G2 外部用 Vue 再封装了一层组件,但是调试时发现有报错,页面会直接丢失响应。暂不清楚出现原因。


如果使用 pointer-events: none 屏蔽掉 canvas 的鼠标交互,就能正常运行。


提供一个有 vue 封装的 codesandbox 链接?

posted by pearmini over 1 year ago

晚上我试试尝试一下能不能用在线链接复现一下

posted by Lionad-Morotar over 1 year ago

提供一个有 vue 封装的 codesandbox 链接?

参考这个 issue 得到了临时解决方法,https://github.com/antvis/G2/issues/5379

我原先的代码:

const chart = ref<InstanceType<typeof Chart>>()

修改后的代码:

let chart: InstanceType<typeof Chart> | null = null

简而言之,去掉 ref 就啥事儿都没有

posted by Lionad-Morotar over 1 year ago

现在我仍然能复现这个问题。但是不理解是为什么...

posted by Lionad-Morotar over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests