| | |
| | | this.updateStyle(_style) |
| | | } |
| | | |
| | | changeWidth = (val) => { |
| | | let _val = val |
| | | if (_val === '0px') { |
| | | _val = 'auto' |
| | | } |
| | | |
| | | this.updateStyle({width: _val}) |
| | | } |
| | | |
| | | changeHeight = (val) => { |
| | | let _val = val |
| | | if (_val === '0px') { |
| | |
| | | <div className="menu-style-controller"> |
| | | <Form {...formItemLayout}> |
| | | {card ? <Collapse expandIconPosition="right" destroyInactivePanel={true} defaultActiveKey={options[0]}> |
| | | {options.includes('width') ? <Panel header="宽度" key="width"> |
| | | <Col span={24}> |
| | | <Form.Item |
| | | colon={false} |
| | | label={<Icon title="宽度" type="column-width" />} |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <StyleInput defaultValue={card.width || ''} options={['px']} onChange={this.changeWidth}/> |
| | | </Form.Item> |
| | | </Col> |
| | | </Panel> : null} |
| | | {options.includes('height') ? <Panel header="高度" key="height"> |
| | | <Col span={24}> |
| | | <Form.Item |