Browse Source

feat(live): live 绑定主播页面添加国际化

tangning 3 years ago
parent
commit
1006b631ba
2 changed files with 15 additions and 9 deletions
  1. 5 0
      src/locales/lang/zh-CN/routes/scenes.ts
  2. 10 9
      src/views/scenes/bindModal.vue

+ 5 - 0
src/locales/lang/zh-CN/routes/scenes.ts

@@ -18,6 +18,11 @@ export default {
   downloadSceneConfirm: '是否确认下载场景',
   editor: '打开编辑器',
   cancelDownload: '取消下载',
+  own: '主播选择',
+  userName: '员工名称:',
+  canShow: '是否同时开通一起逛',
+  bindTime: '绑定时间',
+  anchorList: '主播列表',
   roleType: {
     0: '公司管理员',
     1: '公司员工',

+ 10 - 9
src/views/scenes/bindModal.vue

@@ -2,7 +2,7 @@
   <BasicModal
     v-bind="$attrs"
     @register="register"
-    title="绑定主播"
+    :title="t('routes.scenes.bindAnchor')"
     width="800px"
     @ok="handleSubmit"
     @cancel="clearSelectedRowKeys"
@@ -15,7 +15,8 @@
       >
         <template #headerTop>
           <div class="pt-4 pb-4">
-            场景名称: {{ headerInfo?.sceneName }} 直播间名称:{{ headerInfo?.name }}</div
+            {{ t('routes.scenes.sceneName') }}: {{ headerInfo?.sceneName }}
+            {{ t('routes.scenes.anchorRoom') }}:{{ headerInfo?.name }}</div
           >
         </template>
         <template #canShowSwitch="{ record }">
@@ -55,7 +56,7 @@
   const schemas: FormSchema[] = [
     {
       field: 'own',
-      label: '主播选择:',
+      label: t('routes.scenes.own'),
       component: 'Input',
     },
   ];
@@ -67,29 +68,29 @@
       width: 40,
     },
     {
-      title: '员工名称',
+      title: t('routes.scenes.userName'),
       dataIndex: 'userName',
       width: 100,
     },
     {
-      title: '角色',
+      title: t('common.roleName'),
       dataIndex: 'roleName',
       width: 100,
     },
 
     {
-      title: '手机号',
+      title: t('common.mobile'),
       dataIndex: 'phone',
       width: 100,
     },
     {
-      title: '是否同时开通一起逛',
+      title: t('routes.scenes.canShow'),
       dataIndex: 'canShow',
       slots: { customRender: 'canShowSwitch' },
       width: 140,
     },
     {
-      title: '绑定时间',
+      title: t('routes.scenes.bindTime'),
       dataIndex: 'createTime',
       width: 100,
       customRender: ({ record }) => {
@@ -131,7 +132,7 @@
           getRawDataSource,
         },
       ] = useTable({
-        title: '主播列表',
+        title: t('routes.scenes.anchorList'),
         api: bindAnchorListApi,
         columns: columns,
         useSearchForm: false,