闫增涛
2024-06-27 60c5fba4299ee7a29f282f59b1511ef402a53cad
src/components/graffiti/index.vue
@@ -68,7 +68,7 @@
      this.canvas.addEventListener("mouseleave", this.closePaint);
    }
    this.toolClear();
    const oldData = localStorage.getItem('graffiti-data')
    const oldData = localStorage.getItem(this.config.activeBook.name + '-graffiti-' + this.page)
    if(oldData) {
      this.backgroundImage = oldData
    }
@@ -174,7 +174,7 @@
    // 原保存方法
    toolSave() {
      var imgData = this.canvas.toDataURL({format: 'png', quality:1, width:800,});
      localStorage.setItem('graffiti-data',imgData)
      localStorage.setItem(this.config.activeBook.name + '-graffiti-' + this.page,imgData)
    },
    // 保存方法,保存为一张图片并下载
    saveImgData() {