king
2021-09-10 d074bedd5c2834113fe0c4ed5a3c78ec905681c3
src/pc/components/login/normal-login/index.jsx
@@ -10,10 +10,11 @@
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import { resetStyle } from '@/utils/utils-custom.js'
import getWrapForm from './options'
import './index.scss'
const LoginForm = asyncComponent(() => import('./loginform'))
const WrapComponent = asyncIconComponent(() => import('../wrapsetting'))
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
class PropCardEditComponent extends Component {
  static propTpyes = {
@@ -141,6 +142,16 @@
    }
  }
  getWrapForms = () => {
    const { wrap } = this.state.card
    return getWrapForm(wrap)
  }
  updateWrap = (res) => {
    this.updateComponent({...this.state.card, wrap: res})
  }
  render() {
    const { card, dict } = this.state
    let style = resetStyle(card.style)
@@ -159,7 +170,9 @@
      <div className="login-edit-box" style={style} onClick={this.clickComponent} id={card.uuid}>
        <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
          <div className="mk-popover-control">
            <WrapComponent config={card} updateConfig={this.updateComponent} />
            <NormalForm title="登录设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
              <Icon type="edit" style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
            <Icon className="close" title="删除组件" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
          </div>