mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
Hide tab in iso modal when there are no items
This commit is contained in:
parent
96c01f1658
commit
898ba05bfc
|
|
@ -150,9 +150,9 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<ul class="nav nav-tabs">
|
||||
<li role="presentation" :class="[curCategory === 'os' ? 'active' : '']" @click="switchCategory('os')"><a href="#">操作系统</a></li>
|
||||
<li role="presentation" :class="[curCategory === 'app' ? 'active' : '']" @click="switchCategory('app')"><a href="#">应用软件</a></li>
|
||||
<li role="presentation" :class="[curCategory === 'font' ? 'active' : '']" @click="switchCategory('font')"><a href="#">字体</a></li>
|
||||
<li role="presentation" :class="[curCategory === 'os' ? 'active' : '']" @click="switchCategory('os')" v-show="showCategory('os')"><a href="#">操作系统</a></li>
|
||||
<li role="presentation" :class="[curCategory === 'app' ? 'active' : '']" @click="switchCategory('app')" v-show="showCategory('app')"><a href="#">应用软件</a></li>
|
||||
<li role="presentation" :class="[curCategory === 'font' ? 'active' : '']" @click="switchCategory('font')" v-show="showCategory('font')"><a href="#">字体</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
|
|
|
|||
|
|
@ -186,15 +186,19 @@ var vmIso = new Vue({
|
|||
});
|
||||
},
|
||||
computed: {
|
||||
curDistroList () {
|
||||
curDistroList() {
|
||||
return this.distroList
|
||||
.filter((x)=> x.category === this.curCategory)
|
||||
.filter((x) => x.category === this.curCategory)
|
||||
.sort(function (a, b) {
|
||||
return a.distro.localeCompare(b.distro);
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
showCategory(category) {
|
||||
return this.distroList
|
||||
.findIndex((x) => x.category === category) > -1;
|
||||
},
|
||||
switchDistro (distro) {
|
||||
this.selected = distro;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue