umi#SelectLang JavaScript Examples
The following examples show how to use
umi#SelectLang.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RightContent.jsx From vpp with MIT License | 6 votes |
GlobalHeaderRight = props => {
const { theme, layout } = props;
let className = styles.right;
if (theme === 'dark' && layout === 'top') {
className = `${styles.right} ${styles.dark}`;
}
return (
<div className={className}>
<Avatar />
{REACT_APP_ENV && (
<span>
<Tag color={ENVTagColor[REACT_APP_ENV]}>{REACT_APP_ENV}</Tag>
</span>
)}
<SelectLang className={styles.action} />
</div>
);
}
Example #2
Source File: UserLayout.jsx From vpp with MIT License | 5 votes |
UserLayout = props => {
const {
route = {
routes: [],
},
} = props;
const { routes = [] } = route;
const {
children,
location = {
pathname: '',
},
} = props;
const { formatMessage } = useIntl();
const { breadcrumb } = getMenuData(routes);
const title = getPageTitle({
pathname: location.pathname,
formatMessage,
breadcrumb,
...props,
});
return (
<HelmetProvider>
<Helmet>
<title>{title}</title>
<meta name="description" content={title} />
</Helmet>
<div className={styles.container}>
<div className={styles.lang}>
<SelectLang />
</div>
<div className={styles.content}>
<div className={styles.top}>
<div className={styles.header}>
<Link to="/">
<img alt="logo" className={styles.logo} src={logo} />
<span className={styles.title}>Vpp Front End</span>
</Link>
</div>
</div>
{children}
</div>
</div>
</HelmetProvider>
);
}
Example #3
Source File: RightContent.jsx From the-eye-knows-the-garbage with MIT License | 5 votes |
GlobalHeaderRight = props => {
const { theme, layout } = props;
let className = styles.right;
if (theme === 'dark' && layout === 'top') {
className = `${styles.right} ${styles.dark}`;
}
return (
<div className={className}>
{/*<HeaderSearch*/}
{/* className={`${styles.action} ${styles.search}`}*/}
{/* placeholder="站内搜索"*/}
{/* defaultValue="umi ui"*/}
{/* options={[*/}
{/* {*/}
{/* label: <a href="https://umijs.org/zh/guide/umi-ui.html">umi ui</a>,*/}
{/* value: 'umi ui',*/}
{/* },*/}
{/* {*/}
{/* label: <a href="next.ant.design">Ant Design</a>,*/}
{/* value: 'Ant Design',*/}
{/* },*/}
{/* {*/}
{/* label: <a href="https://protable.ant.design/">Pro Table</a>,*/}
{/* value: 'Pro Table',*/}
{/* },*/}
{/* {*/}
{/* label: <a href="https://prolayout.ant.design/">Pro Layout</a>,*/}
{/* value: 'Pro Layout',*/}
{/* },*/}
{/* ]} // onSearch={value => {*/}
{/* // //console.log('input', value);*/}
{/* // }}*/}
{/*/>*/}
<Tooltip title="使用文档">
<a
style={{
color: 'inherit',
}}
target="_blank"
href="https://github.com/mtianyan/tyadmin_api_cli"
rel="noopener noreferrer"
className={styles.action}
>
<QuestionCircleOutlined />
</a>
</Tooltip>
{/*<NoticeIconView />*/}
<Avatar />
{REACT_APP_ENV && (
<span>
<Tag color={ENVTagColor[REACT_APP_ENV]}>{REACT_APP_ENV}</Tag>
</span>
)}
<SelectLang className={styles.action} />
</div>
);
}
Example #4
Source File: UserLayout.jsx From the-eye-knows-the-garbage with MIT License | 5 votes |
UserLayout = props => {
const {
route = {
routes: [],
},
} = props;
const { routes = [] } = route;
const {
children,
location = {
pathname: '',
},
} = props;
const { formatMessage } = useIntl();
const { breadcrumb } = getMenuData(routes);
const title = getPageTitle({
pathname: location.pathname,
formatMessage,
breadcrumb,
...props,
});
return (
<HelmetProvider>
<Helmet>
<title>{title}</title>
<meta name="description" content={title} />
</Helmet>
<div className={styles.container}>
<div className={styles.lang}>
<SelectLang />
</div>
<div className={styles.content}>
<div className={styles.top}>
<div className={styles.header}>
<img alt="logo" className={styles.logo} src={logo} />
<span className={styles.title}>TyAdmin</span>
</div>
<div className={styles.desc}>Generate By TyAdmin Cli</div>
</div>
{children}
</div>
<DefaultFooter
copyright={`${new Date().getFullYear()} TyAdmin By mtianyan`}
links={[
{
key: 'TyAdmin',
title: 'TyAdmin',
href: 'https://github.com/mtianyan/tyadmin_api_cli',
blankTarget: true,
},
{
key: 'github',
title: <GithubOutlined />,
href: 'https://github.com/mtianyan',
blankTarget: true,
},
{
key: 'Ant Design',
title: 'Ant Design Pro V4',
href: 'https://ant.design',
blankTarget: true,
},
]}
/>
</div>
</HelmetProvider>
);
}