| | |
| | | } |
| | | |
| | | onCloseDrawer = () => { |
| | | const { type } = this.state |
| | | let card = fromJS(this.state.card).toJS() |
| | | |
| | | if (card.borderWidth === '0px' || !card.borderWidth) { |
| | | if (type === 'toolBtn' && card.borderWidth === '0px') { |
| | | delete card.borderColor |
| | | } else if (card.borderWidth === '0px' || !card.borderWidth) { |
| | | delete card.borderWidth |
| | | delete card.borderColor |
| | | } |
| | |
| | | label={<ColumnWidthOutlined title="边框宽度"/>} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | {borposition === 'outer' ? <StyleInput defaultValue={card.borderWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'left' ? <StyleInput defaultValue={card.borderLeftWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'right' ? <StyleInput defaultValue={card.borderRightWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'top' ? <StyleInput defaultValue={card.borderTopWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'bottom' ? <StyleInput defaultValue={card.borderBottomWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'outer' ? <StyleInput clear={true} defaultValue={card.borderWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'left' ? <StyleInput clear={true} defaultValue={card.borderLeftWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'right' ? <StyleInput clear={true} defaultValue={card.borderRightWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'top' ? <StyleInput clear={true} defaultValue={card.borderTopWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | {borposition === 'bottom' ? <StyleInput clear={true} defaultValue={card.borderBottomWidth || ''} options={['px']} onChange={this.changeBorderWidth}/> : null} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |