From 91e232bb0b910f3670bdbccd65cc218d55e1eda9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 06 十二月 2022 16:08:20 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/menu/components/share/usercomponent/index.jsx |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/menu/components/share/usercomponent/index.jsx b/src/menu/components/share/usercomponent/index.jsx
index e10fa99..07c968b 100644
--- a/src/menu/components/share/usercomponent/index.jsx
+++ b/src/menu/components/share/usercomponent/index.jsx
@@ -1,25 +1,23 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Icon, Modal, notification } from 'antd'
+import { Modal, notification } from 'antd'
+import { UserOutlined } from '@ant-design/icons'
 import html2canvas from 'html2canvas'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
 import options from '@/store/options.js'
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
 import UserForm from './settingform'
 import MKEmitter from '@/utils/events.js'
 import './index.scss'
 
 class UserComponent extends Component {
   static propTpyes = {
-    btnlog: PropTypes.array
+    config: PropTypes.object
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     visible: false,
     loading: false,
     name: '',
@@ -145,7 +143,8 @@
       document.getElementsByClassName('menu-view')[0].classList.add('saving')
       this.setState({loading: true})
       setTimeout(() => {
-        let template = this.getUserComponent()
+        // let template = this.getUserComponent()
+        let template = fromJS(config).toJS()
         html2canvas(document.getElementById(config.uuid)).then(canvas => {
           let param = {
             Base64Img: canvas.toDataURL('image/png') // 鑾峰彇鐢熸垚鐨勫浘鐗�
@@ -206,11 +205,11 @@
   }
 
   render () {
-    const { visible, dict, loading, name } = this.state
+    const { visible, loading, name } = this.state
 
     return (
       <div className="user-component-wrap">
-        <Icon type="user" title="鐢熸垚鑷畾涔夌粍浠�" onClick={this.trigger} />
+        <UserOutlined title="鐢熸垚鑷畾涔夌粍浠�" onClick={this.trigger} />
         <Modal
           title="鑷畾涔夌粍浠�"
           visible={visible}
@@ -221,7 +220,7 @@
           onCancel={this.cancel}
           destroyOnClose
         >
-          <UserForm dict={dict} name={name} inputSubmit={this.submit} wrappedComponentRef={(inst) => this.verifyRef = inst}/>
+          <UserForm name={name} inputSubmit={this.submit} wrappedComponentRef={(inst) => this.verifyRef = inst}/>
         </Modal>
       </div>
     )

--
Gitblit v1.8.0