improve ui

This commit is contained in:
MaysWind
2023-06-03 20:11:15 +08:00
parent 0c3b56e44a
commit 73d271b8bc
7 changed files with 398 additions and 88 deletions
+19
View File
@@ -32,6 +32,7 @@
v-if="!loading"
@sortable:sort="onSort">
<f7-list-item swipeout
:class="{ 'actual-first-child': category.id === firstShowingId, 'actual-last-child': category.id === lastShowingId }"
:id="getCategoryDomId(category)"
:title="category.name"
:footer="category.comment"
@@ -154,6 +155,24 @@ export default {
return title + ' Categories';
},
firstShowingId() {
for (let i = 0; i < this.categories.length; i++) {
if (this.showHidden || !this.categories[i].hidden) {
return this.categories[i].id;
}
}
return null;
},
lastShowingId() {
for (let i = this.categories.length - 1; i >= 0; i--) {
if (this.showHidden || !this.categories[i].hidden) {
return this.categories[i].id;
}
}
return null;
},
noAvailableCategory() {
for (let i = 0; i < this.categories.length; i++) {
if (this.showHidden || !this.categories[i].hidden) {