|
|
|
@ -11,7 +11,7 @@ |
|
|
|
<input type="text" placeholder="/" v-model="fspath"> |
|
|
|
<button @click="getFlist">Go</button> |
|
|
|
<button @click="">home</button> |
|
|
|
<button @click="">🔙</button> |
|
|
|
<button @click="goParent">🔙</button> |
|
|
|
</div> |
|
|
|
<div class="sflist"> |
|
|
|
<ul > |
|
|
|
@ -37,7 +37,7 @@ |
|
|
|
<input type="text" placeholder="192.168.66.92:9098" v-model="sspath"> |
|
|
|
<button @click="getSflist">GO</button> |
|
|
|
<button @click="">home</button> |
|
|
|
<button @click="">🔙</button> |
|
|
|
<button @click="goParent">🔙</button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="sflist"> |
|
|
|
@ -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() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|