| | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import './index.scss' |
| | | |
| | | const { Search } = Input |
| | | const { MonthPicker, WeekPicker, RangePicker } = DatePicker |
| | | const CheckCard = asyncComponent(() => import('@/templates/modalconfig/checkCard')) |
| | | |
| | |
| | | } |
| | | |
| | | let formItem = null |
| | | let type = '' |
| | | if (card.type === 'text') { |
| | | if (card.inputType === 'search') { |
| | | formItem = (<Search style={{marginTop: '4px'}} placeholder={card.labelShow === 'false' ? card.label : ''} value={card.initval} enterButton />) |
| | | } else { |
| | | formItem = (<Input style={{marginTop: '4px'}} placeholder={card.labelShow === 'false' ? card.label : ''} value={card.initval} />) |
| | | } |
| | | } else if (card.type === 'multiselect' || card.type === 'select' || card.type === 'link') { |
| | | formItem = (<Select value={_defaultValue}></Select>) |
| | | } else if (card.type === 'date') { |
| | |
| | | } else if (card.type === 'group') { |
| | | formItem = (<DateGroup card={card} />) |
| | | } else if (card.type === 'checkcard') { |
| | | type = 'checkcard' |
| | | formItem = <CheckCard config={card} /> |
| | | } |
| | | |
| | |
| | | <Icon className="close" title="delete" type="close" onClick={() => delCard(id)} /> |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className={'page-card ' + (card.labelShow || '')} style={{ opacity: opacity}}> |
| | | <div className={'page-card ' + (card.labelShow || '') + ' ' + type} style={{ opacity: opacity}}> |
| | | <div ref={node => drag(drop(node))} onDoubleClick={() => editCard(id)}> |
| | | <Form.Item |
| | | labelCol={{xs: { span: 24 }, sm: { span: 8 }}} |