แก้ไข itemlist download ไฟล์
- รายละเอียดการขอยกเลิกการลา - รายละเอียดการลา
This commit is contained in:
parent
8cfda78cb0
commit
7d90f443a0
3 changed files with 88 additions and 9 deletions
|
|
@ -41,7 +41,7 @@ async function genReport(data: any, fileName: string, type: string = "docx") {
|
|||
// สร้างลิงก์เพื่อดาวน์โหลดไฟล์
|
||||
const link = document.createElement("a");
|
||||
link.href = url;
|
||||
link.download = `${fileName}.docx`; // กำหนดชื่อไฟล์ที่จะดาวน์โหลด
|
||||
link.download = `${fileName}.${type === "docx" ? "docx" : "pdf"}`; // กำหนดชื่อไฟล์ที่จะดาวน์โหลด
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue