1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/didiopensource-KnowStreaming

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Это зеркальный репозиторий, синхронизируется ежедневно с исходного репозитория.
Клонировать/Скачать
common.tsx 1.7 КБ
Копировать Редактировать Исходные данные Просмотреть построчно История
eilenexuzhe Отправлено 4 лет назад 237a4a9
import * as React from 'react';
import './index.less';
import 'styles/font.css';
import 'styles/header-search.less';
import { Header } from 'container/header';
import { LeftMenu } from 'container/left-menu';
import AllWrapperInOne from 'container/wrapper';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import { IPageRouteItem } from 'types/base-type';
import { region } from 'store/region';
import { observer } from 'mobx-react';
import { users } from 'store/users';
import { FullScreen } from 'container/full-screen';
import Url from 'lib/url-parser';
import AllCustomModalInOne from 'container/wrapper/custom-modal';
interface ICommonRoute {
pageRoute: IPageRouteItem[];
mode?: 'admin' | 'user' | 'topic' | 'cluster' | 'expert' | 'alarm';
active: string;
}
@observer
export default class CommonRoutePage extends React.Component<ICommonRoute> {
constructor(props: ICommonRoute) {
super(props);
const url = Url();
const index = region.regionIdcList.findIndex(item => item.idc === url.search.region);
if (index > -1) {
region.setRegion(region.regionIdcList[index]);
}
}
public componentDidMount() {
region.getRegionIdcs();
users.getAccount();
}
public render() {
const { pageRoute, mode, active } = this.props;
return (
<>
<Header active={active} />
<div className="core-container">
<LeftMenu mode={mode} />
<div className="content-container">
{pageRoute.map((item: IPageRouteItem, key: number) =>
<Route key={key} path={item.path} exact={item.exact} component={item.component} />)}
</div>
</div>
<AllWrapperInOne />
<AllCustomModalInOne />
<FullScreen />
</>
);
}
}

Комментарий ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/didiopensource-KnowStreaming.git
git@gitlife.ru:oschina-mirror/didiopensource-KnowStreaming.git
oschina-mirror
didiopensource-KnowStreaming
didiopensource-KnowStreaming
v2.4.2