| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Select, Button, Input, Radio, Icon, Cascader } from 'antd' |
| | | import { Form, Row, Col, Select, Button, Input, Radio, Cascader } from 'antd' |
| | | |
| | | import { minkeColorSystem, minkeIconSystem } from '@/utils/option.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import './index.scss' |
| | | |
| | | class UniqueForm extends Component { |
| | |
| | | selectIcon: record.icon || '', |
| | | options: this.state.options.map(option => { |
| | | option.children = option.children.map(cell => { |
| | | cell.label = <div className={_type + cell.value}>{record.icon ? <Icon type={record.icon} /> : cell.value}</div> |
| | | cell.label = <div className={_type + cell.value}>{record.icon ? <MkIcon type={record.icon} /> : cell.value}</div> |
| | | |
| | | return cell |
| | | }) |
| | |
| | | selectIcon: val, |
| | | options: this.state.options.map(option => { |
| | | option.children = option.children.map(cell => { |
| | | cell.label = <div className={'font ' + cell.value}><Icon type={val} /></div> |
| | | cell.label = <div className={'font ' + cell.value}><MkIcon type={val} /></div> |
| | | |
| | | return cell |
| | | }) |
| | |
| | | <Select.Option value="hint">提示建议性图标</Select.Option> |
| | | <Select.Option value="edit">编辑类图标</Select.Option> |
| | | <Select.Option value="data">数据类图标</Select.Option> |
| | | <Select.Option value="trademark">品牌和标识</Select.Option> |
| | | <Select.Option value="normal">网站通用图标</Select.Option> |
| | | </Select> |
| | | )} |
| | |
| | | ] |
| | | })( |
| | | <Select onChange={this.changeIcon} getPopupContainer={() => document.getElementById('model-mark-form-box')}> |
| | | {icons.map(icon => <Select.Option key={icon} value={icon}><Icon type={icon} /></Select.Option>)} |
| | | {icons.map(icon => <Select.Option key={icon} value={icon}><MkIcon type={icon} /></Select.Option>)} |
| | | </Select> |
| | | )} |
| | | </Form.Item> |