| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, notification, Tooltip, Icon, Rate } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | import { Form, Row, Col, notification, Tooltip, Rate } from 'antd' |
| | | import { QuestionCircleOutlined, StarFilled } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | |
| | | import MKInput from './mkInput' |
| | | import MKNumberInput from './mkNumberInput' |
| | | import MKSelect from './mkSelect' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import './index.scss' |
| | | |
| | | const MKCheckCard = asyncComponent(() => import('./mkCheckCard')) |
| | |
| | | } else if (item.type === 'textarea') { |
| | | content = (<MKTextArea config={item} onChange={(val, defer) => !defer && this.recordChange({[item.field]: val})}/>) |
| | | } else if (item.type === 'rate') { |
| | | content = (<Rate count={item.rateCount} disabled={item.readonly} onChange={(val) => this.recordChange({[item.field]: val})} character={item.character ? <Icon type={item.character}/> : <Icon type="star" theme="filled"/>} allowHalf={item.allowHalf}/>) |
| | | content = (<Rate count={item.rateCount} disabled={item.readonly} onChange={(val) => this.recordChange({[item.field]: val})} character={item.character ? <MkIcon type={item.character}/> : <StarFilled />} allowHalf={item.allowHalf}/>) |
| | | } else if (item.type === 'brafteditor') { |
| | | content = (<MKEditor config={item} onChange={(val) => this.recordChange({[item.field]: val})}/>) |
| | | label = item.hidelabel !== 'true' ? label : '' |