|
|
@@ -9,6 +9,7 @@ import layerMixins from '@/views/components/PictureEditor/mixin/layer/index'
|
|
|
import colorMixins from '@/views/components/PictureEditor/mixin/color/index'
|
|
|
import editMixins from '@/views/components/PictureEditor/mixin/edit/index'
|
|
|
import { uploadBaseImg } from '@/apis/other'
|
|
|
+import {markRaw} from "vue";
|
|
|
|
|
|
const FIXED_CANVAS_WIDTH = 800
|
|
|
export default {
|
|
|
@@ -204,14 +205,14 @@ export default {
|
|
|
const canvasEl = document.getElementById(canvasId)
|
|
|
if (!canvasEl) return
|
|
|
this.destroyCanvasInstance()
|
|
|
- this.fcanvas = new fabric.Canvas(canvasId, {
|
|
|
+ this.fcanvas = markRaw(new fabric.Canvas(canvasId, {
|
|
|
backgroundColor: this.this_canvas.bg_color,
|
|
|
containerClass:"fcanvas",
|
|
|
// 元素对象被选中时保持在当前z轴,不会跳到最顶层
|
|
|
preserveObjectStacking:true,
|
|
|
width: this.this_canvas.width,
|
|
|
height: this.this_canvas.height
|
|
|
- })
|
|
|
+ }))
|
|
|
this.fcanvasId = canvasId
|
|
|
const hydrateCanvas = () => {
|
|
|
this.updateCanvasState()
|