scorpio 2 năm trước cách đây
mục cha
commit
87c01c4f96
1 tập tin đã thay đổi với 1 bổ sung5 xóa
  1. 1 5
      src/views/home/component/authorize.vue

+ 1 - 5
src/views/home/component/authorize.vue

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