zouyf_dev #98

Merged
zouyf merged 3 commits from zouyf_dev into main 2024-12-09 17:16:44 +08:00
2 changed files with 17 additions and 1 deletions
Showing only changes of commit d07dd4455c - Show all commits

View File

@ -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;
}
}
</style>
<style>
::v-deep {
@import "@/assets/styles/JYStyle.css";
}
</style>

View File

@ -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 => {
// canvasURL
const screenshotUrl = canvas.toDataURL('image/png');