Browse Source

创建文件副本去除空格

dev-version-manage
kim131 4 years ago
parent
commit
ced03c7c34
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      src/views/main_web/proj-item.vue
  2. +2
    -2
      src/views/main_web/workspace/workspace.new.vue

+ 1
- 1
src/views/main_web/proj-item.vue View File

@@ -217,7 +217,7 @@ export default {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
border-radius: 8px; border-radius: 8px;
color: #fff; color: #fff;
background-color: rgba(50, 50, 60, 0.15);
background-color: rgba(50, 50, 60, 0.25);
cursor: pointer; cursor: pointer;
} }
} }


+ 2
- 2
src/views/main_web/workspace/workspace.new.vue View File

@@ -1763,11 +1763,11 @@ export default {
let nowNum = 1, tempName = ""; let nowNum = 1, tempName = "";


//先添加 - 副本字样 再判断是否重复 如果重复就修改版本信息 //先添加 - 副本字样 再判断是否重复 如果重复就修改版本信息
tempName = targetFile.archName + ' - 副本';
tempName = targetFile.archName + '-副本';
let isExists = this.workFileList.find(file => file.archName === tempName); let isExists = this.workFileList.find(file => file.archName === tempName);
while(isExists) { while(isExists) {
// - 副本存在 -》修改为 -副本(x) 的字样 // - 副本存在 -》修改为 -副本(x) 的字样
tempName = targetFile.archName + ` - 副本(${ ++ nowNum})`;
tempName = targetFile.archName + `-副本(${ ++ nowNum})`;
isExists = this.workFileList.find(file => file.archName === tempName); isExists = this.workFileList.find(file => file.archName === tempName);
} }
let hour = '0' + new Date().getHours(); let hour = '0' + new Date().getHours();


Loading…
Cancel
Save