世界上最伟大的投资就是投资自己的教育
netNowork
id 10044
惠赠 投资者 netNowork 1 days 3 hours 44 minutes 16 seconds 舵主 研究生 移动端用户
-
mongodb://root:root@localhost:27017/nest?authSource=admin
请问 mongo 能连接吗?
typeorm 支持连接 mongo 吗?
有的话可否出一篇文档。可以进行测试 -
docker 安装的 mysql 怎么办呢?
-
第一!
-
需要 umi3 相关的.急切!
-
up 价格有点高啊, 能不能把价格控制在 100 内啊,国内都没活动.
-
您好,我有一个问题 修改本页的不是是 setState? 哪如果想修改 props 里面的值要怎么样 修改呢?
-
哈哈哈,我也等着更老板项目要用
-
出一点 组件嵌套 组合的用法吧
-
上面是错误的 ❌,不用模仿了 导入的时候注意一下就好了,
-
/** * Ant Design Pro v4 use `@ant-design/pro-layout` to handle Layout. * You can view component api by: * https://github.com/ant-design/ant-design-pro-layout */ import ProLayout, { DefaultFooter } from '@ant-design/pro-layout'; // 用js的朋友需要注意一下这里可能跟用ts 的导入方式不同 在外部导入 , { DefaultFooter } import React, { useEffect, useState } from 'react'; import Link from 'umi/link'; import { connect } from 'dva'; import { formatMessage } from 'umi-plugin-react/locale'; import Authorized from '@/utils/Authorized'; import RightContent from '@/components/GlobalHeader/RightContent'; import { isAntDesignPro } from '@/utils/utils'; import logo from '../assets/logo.png'; // import { Icon, Layout } from 'antd'; // import GlobalFooter from '@ant-design/pro-layout/lib/GlobalFooter'; // const { Footer } = Layout; /** * use Authorized check all menu item */ const menuDataRender = menuList => menuList.map(item => { const localItem = { ...item, children: item.children ? menuDataRender(item.children) : [] }; return Authorized.check(item.authority, localItem, null); }); const defaultLinks = [ { key: 'tile', title: 'tile', href: 'url', blankTarget: true, }, { key: 'title', title: 'title', href: 'url', blankTarget: true, }, ]; const defaultCopyright = '写上你的footer'; const footerRender = (_, defaultDom) => { if (!isAntDesignPro()) { return ( <> <DefaultFooter links={defaultLinks} //进行绑定``` javascript
copyright={defaultCopyright} //进行绑定 /> </> );
}
return (
style={{
<>
{defaultDom}
padding: '0px 24px 24px',
textAlign: 'center',
}}
>
src="https://www.netlify.com/img/global/badges/netlify-color-bg.svg"
width="82px"
alt="netlify logo"
/>
</>
);
};const BasicLayout = props => {
const { dispatch, children, settings } = props;
/**- constructor */
useEffect(() => {
if (dispatch) {
dispatch({
type: 'user/fetchCurrent',
});
dispatch({
type: 'settings/getSetting',
});
}
}, []);
/**- init variables */
const handleMenuCollapse = payload =>
dispatch &&
dispatch({
type: 'global/changeLayoutCollapsed',
payload,
});const [menuData, setMenuData] = useState([]);
useEffect(() => {
fetch('https://api.1km.im/jychannel/sel')
.then(response => response.json())
.then(data => {
setMenuData(data.list || []);
});
}, []);return (
logo={logo}
onCollapse={handleMenuCollapse}
menuItemRender={(menuItemProps, defaultDom) => {
if (menuItemProps.isUrl) {
return defaultDom;
}return <Link to={menuItemProps.path}>{defaultDom}</Link>; }} breadcrumbRender={(routers = []) => [ { path: '/', breadcrumbName: formatMessage({ id: 'menu.home', defaultMessage: 'Home', }), }, ...routers, ]} itemRender={(route, params, routes, paths) => { const first = routes.indexOf(route) === 0; return first ? ( <Link to={paths.join('/')}>{route.breadcrumbName}</Link> ) : ( <span>{route.breadcrumbName}</span> ); }} footerRender={footerRender} menuDataRender={() => menuData} formatMessage={formatMessage} rightContentRender={rightProps => <RightContent {...rightProps} />} {...props} {...settings} > {children} </ProLayout>
);
};export default connect(({ global, settings }) => ({
collapsed: global.collapsed,
settings,
}))(BasicLayout);
© 汕尾市求知科技有限公司 | Rails365 Gitlab | 知乎 | b 站 | csdn
粤公网安备 44152102000088号 | 粤ICP备19038915号
Top