fix: show all community categories
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
完成内容:
|
||||
|
||||
- 发帖页新增必选分类卡片,读取后台启用的社区分类并将分类 ID 一同提交;分类固定一行四列,仅显示名称,超出部分隐藏。
|
||||
- 发帖页新增必选分类卡片,读取后台启用的社区分类并将分类 ID 一同提交;分类每行固定四列,仅显示名称,过长文字以省略号隐藏。
|
||||
- 标签区域明确支持多选,展示已选数量,并限制最多选择 3 个标签。
|
||||
- 发布接口校验分类与标签的启用状态,写入帖子分类并同步更新分类、标签的帖子计数。
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user