king
2023-03-08 4fc1eb4913f3302679d88ec01099fc8dd3a80f81
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: '',
@@ -207,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}
@@ -222,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>
    )