Commit 1c3dbe1c authored by 徐光星's avatar 徐光星

feat: 修复保存页面时重载缩略图的问题

parent 3016010f
......@@ -119,12 +119,7 @@ export default class DynamicForm extends Vue {
const imgName = btoa(`coverImage-${uuidv4().substr(0, 8)}`);
const gridEle = document.querySelector('.Dcm-container-panel');
this.changeStyle('forward');
const canvas = await html2canvas(gridEle as HTMLElement, { useCORS: true, allowTaint: true, ignoreElements: (element: any) => {
if (element.className.toLowerCase() == 'ignore-html2canvas-loop') {
return element;
}
return false;
} });
const canvas = await html2canvas(gridEle as HTMLElement, { useCORS: true, allowTaint: true });
this.changeStyle('backward');
const base64 = canvas.toDataURL();
const { data: { uptoken } } = await editorApi.getUpToken();
......
......@@ -9,6 +9,7 @@
<p slot="title">{{ config.title }}</p>
<div class="dynamic-row-card">
<img
data-html2canvas-ignore="true"
class="ignore-html2canvas-loop"
:src="config.coverImage || 'http://activitystatic.q-gp.com/low_code.jpg'"
/>
......@@ -27,6 +28,7 @@
<p slot="title">{{ config.title }}</p>
<div class="dynamic-row-card">
<img
data-html2canvas-ignore="true"
class="ignore-html2canvas-loop"
:src="config.coverImage || 'http://activitystatic.q-gp.com/low_code.jpg'"
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment