Browse Source

完成返回上级目录的操作

master
xyiege 5 months ago
parent
commit
3f289fb5d8
  1. 29
      vue/afvue/src/views/Sfilecompare.vue

29
vue/afvue/src/views/Sfilecompare.vue

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

Loading…
Cancel
Save