Browse Source

点击文件夹进入

master
xyiege 5 months ago
parent
commit
8ba8e8aac9
  1. 10
      vue/afvue/src/assets/main.css
  2. 16
      vue/afvue/src/views/Flist.vue

10
vue/afvue/src/assets/main.css

@ -59,16 +59,16 @@ a,
background-position: 0px -399px;
}
.tb-html {
background-position: 0px -448px;
background-position: 0px -452px;
}
.tb-gz{
background-position: 0px -298px;
background-position: 0px -302px;
}
.tb-zip{
background-position: 0px -298px;
background-position: 0px -302px;
}
.tb-js{
background-position: 0px -523px;
background-position: 0px -526px;
}
.tb-json{
background-position: 0px -623px;
@ -86,5 +86,5 @@ a,
background-position: 0px -375px;
}
.tb-php{
background-position: 0px -848px;
background-position: 0px -852px;
}

16
vue/afvue/src/views/Flist.vue

@ -17,10 +17,8 @@
</div>
<div class="fcon" v-for="item in flist" :key="item">
<span class="fcline">
<i class="tb tb-folder" v-if="item.isdir"></i>
<i :class="'tb tb-'+item.suffix" v-else></i>
{{ item.path }}
<a href="javascript:void(0)" @click="openfile(item.path)" v-if="item.isdir"><i class="tb tb-folder"></i>{{ item.path }}</a>
<a v-else> <i :class="'tb tb-'+item.suffix"></i>{{ item.path }}</a>
</span>
<span class="fcline">{{ item.size }}KB</span>
<span class="fcline">{{ item.hash }}</span>
@ -81,6 +79,16 @@ export default {
this.$refs.sokey.value = key
// this.spath = this.$refs.sokey.value
this.getFlist()
},
//
openfile(path){
// this.spath = path
if(this.spath == '/'){
this.spath = ''
}
let npath = this.spath+"/"+path
this.spath = npath
this.getFlist()
}
}
}

Loading…
Cancel
Save