only show add default categories button when really have no category

This commit is contained in:
MaysWind
2023-08-02 00:14:09 +08:00
parent 88d5b1f98f
commit 2463f06ba1
+4 -1
View File
@@ -22,7 +22,7 @@
<f7-list strong inset dividers class="margin-top" v-if="!loading && noAvailableCategory">
<f7-list-item :title="$t('No available category')"></f7-list-item>
<f7-list-button v-if="hasSubCategories"
<f7-list-button v-if="hasSubCategories && noCategory"
:title="$t('Add Default Categories')"
:href="'/category/preset?type=' + categoryType"></f7-list-button>
</f7-list>
@@ -188,6 +188,9 @@ export default {
}
return true;
},
noCategory() {
return this.categories.length < 1;
}
},
created() {