| | |
| | | |
| | | confirm({ |
| | | title: '确定删除元素吗?', |
| | | okText: this.state.dict['mob.confirm'], |
| | | cancelText: this.state.dict['mob.cancel'], |
| | | onOk() { |
| | | _this.props.updateContent(null) |
| | | }, |
| | |
| | | {deletable !== false ? <Icon type="delete" onClick={this.deleteElement} /> : null} |
| | | <Popover content={ |
| | | <div> |
| | | {element.eleType === 'img' ? <FileUpload value={images} maxFile={1} fileType="text" onChange={this.imgChange}/> : null} |
| | | {element.eleType === 'img' ? <FileUpload accept=".jpg,.png,.gif,.svg" value={images} maxFile={1} fileType="text" onChange={this.imgChange}/> : null} |
| | | {getFieldDecorator('content', { |
| | | initialValue: element.content |
| | | })(element.eleType !== 'textarea' ? |
| | | <Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} /> : |
| | | <TextArea autosize={{ minRows: 2, maxRows: 3 }} onPressEnter={this.handleSubmit} /> |
| | | <TextArea autoSize={{ minRows: 2, maxRows: 3 }} onPressEnter={this.handleSubmit} /> |
| | | )} |
| | | {element.eleType === 'link' ? <div className="link-url"> |
| | | <p>链接地址:</p> |