更新数据截止日2025.12.25
add html2canvas.min.js
This commit is contained in:
@@ -23,28 +23,6 @@ class HTMLToImage {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态加载html2canvas库
|
||||
*/
|
||||
loadHtml2Canvas() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (typeof html2canvas !== 'undefined') {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
const script = document.createElement('script');
|
||||
script.src = 'https://cdn.jsdelivr.net/npm/html2canvas@1.4.1/dist/html2canvas.min.js';
|
||||
script.onload = () => {
|
||||
console.log('html2canvas加载成功');
|
||||
resolve();
|
||||
};
|
||||
script.onerror = () => {
|
||||
reject(new Error('html2canvas加载失败'));
|
||||
};
|
||||
document.head.appendChild(script);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 将HTML元素转换为图片
|
||||
|
||||
20
static/js/html2canvas.min.js
vendored
Normal file
20
static/js/html2canvas.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user