|
|
@@ -152,10 +152,6 @@ export default {
|
|
|
initCode (type) {
|
|
|
this.loading = true
|
|
|
let list = this.folderList
|
|
|
- // if (this.folderId.length === 0) {
|
|
|
- // this.$message.error('当前目录下没有可以授权的文件')
|
|
|
- // return
|
|
|
- // }
|
|
|
if (type === 2) {
|
|
|
list = this.fileList
|
|
|
}
|
|
|
@@ -182,7 +178,7 @@ export default {
|
|
|
})
|
|
|
this.$api.project.initCode({
|
|
|
files: type === 1 ? [] : fileTmps,
|
|
|
- folders: type === 2 ? folder : folder.concat(folderTmp),
|
|
|
+ folders: type === 2 ? folder : this.folderId.length === 0 ? folderTmp : folder.concat(folderTmp),
|
|
|
type: 1,
|
|
|
projectId: this.projectId
|
|
|
}).then(res => {
|