| | |
| | | backgroundImage: '', |
| | | backgroundSize: '', |
| | | backgroundRepeat: '', |
| | | backgroundPositon: '', |
| | | opacity: '', |
| | | } |
| | | |
| | |
| | | backgroundColor: config.style.backgroundColor, |
| | | backgroundImage: bgImg, |
| | | backgroundSize: config.style.backgroundSize || '100%', |
| | | backgroundRepeat: config.style.backgroundRepeat || 'repeat' |
| | | backgroundRepeat: config.style.backgroundRepeat || 'repeat', |
| | | backgroundPositon: config.style.backgroundPositon || 'center' |
| | | }) |
| | | } |
| | | |
| | |
| | | this.props.updateConfig(config) |
| | | } |
| | | |
| | | backgroundPositonChange = (val) => { |
| | | this.setState({ |
| | | backgroundPositon: val |
| | | }) |
| | | |
| | | let config = fromJS(this.props.config).toJS() |
| | | config.style.backgroundPositon = val |
| | | |
| | | this.props.updateConfig(config) |
| | | } |
| | | |
| | | render () { |
| | | const { config } = this.props |
| | | const { backgroundColor, backgroundImage, backgroundSize, backgroundRepeat } = this.state |
| | | const { backgroundColor, backgroundImage, backgroundSize, backgroundRepeat, backgroundPositon } = this.state |
| | | const formItemLayout = { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | <Option value="repeat-y">repeat-y</Option> |
| | | </Select> |
| | | </Form.Item> |
| | | <Form.Item colon={false} label="位置"> |
| | | <Select defaultValue={backgroundPositon} onChange={this.backgroundPositonChange}> |
| | | <Option value="center">center</Option> |
| | | <Option value="top">top</Option> |
| | | <Option value="bottom">bottom</Option> |
| | | </Select> |
| | | </Form.Item> |
| | | <p style={{borderBottom: '1px solid #eaeaea', color: '#40a9ff'}}>内边距</p> |
| | | <Form.Item |
| | | colon={false} |