Bläddra i källkod

feat: 搜索页多语言配置

liangan 1 vecka sedan
förälder
incheckning
42ef811d06
3 ändrade filer med 12 tillägg och 4 borttagningar
  1. 5 1
      src/locale/bn.json
  2. 5 1
      src/locale/zh-Hans.json
  3. 2 2
      src/pages/search/search.vue

+ 5 - 1
src/locale/bn.json

@@ -9,5 +9,9 @@
   "home.priceTab.300spot": "৩০০স্পট",
   "home.priceTab.500spot": "৫০০স্পট",
   "home.priceTab.1000spot": "১০০০স্পট",
-  "home.priceTab.2000spot": "২০০০স্পট"
+  "home.priceTab.2000spot": "২০০০স্পট",
+  "search.placeholder": "অনুসন্ধান",
+  "search.filterPrice": "সব দাম",
+  "search.filterCategory": "সব বিভাগ",
+  "search.filterSellers": "সেরা বিক্রেতা"
 }

+ 5 - 1
src/locale/zh-Hans.json

@@ -9,5 +9,9 @@
   "home.priceTab.300spot": "300积分",
   "home.priceTab.500spot": "500积分",
   "home.priceTab.1000spot": "1000积分",
-  "home.priceTab.2000spot": "2000积分"
+  "home.priceTab.2000spot": "2000积分",
+  "search.placeholder": "搜索",
+  "search.filterPrice": "全部价格",
+  "search.filterCategory": "全部分类",
+  "search.filterSellers": "热销排序"
 }

+ 2 - 2
src/pages/search/search.vue

@@ -67,7 +67,7 @@ const option1 = ref<Record<string, any>[]>([
 ])
 
 const option2 = ref<Record<string, any>[]>([
-  { label: 'All Category', value: 0 },
+  { label: t('search.filterCategory'), value: 0 },
 ])
 async function getCategoryList() {
   const res = await categoryList({ page: 1, size: 20 })
@@ -129,7 +129,7 @@ onLoad(() => {
             <wd-drop-menu-item v-model="formData.cateId" :options="option2" @change="queryList(1, 20)" />
           </wd-drop-menu>
           <view class="flex-1">
-            <wd-sort-button v-model="formData.sortWay" title="Best Sellers" @change="queryList(1, 20)" />
+            <wd-sort-button v-model="formData.sortWay" :title="t('search.filterSellers')" @change="queryList(1, 20)" />
           </view>
         </view>
       </view>