Handy_Cao 1 年之前
父節點
當前提交
703d7a3c3c

+ 6 - 6
public/locales/zh-CN.json

@@ -770,11 +770,11 @@
                 "searchtype3": "自营会员",
                 "accountid": "账户",
                 "accountname": "账户名称",
-                "memberusername": "所属会员",
+                "memberusername": "MemberUserName",
                 "parentusername": "所属机构",
-                "freezemargin": "当前冻结资金",
-                "usedmargin": "当前占用保证金",
-                "netbalance": "当前净值",
+                "freezemargin": "FreezeMargin",
+                "usedmargin": "UsedMargin",
+                "netbalance": "NetBlance",
                 "balance": "当前风险净值",
                 "availmargin": "可用资金",
                 "totalfrozen": "总冻结",
@@ -785,8 +785,8 @@
                 "totalfloatpl1": "浮动损益",
                 "currisksaferate": "当前安全度(%)",
                 "currisksafelv": "当前安全等级",
-                "start": "开始监控",
-                "stop": "停止监控",
+                "start": "Start",
+                "stop": "Stop",
                 "tips1": "(默认风险率>50%;每10秒刷新一次,下次刷新:",
                 "tips2": "代码或名称模糊匹配"
             },

+ 4 - 1
src/packages/pc/components/base/table-details/index.vue

@@ -11,7 +11,7 @@
                     <template v-for="(item, n) in items" :key="n">
                         <th :style="labelStyle">
                             <slot :name="item.prop + 'Label'">
-                                {{ $t(item.formatLabel ? item.formatLabel(data[item.prop]) : item.label ?? '') }}
+                                {{ t(item.formatLabel ? item.formatLabel(data[item.prop]) : item.label ?? '') }}
                             </slot>
                         </th>
                         <td :colspan="(items.length - 1) === n ? (column * 2 - items.length * 2) + 1 : 1"
@@ -32,6 +32,9 @@
 import { PropType, computed } from 'vue'
 import { handleNoneValue } from '@/filters'
 import { CellProp } from './types'
+import { i18n } from '@/stores'
+
+const { global: { t } } = i18n
 
 const props = defineProps({
     title: String,

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

@@ -27,11 +27,11 @@
         <el-table-column type="selection" :selectable="selectable" width="55" align="center" fixed
           v-if="selectionType" />
         <!-- 序号 -->
-        <el-table-column type="index" :label="$t('common.orderindex')" align="center" :width="80" v-if="showIndex" />
+        <el-table-column type="index" :label="t('common.orderindex')" align="center" :width="80" v-if="showIndex" />
         <!-- 数据列 -->
         <template v-for="(item, index) in columns" :key="index">
           <el-table-column :align="item.align ?? 'center'" :min-width="120" :width="item.width"
-            :label="$t(item.formatLabel ? item.formatLabel() : item.label)" :prop="item.field" :fixed="item.fixed || false"
+            :label="t(item.formatLabel ? item.formatLabel() : item.label)" :prop="item.field" :fixed="item.fixed || false"
             :sortable="item.sortable" :show-overflow-tooltip="item.field !== 'operate'" v-if="item.show ?? true">
             <template #default="{ row, $index }">
               <slot :name="item.field" :row="row" :value="row[item.field]" :index="$index">
@@ -57,6 +57,7 @@
 import { defineComponent, shallowRef, PropType } from 'vue'
 import { handleNoneValue } from '@/filters'
 import AppTableSetting from '../table-setting/index.vue'
+import { i18n } from '@/stores';
 
 export default defineComponent({
   inheritAttrs: false,
@@ -90,6 +91,8 @@ export default defineComponent({
     const refresh = () => emit('refresh')
     const updateColumn = (value: Model.TableColumn[]) => emit('update:columns', value)
 
+    const { global: { t } } = i18n
+
     // 当某一行被勾选时触发的事件
     const onSelect = (selection: unknown[], currentRow: unknown) => {
       const el = tableRef.value
@@ -166,6 +169,7 @@ export default defineComponent({
       handleValue,
       refresh,
       updateColumn,
+      t
     }
   },
 })