From 56e7170f74d716539bdffdb820b5282e13fb1f8a Mon Sep 17 00:00:00 2001 From: jmal Date: Sun, 20 Sep 2020 23:41:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E5=88=9B=E5=BB=BA=E6=96=87=E6=9C=AC=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8E=E6=98=BE=E7=A4=BA=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShowFile/ShowFile.vue | 8 +++++++- src/components/preview/SimTextPreview.vue | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) 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