gemercheung пре 6 месеци
родитељ
комит
d303a1c80a

+ 3 - 1
packages/web/src/locales/json/en.json

@@ -28,5 +28,7 @@
   "publish": "Publish At",
   "main_content": "Main Content",
   "read": "Read",
-   "more":"More"
+   "more":"More",
+   "developer": "Developer",
+   "recommend_reading": "Recommend Reading"
 }

+ 8 - 6
packages/web/src/locales/json/zh.json

@@ -3,7 +3,7 @@
   "en": "English",
   "test": "test中文",
   "helperTip": "有什么可以帮助你?",
-  "enter_key":"输入关键字",
+  "enter_key": "输入关键字",
   "web_title": "帮助中心",
   "sell_cor": "销售合作",
   "pub_r": "媒体采访",
@@ -26,8 +26,10 @@
   "company_profile": "公司介绍",
   "news_report": "新闻中心",
   "distributor": "成为经销商",
-  "publish":"发布于",
-  "main_content":"主要内容",
-  "read":"阅读",
-  "more":"更多"
-}
+  "publish": "发布于",
+  "main_content": "主要内容",
+  "read": "阅读",
+  "more": "更多",
+  "developer": "开发者",
+  "recommend_reading": "推荐阅读"
+}

+ 9 - 5
packages/web/src/pages/index.vue

@@ -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'),
   },
 ]