| | |
| | | direction: 'vertical', |
| | | settingshow: true, |
| | | controlshow: true, |
| | | comloading: false |
| | | comloading: false, |
| | | adapters: [] |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | sessionStorage.setItem('role_type', param.role_type || 'true') |
| | | sessionStorage.setItem('login_types', param.login_types || 'false') |
| | | sessionStorage.setItem('typename', param.typename || 'mob') |
| | | sessionStorage.setItem('adapter', param.adapter || 'false') |
| | | sessionStorage.setItem('adapter', param.adapter || '') |
| | | |
| | | this.setState({ |
| | | localedict: sessionStorage.getItem('lang') !== 'en-US' ? antdZhCN : antdEnUS, |
| | |
| | | window.GLOB.shellHeight = 853 |
| | | } |
| | | |
| | | let adapters = sessionStorage.getItem('adapter') |
| | | if (adapters) { |
| | | adapters = adapters.split(',') |
| | | } else { |
| | | adapters = [] |
| | | } |
| | | |
| | | this.setState({ |
| | | adapters, |
| | | MenuId: param.MenuID |
| | | }, () => { |
| | | this.getMenuParam(param) |
| | |
| | | } |
| | | |
| | | submitConfig = () => { |
| | | const { adapters } = this.state |
| | | let config = fromJS(this.state.config).toJS() |
| | | |
| | | if (!config.MenuName || !config.MenuNo || (config.cacheUseful === 'true' && !config.cacheTime)) { |
| | |
| | | config.loginview = false |
| | | } |
| | | |
| | | if (sessionStorage.getItem('adapter') === 'true') { |
| | | if (adapters.includes('wxmini')) { |
| | | config = this.getMiniStyle(config) |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | render () { |
| | | const { localedict, comloading, loading, settingshow, controlshow, activeKey, dict, MenuId, config, menuloading, customComponents } = this.state |
| | | const { localedict, comloading, loading, settingshow, controlshow, activeKey, dict, MenuId, config, menuloading, customComponents, adapters } = this.state |
| | | |
| | | return ( |
| | | <ConfigProvider locale={localedict}> |
| | |
| | | dict={dict} |
| | | config={config} |
| | | MenuId={MenuId} |
| | | adapters={adapters} |
| | | updateConfig={this.updateConfig} |
| | | /> : null} |
| | | {config ? <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> : null} |