Skip to content

Commit

Permalink
templates(base): switch to domtoimage
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhan005 committed Aug 31, 2024
1 parent a2c8f21 commit 32617f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion templates/base/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/dayjs/1.10.8/dayjs.min.js"></script>
<script src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/qrcodejs/1.0.0/qrcode.min.js"
type="application/javascript"></script>
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/html-to-image/1.9.0/html-to-image.min.js" type="application/javascript"></script>
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/dom-to-image/2.6.0/dom-to-image.min.js" type="application/javascript"></script>
<script defer src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/alpinejs/3.9.0/cdn.min.js"/></script>
{{ if .VConsole }}
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/vConsole/3.12.1/vconsole.min.js" type="application/javascript"></script>
Expand Down
4 changes: 2 additions & 2 deletions templates/question/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ <h3>{{ .PageUser.Name }}</h3>
</div>
<button class="uk-button uk-margin-small-top uk-button-primary uk-width-1-1 uk-margin-small-bottom" x-on:click.debounce="()=>{
loading = true;
htmlToImage.toPng(document.getElementById('qrcode_background'), {
useCORS: true
domtoimage.toPng(document.getElementById('qrcode_background'), {
useCors: true
}).then(function (dataURL) {
const link = document.createElement('a');
link.href = dataURL;
Expand Down

0 comments on commit 32617f9

Please sign in to comment.