| | |
| | | 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 = { |
| | |
| | | } |
| | | } |
| | | |
| | | 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) |
| | |
| | | <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> |