| | |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, Radio, Icon, Tooltip, InputNumber } from 'antd' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import './index.scss' |
| | | |
| | | const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent')) |
| | | |
| | | class CustomMenuForm extends Component { |
| | | static propTpyes = { |
| | |
| | | this.props.updateConfig({...config, cacheUseful: value}) |
| | | } else if (key === 'timeUnit') { |
| | | this.props.updateConfig({...config, timeUnit: value}) |
| | | } else if (key === 'advertUrl') { |
| | | this.props.updateConfig({...config, advertUrl: value}) |
| | | } else if (key === 'advertTime') { |
| | | this.props.updateConfig({...config, advertTime: value}) |
| | | } |
| | | } |
| | | |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="在明科云APP中有效。"> |
| | | <Icon type="question-circle" /> |
| | | 广告页 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('advertUrl', { |
| | | initialValue: config.advertUrl || '' |
| | | })( |
| | | <SourceComponent type="picture" placement="right" onChange={(val) => {this.selectChange('advertUrl', val)}}/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {config.advertUrl ? <Col span={24}> |
| | | <Form.Item label="停留(s)"> |
| | | {getFieldDecorator('advertTime', { |
| | | initialValue: config.advertTime || 3, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: dict['mob.required.input'] + '停留时间!' |
| | | } |
| | | ] |
| | | })( |
| | | <InputNumber min={1} max={10} precision={0} onChange={(val) => {this.selectChange('advertTime', val)}}/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Row> |
| | | </Form> |
| | | ) |