1 #10

Merged
fanxb merged 6 commits from main into dev 2022-05-26 23:19:41 +08:00
3 changed files with 30 additions and 20 deletions
Showing only changes of commit 3f8b659462 - Show all commits

View File

@ -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;

View File

@ -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

View File

@ -60,7 +60,7 @@
<div class="fileBlock">
<!-- 左侧原始文件名 -->
<div style="width:50%;">
<div v-for="(item, index) in fileList" :key="index" class="oneLine">
<div v-for="(item, index) in showFileList" :key="index" class="oneLine">
<el-checkbox class="oneLineText" style="width: 95%" v-model="item.checked">
<el-tooltip show-after="300" style="color:white" effect="dark" :content="item.name" placement="top">
<span class="oneLineText" style="width: 100%;display: inline-block">{{ item.name }}</span>
@ -70,7 +70,7 @@
</div>
<!-- 右边的预览文件名 -->
<div style="width:50%">
<div v-for="(item, index) in changedFileList" :key="index" class="oneLine">
<div v-for="(item, index) in showChangedFileList" :key="index" class="oneLine">
<div style="display:inline-block;width:72%;" class="oneLineText">
<el-tooltip show-after="300" style="color:white" effect="dark" :content="item.name" placement="top">
<span class="oneLineText" style="width: 100%;display: inline-block">{{ item.name }}</span>
@ -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;