更新数据截止日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元素转换为图片
|
* 将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
@@ -84,7 +84,7 @@
|
|||||||
|
|
||||||
<div id="error" class="error" style="display: none;"></div>
|
<div id="error" class="error" style="display: none;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<script src="/static/js/html2canvas.min.js"></script>
|
||||||
<script src="/static/js/markdown-parser.js"></script>
|
<script src="/static/js/markdown-parser.js"></script>
|
||||||
<script src="/static/js/markdown-plugin-table.js"></script>
|
<script src="/static/js/markdown-plugin-table.js"></script>
|
||||||
<script src="/static/js/h2p.js"></script>
|
<script src="/static/js/h2p.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user