From f25e5d7bc710712330b90393ff94dfd5a4db7f70 Mon Sep 17 00:00:00 2001 From: fanxb Date: Thu, 15 Jun 2023 20:13:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=BF=87=E5=A4=9A=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openRenamerBackend/config.ts | 35 ++++++++++++------------ openRenamerFront/src/App.vue | 2 +- openRenamerFront/src/views/home/Home.vue | 13 +++++++-- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/openRenamerBackend/config.ts b/openRenamerBackend/config.ts index cf54372..f7fd06b 100644 --- a/openRenamerBackend/config.ts +++ b/openRenamerBackend/config.ts @@ -4,23 +4,24 @@ import * as path from 'path'; const rootPath = path.resolve(__dirname, '..'); let config = { - rootPath, - port: process.env.PORT ? parseInt(process.env.PORT) : 8089, - token: process.env.TOKEN ? process.env.TOKEN : null, - urlPrefix: '/openRenamer/api', - //是否为windows平台 - isWindows: process.platform.toLocaleLowerCase().includes("win"), - bodyLimit: { - formLimit: '2mb', - urlencoded: true, - multipart: true, - formidable: { - uploadDir: path.join(rootPath, 'files', 'temp', 'uploads'), - keepExtenstions: true, - maxFieldsSize: 1024 * 1024 - } - }, - publicPath: new Set(["POST/public/checkToken"]) + rootPath, + port: process.env.PORT ? parseInt(process.env.PORT) : 8089, + token: process.env.TOKEN ? process.env.TOKEN : null, + urlPrefix: '/openRenamer/api', + //是否为windows平台 + isWindows: process.platform.toLocaleLowerCase().includes("win"), + bodyLimit: { + formLimit: '200mb', + jsonLimit: '200mb', + urlencoded: true, + multipart: true, + formidable: { + uploadDir: path.join(rootPath, 'files', 'temp', 'uploads'), + keepExtenstions: true, + maxFieldsSize: 1024 * 1024 * 200 + } + }, + publicPath: new Set(["POST/public/checkToken"]) }; export default config; diff --git a/openRenamerFront/src/App.vue b/openRenamerFront/src/App.vue index 49fa838..951ea8d 100644 --- a/openRenamerFront/src/App.vue +++ b/openRenamerFront/src/App.vue @@ -42,7 +42,7 @@ export default { name: "Home", data() { return { - version: "1.6.1", + version: "1.6.2", latestVersion: null, activeIndex: location.pathname, showNewVersion: false diff --git a/openRenamerFront/src/views/home/Home.vue b/openRenamerFront/src/views/home/Home.vue index f894617..40ee7fb 100644 --- a/openRenamerFront/src/views/home/Home.vue +++ b/openRenamerFront/src/views/home/Home.vue @@ -60,7 +60,7 @@
-
+
{{ item.name }} @@ -70,7 +70,7 @@
-
+
{{ item.name }} @@ -131,6 +131,12 @@ export default { computed: { allChecked() { return this.fileList.length > 0 && this.fileList.filter(item => item.checked).length === this.fileList.length; + }, + showFileList() { + return this.fileList.length > 500 ? this.fileList.slice(0, 500) : this.fileList; + }, + showChangedFileList() { + return this.changedFileList && this.changedFileList.length > 500 ? this.changedFileList.slice(0, 500) : this.changedFileList; } }, async created() { @@ -155,6 +161,9 @@ export default { }, //预览结果 async showResult() { + if (this.fileList.length > 500) { + this.$message.info("文件数过多,仅展示前500个(不影响重命名)"); + } this.changedFileList = []; if (!this.checkRuleAndFile()) { return;