diff --git a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue index 6896137..3b1b3cb 100644 --- a/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue +++ b/src/renderer/src/AixPPTist/src/views/Editor/CanvasTool/index.vue @@ -185,6 +185,7 @@ const applyCanvasPresetScale = (value: number) => { } const { + createTextElement, createImageElement, createChartElement, createTableElement, @@ -200,7 +201,14 @@ const insertImageElement = (files: FileList) => { } const onhtml2canvas = (imgbs64: string) => { - createImageElement(imgbs64) + //createImageElement(imgbs64) + console.log('imgbs64->',imgbs64) + createTextElement({ + left: 200, + top: 200, + width: 500, + height: 500, + }, { content: imgbs64 }) } const shapePoolVisible = ref(false) @@ -415,4 +423,9 @@ const imgVisible = ref(false) display: none; } } + + \ No newline at end of file diff --git a/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue b/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue index 87f529b..8b30f81 100644 --- a/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue +++ b/src/renderer/src/views/classTask/newClassTaskAssign/searchQuestion/index.vue @@ -439,6 +439,9 @@ const getPaginationList = ( page, limit ) => { */ const captureScreenshot = (id) => { const targetElement = document.getElementById('screenshot-target-' + id); + emit('addQuizImgBs64', targetElement.outerHTML); + return; + html2canvas(targetElement).then(canvas => { // 将canvas转换为图像URL const screenshotUrl = canvas.toDataURL('image/png');