| | |
| | | class SettingForm extends Component { |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | menu: PropTypes.any, // 菜单配置信息 |
| | | config: PropTypes.object, // 组件配置 |
| | | setting: PropTypes.object, // 数据源配置 |
| | | modules: PropTypes.array, // 可绑定的上级组件 |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { menu, config } = this.props |
| | | const { config } = this.props |
| | | |
| | | let modules = MenuUtils.getSupModules(menu.components, config.uuid) || [] |
| | | let modules = MenuUtils.getSupModules(window.GLOB.customMenu.components, config.uuid) || [] |
| | | |
| | | modules.unshift({ |
| | | value: 'empty', |
| | |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType === 'system' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title={'自定义脚本中的变量(除报错及可用字段外),需以此标识开头。'}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 变量标识 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('varMark', { |
| | | initialValue: setting.varMark || '', |
| | | rules: [ |
| | | { |
| | | pattern: /^[a-zA-Z_]*$/ig, |
| | | message: '请使用字母或_' |
| | | }, |
| | | { |
| | | max: 3, |
| | | message: '最多三个字符。' |
| | | } |
| | | ] |
| | | })(<Input placeholder={''} autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType === 'inner' ? <Col span={8}> |
| | | <Form.Item label={tooltip ? |
| | | <Tooltip placement="topLeft" title={tooltip}> |
| | |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!['navbar', 'balcony', 'menubar'].includes(config.type) ? <Col span={8}> |
| | | {!['navbar', 'balcony', 'menubar'].includes(config.type) && (!config.wrap || config.wrap.supType !== 'multi') ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title={'该组件如果受其他组件控制,请选项相应的组件,没有时选“无”。'}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {/* 1、不分页且不存在上级模块 */} |
| | | {!['navbar', 'menubar'].includes(config.type) && (!config.pageable || (config.pageable && laypage === 'false')) && (!supModule || supModule.length === 0 || supModule[0] === 'empty') ? <Col span={8}> |
| | | {!['navbar'].includes(config.type) && (!config.pageable || (config.pageable && laypage === 'false')) && (!supModule || supModule.length === 0 || supModule[0] === 'empty') ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title={'初始化加载时,是否与其他组件一同加载数据,注:仅在使用系统函数,且初始化加载数据时有效,分页请求时无效。'}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |