Merge branch 'main' into zouyf_dev
This commit is contained in:
commit
c79911cc99
|
@ -119,7 +119,7 @@
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
import { onMounted, ref,watch, reactive, getCurrentInstance,nextTick } from 'vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import html2canvas from 'html2canvas';
|
// import html2canvas from 'html2canvas';
|
||||||
|
|
||||||
import { listEntpcoursework, listEntpcourseworkLocal } from '@/api/education/entpCourseWork'
|
import { listEntpcoursework, listEntpcourseworkLocal } from '@/api/education/entpCourseWork'
|
||||||
import { listEvaluationclue } from '@/api/classTask'
|
import { listEvaluationclue } from '@/api/classTask'
|
||||||
|
@ -458,13 +458,16 @@ const handleDelete = async(item, index) => {
|
||||||
*/
|
*/
|
||||||
const captureScreenshot = (id) => {
|
const captureScreenshot = (id) => {
|
||||||
const targetElement = document.getElementById('screenshot-target-' + id);
|
const targetElement = document.getElementById('screenshot-target-' + id);
|
||||||
html2canvas(targetElement).then(canvas => {
|
if (targetElement) {
|
||||||
// 将canvas转换为图像URL
|
emit('addQuizImgBs64', targetElement);
|
||||||
const screenshotUrl = canvas.toDataURL('image/png');
|
}
|
||||||
// 在这里可以将截图保存到本地或上传到服务器
|
// html2canvas(targetElement).then(canvas => {
|
||||||
// console.log(screenshotUrl);
|
// // 将canvas转换为图像URL
|
||||||
emit('addQuizImgBs64', screenshotUrl);
|
// const screenshotUrl = canvas.toDataURL('image/png');
|
||||||
});
|
// // 在这里可以将截图保存到本地或上传到服务器
|
||||||
|
// // console.log(screenshotUrl);
|
||||||
|
// emit('addQuizImgBs64', screenshotUrl);
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
// 防抖
|
// 防抖
|
||||||
|
|
Loading…
Reference in New Issue