From 2bccb9ec7bdefe23292a22bc153463cfa1479a49 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 21 六月 2024 16:25:42 +0800
Subject: [PATCH] 2024-06-21

---
 src/views/tabledesign/index.jsx |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx
index d4a4218..6dd9642 100644
--- a/src/views/tabledesign/index.jsx
+++ b/src/views/tabledesign/index.jsx
@@ -4,13 +4,13 @@
 import { is, fromJS } from 'immutable'
 import moment from 'moment'
 import HTML5Backend from 'react-dnd-html5-backend'
-import { ConfigProvider, notification, Modal, Collapse, Card, Switch, Button, Typography } from 'antd'
+import { notification, Modal, Collapse, Card, Switch, Button, Typography } from 'antd'
 import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons'
 import md5 from 'md5'
 
 import Api from '@/api'
 import Utils, { setGLOBFuncs } from '@/utils/utils.js'
-import antdZhCN from 'antd/es/locale/zh_CN'
+import { langs } from '@/store/options'
 import MKEmitter from '@/utils/events.js'
 import { getTables, getFuncsAndInters, getLangTrans } from '@/utils/utils-custom.js'
 import SourceElement from '@/templates/zshare/dragsource'
@@ -23,7 +23,6 @@
 const { Panel } = Collapse
 const { confirm } = Modal
 const { Paragraph } = Typography
-const _locale = antdZhCN
 
 const MenuForm = asyncComponent(() => import('./menuform'))
 const PopView = asyncComponent(() => import('./popview'))
@@ -59,6 +58,7 @@
     comloading: false,
     settingshow: sessionStorage.getItem('settingshow') !== 'false',
     view: null,
+    langName: '',
     popConfig: null
   }
 
@@ -93,6 +93,7 @@
         ParentId: param.ParentId || '',
         MenuName: param.MenuName || '',
         MenuNo: param.MenuNo || '',
+        langName: sessionStorage.getItem('lang') !== 'zh-CN' && langs[sessionStorage.getItem('lang')] ? `锛�${langs[sessionStorage.getItem('lang')]}锛塦 : ''
       }, () => {
         this.getMenuParam()
       })
@@ -858,11 +859,11 @@
   }
 
   render () {
-    const { view, activeKey, comloading, MenuId, config, settingshow, ParentId, menuloading } = this.state
+    const { view, activeKey, comloading, MenuId, config, settingshow, ParentId, menuloading, langName } = this.state
 
     return (
-      <ConfigProvider locale={_locale}>
-        <Header menuName={config ? config.MenuName : ''}/>
+      <>
+        <Header menuName={config ? config.MenuName + langName : ''}/>
         <DndProvider backend={HTML5Backend}>
         {view !== 'popview' ? <div className="pc-table-view">
             <div className="menu-body">
@@ -938,7 +939,7 @@
         </DndProvider>
         <StyleController />
         <ModalController />
-      </ConfigProvider>
+      </>
     )
   }
 }

--
Gitblit v1.8.0