From 19783d8a9f61b08325ae036b590d440d7e643622 Mon Sep 17 00:00:00 2001 From: Silent YANG Date: Sun, 4 Aug 2024 13:58:59 +0800 Subject: [PATCH] update --- src/locale/en-US.ts | 1 + src/locale/zh-CN.ts | 1 + src/views/idea/channel/index.vue | 13 +++++++++++++ src/views/idea/firmware/index.vue | 13 +++++++++++++ src/views/idea/losehu/index.vue | 17 ++++++++++++++++- 5 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/locale/en-US.ts b/src/locale/en-US.ts index b779adc..4e2eec8 100644 --- a/src/locale/en-US.ts +++ b/src/locale/en-US.ts @@ -144,6 +144,7 @@ export default { 'menu.firmware': 'Firmware Store', 'menu.channel': 'Channel Share', 'global.use': 'Use', + 'global.download': 'Download', 'tool.ssbpatch': 'LOSEHU S Firmware SI4732 SSB Patch', 'tool.writessbpatch': 'SSB Patch Write', 'global.login': 'Login', diff --git a/src/locale/zh-CN.ts b/src/locale/zh-CN.ts index c7ca225..2d53e6a 100644 --- a/src/locale/zh-CN.ts +++ b/src/locale/zh-CN.ts @@ -144,6 +144,7 @@ export default { 'menu.firmware': '固件市场', 'menu.channel': '信道分享', 'global.use': '使用', + 'global.download': '下载', 'tool.ssbpatch': 'LOSEHU S 版固件 SI4732 单边带补丁', 'tool.writessbpatch': '写入单边带补丁', 'global.login': '登录', diff --git a/src/views/idea/channel/index.vue b/src/views/idea/channel/index.vue index e298885..0591fda 100644 --- a/src/views/idea/channel/index.vue +++ b/src/views/idea/channel/index.vue @@ -29,6 +29,7 @@ @@ -210,6 +211,18 @@ }); } +const iDownload = (url: any, name: any) => { + fetch(url).then(e=>e.blob()).then(blob=>{ + const url = URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = name + '.xlsx'; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }) +} +