From a9a5211f48607fa7ac5bae91233f3a5e6df43587 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 20 一月 2022 14:09:04 +0800 Subject: [PATCH] 2022-01-20 --- src/pc/bgcontroller/index.jsx | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/pc/bgcontroller/index.jsx b/src/pc/bgcontroller/index.jsx index 63c0545..9b149f7 100644 --- a/src/pc/bgcontroller/index.jsx +++ b/src/pc/bgcontroller/index.jsx @@ -23,7 +23,7 @@ backgroundImage: '', backgroundSize: '', backgroundRepeat: '', - backgroundPositon: '', + backgroundPosition: '', opacity: '', } @@ -42,7 +42,7 @@ backgroundImage: bgImg, backgroundSize: config.style.backgroundSize || '100%', backgroundRepeat: config.style.backgroundRepeat || 'repeat', - backgroundPositon: config.style.backgroundPositon || 'center' + backgroundPosition: config.style.backgroundPosition || 'center' }) } @@ -114,18 +114,18 @@ backgroundPositonChange = (val) => { this.setState({ - backgroundPositon: val + backgroundPosition: val }) let config = fromJS(this.props.config).toJS() - config.style.backgroundPositon = val + config.style.backgroundPosition = val this.props.updateConfig(config) } render () { const { config } = this.props - const { backgroundColor, backgroundImage, backgroundSize, backgroundRepeat, backgroundPositon } = this.state + const { backgroundColor, backgroundImage, backgroundSize, backgroundRepeat, backgroundPosition } = this.state const formItemLayout = { labelCol: { xs: { span: 24 }, @@ -143,6 +143,7 @@ <Form.Item colon={false} label="瀹藉害" + className="normal-view" > <StyleInput defaultValue={config.style.width || '100%'} options={['px', '%', 'vw']} onChange={(val) => this.changePadding(val, 'width')}/> </Form.Item> @@ -170,58 +171,66 @@ </Select> </Form.Item> <Form.Item colon={false} label="浣嶇疆"> - <Select defaultValue={backgroundPositon} onChange={this.backgroundPositonChange}> + <Select defaultValue={backgroundPosition} 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> + <p className="normal-view" style={{borderBottom: '1px solid #eaeaea', color: '#40a9ff'}}>鍐呰竟璺�</p> <Form.Item colon={false} + className="normal-view" label={<ArrowUpOutlined title="涓婅竟璺�"/>} > <StyleInput defaultValue={config.style.paddingTop || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingTop')}/> </Form.Item> <Form.Item colon={false} + className="normal-view" label={<ArrowDownOutlined title="涓嬭竟璺�"/>} > <StyleInput defaultValue={config.style.paddingBottom || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingBottom')}/> </Form.Item> <Form.Item colon={false} + className="normal-view" label={<ArrowLeftOutlined title="宸﹁竟璺�"/>} > <StyleInput defaultValue={config.style.paddingLeft || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingLeft')}/> </Form.Item> <Form.Item colon={false} + className="normal-view" label={<ArrowRightOutlined title="鍙宠竟璺�"/>} > <StyleInput defaultValue={config.style.paddingRight || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingRight')}/> </Form.Item> - <p style={{borderBottom: '1px solid #eaeaea', color: '#40a9ff'}}>澶栬竟璺�</p> + <p className="normal-view" style={{borderBottom: '1px solid #eaeaea', color: '#40a9ff'}}>澶栬竟璺�</p> <Form.Item colon={false} + className="normal-view" label={<ArrowUpOutlined title="涓婅竟璺�"/>} > <StyleInput defaultValue={config.style.marginTop || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginTop')}/> </Form.Item> <Form.Item colon={false} + className="normal-view" label={<ArrowDownOutlined title="涓嬭竟璺�"/>} > <StyleInput defaultValue={config.style.marginBottom || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginBottom')}/> </Form.Item> <Form.Item colon={false} + className="normal-view" label={<ArrowLeftOutlined title="宸﹁竟璺�"/>} > <StyleInput defaultValue={config.style.marginLeft || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginLeft')}/> </Form.Item> <Form.Item colon={false} + className="normal-view" label={<ArrowRightOutlined title="鍙宠竟璺�"/>} > <StyleInput defaultValue={config.style.marginRight || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginRight')}/> -- Gitblit v1.8.0