fix: show all community categories

This commit is contained in:
hajimi
2026-08-03 17:31:42 +08:00
parent e62aa6ac01
commit e6f3130929
2 changed files with 2 additions and 5 deletions
@@ -57,7 +57,7 @@
<text class="publish-section__hint">{{ selectedCategory ? '已选择 1 个分类' : '请选择帖子所属分类' }}</text>
</view>
<view v-if="categoryList.length" class="publish-category__list">
<view v-for="category in visibleCategories" :key="category.id" class="publish-category__item"
<view v-for="category in categoryList" :key="category.id" class="publish-category__item"
:class="{ 'publish-category__item--active': selectedCategory === category.id }"
@tap="selectCategory(category.id)">
<text class="publish-category__name">{{ category.name }}</text>
@@ -99,7 +99,6 @@ const tagList = ref<any[]>([])
const selectedTags = ref<number[]>([])
const categoryList = ref<any[]>([])
const selectedCategory = ref(0)
const visibleCategories = computed(() => categoryList.value.slice(0, 4))
const isPaid = ref(false)
const pricePoints = ref('')
@@ -462,8 +461,6 @@ const toggleTag = (id: number) => {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 16rpx;
max-height: 76rpx;
overflow: hidden;
}
&__item {