|
@@ -92,13 +92,16 @@
|
|
|
<n-gi v-for="other of otherstyleEnum" :key="other.value">
|
|
|
|
|
|
<div :class="{ [`style-${item.styleType}`]: true }" class="show-item">
|
|
|
- <n-h5 class="font-size-[16px] font-800"> {{ other.label }}</n-h5>
|
|
|
+ <n-h5 class="font-size-[16px] font-800">
|
|
|
+ {{ other.value === 0 ? $t('developer') : $t('recommend_reading') }}
|
|
|
+ </n-h5>
|
|
|
<ul class="otherList">
|
|
|
<li class="font-size-[14px]" @click="handleToDoc(child as any as ArticleDetailType)"
|
|
|
- v-for="child of item.children.filter(c => c.otherType === other.value).slice(0,3)" :key="child.id">
|
|
|
+ v-for="child of item.children.filter(c => c.otherType === other.value).slice(0, 3)" :key="child.id">
|
|
|
<span>{{ child.title }}</span>
|
|
|
</li>
|
|
|
- <li v-if="item.children.filter(c => c.otherType === other.value).length > 3" class="font-size-[14px] more" @click="handleToMore">
|
|
|
+ <li v-if="item.children.filter(c => c.otherType === other.value).length > 3"
|
|
|
+ class="font-size-[14px] more" @click="handleToMore">
|
|
|
<span class="font-medium">{{ $t('more') }}>></span>
|
|
|
</li>
|
|
|
|
|
@@ -144,16 +147,17 @@ import type { MenuItem } from '@/api'
|
|
|
import { Swiper, SwiperSlide } from 'swiper/vue'
|
|
|
import 'swiper/css'
|
|
|
import router from '@/plugins/router.ts'
|
|
|
+const { t } = useI18n()
|
|
|
// import { useSwiper } from 'swiper/vue';
|
|
|
|
|
|
const otherstyleEnum = [
|
|
|
{
|
|
|
value: 0,
|
|
|
- label: '开发者',
|
|
|
+ label: t('developer'),
|
|
|
},
|
|
|
{
|
|
|
value: 1,
|
|
|
- label: '推荐阅读',
|
|
|
+ label: t('recommend_reading'),
|
|
|
},
|
|
|
]
|
|
|
|