更新数据截止日2025.12.25

add html2canvas.min.js
This commit is contained in:
lychang
2025-12-26 23:51:29 +08:00
parent 97b0f8bf35
commit 5e7fb792fc
3 changed files with 21 additions and 23 deletions

View File

@@ -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

File diff suppressed because one or more lines are too long

View File

@@ -84,7 +84,7 @@
<div id="error" class="error" style="display: none;"></div>
</div>
<script src="/static/js/html2canvas.min.js"></script>
<script src="/static/js/markdown-parser.js"></script>
<script src="/static/js/markdown-plugin-table.js"></script>
<script src="/static/js/h2p.js"></script>