diff --git a/vue/afvue/src/views/Sfilecompare.vue b/vue/afvue/src/views/Sfilecompare.vue index e434a80..791f82b 100644 --- a/vue/afvue/src/views/Sfilecompare.vue +++ b/vue/afvue/src/views/Sfilecompare.vue @@ -11,7 +11,7 @@ - +
@@ -165,10 +165,31 @@ export default { // 清空路径 this.fspath = '/' this.sspath = '/' - // - }, + // 上一级目录 + // 移除最后一个文件 + goParent(){ + // 第一个服务器 + if(this.fspath != '/'){ + let npath = this.fspath.split('/') + // 弹出最后一个元素 + npath.pop() + this.fspath = npath.join('/') + // 调用方法 + this.getFlist() + } + // 第二个服务器 + if(this.sspath != '/'){ + let npath = this.sspath.split('/') + npath.pop() + this.sspath = npath.join('/') + // 调用方法 + this.getSflist() + } + } + + } }