去除圖檔的「刪除」按鈕

This commit is contained in:
vincentinttsh 2021-01-24 17:46:15 +08:00
parent a22a092ebd
commit c9094b465b

View File

@ -7,7 +7,7 @@ var mainWindow = {
'selectDepartment': '', 'selectDepartment': '',
'foundName': "", 'foundName': "",
"user": "", "user": "",
'token': "", 'token': "",
'is_print': false, 'is_print': false,
} }
}, },
@ -196,16 +196,23 @@ var mainWindow = {
}, },
'generatePic': function () { 'generatePic': function () {
var main = this var main = this
main.is_print = true; const doPrint = new Promise((resolve, reject) => {
html2canvas(document.getElementById('course-table-div')).then(function (canvas) { main.is_print = true;
var a = document.createElement('a'); resolve();
a.href = canvas.toDataURL("image/jpeg").replace("image/jpeg", "image/octet-stream");
a.download = '課表.jpg';
a.click();
}); });
setTimeout(function(){ doPrint
.then(() =>{
html2canvas(document.getElementById('course-table-div')).then(function (canvas) {
var a = document.createElement('a');
a.href = canvas.toDataURL("image/jpeg").replace("image/jpeg", "image/octet-stream");
a.download = '課表.jpg';
a.click();
});
console.log("adasd");
})
.then(() => {
main.is_print = false; main.is_print = false;
}, 5000); })
}, },
'share': function () { 'share': function () {
if (this.user != "") if (this.user != "")