From 9f9a611f89150949572ef14f70c9c51c0b0d9568 Mon Sep 17 00:00:00 2001
From: zhuhao <979263092@qq.com>
Date: Fri, 26 Jul 2024 09:11:55 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E6=9C=9F=EF=BC=9ABUG=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/main/file.js | 2 +-
src/renderer/src/utils/resourceDict.js | 6 ++++-
src/renderer/src/views/prepare/index.vue | 33 ++++++++++++------------
3 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/src/main/file.js b/src/main/file.js
index 5637a23..d10cb59 100644
--- a/src/main/file.js
+++ b/src/main/file.js
@@ -238,7 +238,7 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
//下载文件
ipcMain.on('download-file-default', (e, { url, fileName }) => {
createFolder('selfFile').then(async () => {
- const browserWindow = BrowserWindow.fromId(e.sender.id)
+ const browserWindow = BrowserWindow.getFocusedWindow()
const id = await manager.download({
window: browserWindow,
url: url,
diff --git a/src/renderer/src/utils/resourceDict.js b/src/renderer/src/utils/resourceDict.js
index eb9275c..a1a1a61 100644
--- a/src/renderer/src/utils/resourceDict.js
+++ b/src/renderer/src/utils/resourceDict.js
@@ -20,6 +20,10 @@ export const resourceFormat = [
label: 'ppt',
value: 'ppt'
},
+ {
+ label: 'pptx',
+ value: 'pptx'
+ },
{
label: 'mp3',
value: 'mp3'
@@ -62,4 +66,4 @@ export const resourceType = [
label: '教案',
value: '教案'
}
-]
\ No newline at end of file
+]
diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue
index 9287e78..a485a49 100644
--- a/src/renderer/src/views/prepare/index.vue
+++ b/src/renderer/src/views/prepare/index.vue
@@ -14,6 +14,7 @@