diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 7579764..23cc242 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -1510,11 +1510,17 @@ return } this.createTextFileLoading = true + let parentPath = "/" + if(this.path){ + if(this.path.length > 0){ + parentPath = this.path + } + } api.addFile({ fileName: newFileName, isFolder: false, username: this.$store.state.user.name, - parentPath: this.path + parentPath: parentPath }).then((res)=>{ this.createTextFileLoading = false diff --git a/src/components/preview/SimTextPreview.vue b/src/components/preview/SimTextPreview.vue index ea6ff46..b6d86c0 100644 --- a/src/components/preview/SimTextPreview.vue +++ b/src/components/preview/SimTextPreview.vue @@ -555,7 +555,6 @@ this.editorWidth += this.contentsWidth this.contentsHide = true } - console.log('readOnly',this.options.readOnly) }, loadEditorSize(){ this.dialogWidth = document.body.clientWidth * this.dialogWidthPercent