在 vue3 中使用 fabric.js 时出现延迟

问题描述 投票:0回答:0

我们想用fabric.js创建一个电子白板项目,

项目快完成了,但还是有点问题,

在我们的pdf讲义上写了大约200次后它会滞后,

有没有人有相关经验?

this is how our electronic white board looks

 // we doubted that the problem comes from here

this.canvas.add(pathObj)

  const state = this.canvas.toJSON(['eventInfo'])
  const action = {
    type: 'draw',
    data: null
  }
  this.state = this.getState(state, action)
  this.saveHistory(this.state) 
vuejs3 fabricjs
© www.soinside.com 2019 - 2024. All rights reserved.