Handy_Cao 8 hónapja
szülő
commit
996bc18a9e

+ 2 - 0
public/locales/en-US.json

@@ -241,6 +241,8 @@
     "common": {
         "orderindex": "Serial Number",
         "pleaseenter": "Please Enter",
+        "pleaseenterkeywords": "Please Enter Keywords",
+        "pleasechoiceorenter": "Choice Or Enter",
         "pleasechoice": "Please Select",
         "operate": "Operation",
         "current": "Current",

+ 2 - 0
public/locales/th-TH.json

@@ -241,6 +241,8 @@
     "common": {
         "orderindex": "ลำดับที่",
         "pleaseenter": "กรุณาป้อน",
+        "pleaseenterkeywords": "请输入关键字",
+        "pleasechoiceorenter": "请选择或输入",
         "pleasechoice": "กรุณาเลือก",
         "operate": "ดำเนินการ",
         "current": "ปัจจุบัน",

+ 2 - 0
public/locales/vi-VN.json

@@ -241,6 +241,8 @@
     "common": {
         "orderindex": "序号",
         "pleaseenter": "请输入",
+        "pleaseenterkeywords": "请输入关键字",
+        "pleasechoiceorenter": "请选择或输入",
         "pleasechoice": "请选择",
         "operate": "操作",
         "current": "当前",

+ 2 - 0
public/locales/zh-CN.json

@@ -241,6 +241,8 @@
     "common": {
         "orderindex": "序号",
         "pleaseenter": "请输入",
+        "pleaseenterkeywords": "请输入关键字",
+        "pleasechoiceorenter": "请选择或输入",
         "pleasechoice": "请选择",
         "operate": "操作",
         "current": "当前",

+ 2 - 0
public/locales/zh-TW.json

@@ -241,6 +241,8 @@
     "common": {
         "orderindex": "序號",
         "pleaseenter": "請輸入",
+        "pleaseenterkeywords": "请输入关键字",
+        "pleasechoiceorenter": "请选择或输入",
         "pleasechoice": "請選擇",
         "operate": "操作",
         "current": "當前",

+ 2 - 1
src/packages/pc/components/base/remote-select/index.vue

@@ -13,6 +13,7 @@
 </template>
 
 <script lang="ts" setup>
+import { i18n } from '@/stores';
 import { computed, PropType } from 'vue'
 
 const props = defineProps({
@@ -30,7 +31,7 @@ const props = defineProps({
     },
     placeholder: {
         type: String,
-        default: '请选择或输入'
+        default: i18n.global.t('common.pleasechoiceorenter')
     }
 })
 

+ 5 - 2
src/packages/pc/components/base/table-filter-v2/index.vue

@@ -4,12 +4,12 @@
     <template v-for="(item, index) in option.filters" :key="index">
       <slot :name="item.field" :item="item">
         <el-form-item :label="item.label" :prop="item.field">
-          <el-select :placeholder="item.placeholder ?? '请选择'" v-model="item.value" :multiple="item.multiple"
+          <el-select :placeholder="item.placeholder ?? t('common.pleasechoice')" v-model="item.value" :multiple="item.multiple"
             collapse-tags clearable @change="item.onChange" v-if="item.options">
             <el-option v-for="option in item.options()" :key="option.value" :value="option.value"
               :label="option.label" />
           </el-select>
-          <el-input :placeholder="item.placeholder ?? '请输入'" v-model="item.value" v-else />
+          <el-input :placeholder="item.placeholder ?? t('common.pleaseenter')" v-model="item.value" v-else />
         </el-form-item>
       </slot>
     </template>
@@ -27,6 +27,9 @@
 import { shallowRef, PropType, computed } from 'vue'
 import { FormInstance, FormRules } from 'element-plus'
 import { FilterOption, ActionButton } from '@/hooks/datatable-v2/types'
+import { i18n } from '@/stores'
+
+const { global: { t } } = i18n
 
 const props = defineProps({
   option: {

+ 5 - 2
src/packages/pc/components/base/table-filter/index.vue

@@ -2,13 +2,13 @@
   <el-form class="el-form--filter">
     <slot name="before"></slot>
     <el-form-item v-for="item in options.selectList" :key="item.key" :label="item.label">
-      <el-select :placeholder="item.placeholder ?? '请选择'" v-model="item.selectedValue" :multiple="item.multiple"
+      <el-select :placeholder="item.placeholder ?? t('common.pleasechoice')" v-model="item.selectedValue" :multiple="item.multiple"
         collapse-tags @change="item.onChange">
         <el-option v-for="option in item.options()" :key="option.value" :value="option.value" :label="option.label" />
       </el-select>
     </el-form-item>
     <el-form-item v-for="(item, i) in options.inputList" :key="i" :label="item.label">
-      <el-input :type="item.type" :placeholder="item.placeholder ?? '请输入关键字'" v-model="item.value" />
+      <el-input :type="item.type" :placeholder="item.placeholder ?? t('common.pleaseenterkeywords')" v-model="item.value" />
     </el-form-item>
     <slot name="after"></slot>
     <el-form-item>
@@ -23,6 +23,9 @@
 <script lang="ts" setup>
 import { PropType } from 'vue'
 import { FilterOptions } from '@/hooks/datatable/types'
+import { i18n } from '@/stores'
+
+const { global: { t } } = i18n
 
 defineProps({
   options: {