Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
钟摆人-Puppet゜
ant-design-pro
提交
4e62a9f2
A
ant-design-pro
项目概览
钟摆人-Puppet゜
/
ant-design-pro
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design-pro
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4e62a9f2
编写于
12月 30, 2019
作者:
C
chenshuai2144
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lint: fix ts error
上级
a6109418
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
9 deletion
+9
-9
azure-pipelines.yml
azure-pipelines.yml
+7
-7
src/layouts/BasicLayout.tsx
src/layouts/BasicLayout.tsx
+1
-1
src/utils/utils.ts
src/utils/utils.ts
+1
-1
未找到文件。
azure-pipelines.yml
浏览文件 @
4e62a9f2
...
@@ -11,7 +11,7 @@ jobs:
...
@@ -11,7 +11,7 @@ jobs:
-
job
:
lintAndBuild
-
job
:
lintAndBuild
pool
:
pool
:
vmImage
:
"
Ubuntu-16.04"
vmImage
:
'
Ubuntu-16.04'
steps
:
steps
:
-
checkout
:
self
-
checkout
:
self
...
@@ -29,11 +29,11 @@ jobs:
...
@@ -29,11 +29,11 @@ jobs:
-
job
:
test
-
job
:
test
pool
:
pool
:
vmImage
:
"
Ubuntu-16.04"
vmImage
:
'
Ubuntu-16.04'
container
:
container
:
image
:
circleci/node:latest-browsers
image
:
circleci/node:latest-browsers
options
:
"
-u
root"
options
:
'
-u
root'
steps
:
steps
:
-
script
:
npm install
-
script
:
npm install
...
@@ -46,11 +46,11 @@ jobs:
...
@@ -46,11 +46,11 @@ jobs:
-
job
:
Windows
-
job
:
Windows
pool
:
pool
:
vmImage
:
"
win1803"
vmImage
:
'
win1803'
steps
:
steps
:
-
task
:
NodeTool@0
-
task
:
NodeTool@0
inputs
:
inputs
:
versionSpec
:
"
11.x"
versionSpec
:
'
11.x'
-
script
:
npm install
-
script
:
npm install
displayName
:
install
displayName
:
install
-
script
:
npm run lint
-
script
:
npm run lint
...
@@ -69,11 +69,11 @@ jobs:
...
@@ -69,11 +69,11 @@ jobs:
-
job
:
MacOS
-
job
:
MacOS
pool
:
pool
:
vmImage
:
"
macOS-latest"
vmImage
:
'
macOS-latest'
steps
:
steps
:
-
task
:
NodeTool@0
-
task
:
NodeTool@0
inputs
:
inputs
:
versionSpec
:
"
11.x"
versionSpec
:
'
11.x'
-
script
:
npm install
-
script
:
npm install
displayName
:
install
displayName
:
install
-
script
:
npm run lint
-
script
:
npm run lint
...
...
src/layouts/BasicLayout.tsx
浏览文件 @
4e62a9f2
...
@@ -155,7 +155,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => {
...
@@ -155,7 +155,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = props => {
)
}
)
}
onCollapse
=
{
handleMenuCollapse
}
onCollapse
=
{
handleMenuCollapse
}
menuItemRender
=
{
(
menuItemProps
,
defaultDom
)
=>
{
menuItemRender
=
{
(
menuItemProps
,
defaultDom
)
=>
{
if
(
menuItemProps
.
isUrl
||
menuItemProps
.
children
)
{
if
(
menuItemProps
.
isUrl
||
menuItemProps
.
children
||
!
menuItemProps
.
path
)
{
return
defaultDom
;
return
defaultDom
;
}
}
return
<
Link
to
=
{
menuItemProps
.
path
}
>
{
defaultDom
}
</
Link
>;
return
<
Link
to
=
{
menuItemProps
.
path
}
>
{
defaultDom
}
</
Link
>;
...
...
src/utils/utils.ts
浏览文件 @
4e62a9f2
...
@@ -30,7 +30,7 @@ export const getPageQuery = () => parse(window.location.href.split('?')[1]);
...
@@ -30,7 +30,7 @@ export const getPageQuery = () => parse(window.location.href.split('?')[1]);
* @param router [{}]
* @param router [{}]
* @param pathname string
* @param pathname string
*/
*/
export
const
getAuthorityFromRouter
=
<
T
extends
{
path
:
string
}
>
(
export
const
getAuthorityFromRouter
=
<
T
extends
{
path
?
:
string
}
>
(
router
:
T
[]
=
[],
router
:
T
[]
=
[],
pathname
:
string
,
pathname
:
string
,
):
T
|
undefined
=>
{
):
T
|
undefined
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录