| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Select } from 'antd' |
| | | |
| | | import './index.scss' |
| | | |
| | | class SettingForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | } |
| | | |
| | | state = { |
| | | appMenus: [] |
| | | } |
| | |
| | | if (appMenus) { |
| | | try { |
| | | appMenus = JSON.parse(appMenus) |
| | | appMenus = appMenus.filter(item => item.keys_type !== 'index') |
| | | appMenus = appMenus.filter(item => item.keys_type === 'navbar') |
| | | } catch (e) { |
| | | appMenus = [] |
| | | } |
| | |
| | | <Form {...formItemLayout}> |
| | | <Row gutter={24}> |
| | | <Col span={20}> |
| | | <Form.Item label="菜单"> |
| | | <Form.Item label="菜单栏"> |
| | | {getFieldDecorator('menu', { |
| | | initialValue: '', |
| | | rules: [{ |
| | | required: true, |
| | | message: '请选择菜单!' |
| | | message: '请选择菜单栏!' |
| | | }] |
| | | })( |
| | | <Select> |