Browse Source

🔥 type: fix ts error in 3.9 (#6632)

* 🔥 type: fix ts error in 3.9

* use node@12
pull/6625/head
陈帅 6 years ago
committed by GitHub
parent
commit
6617bbb3b0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      azure-pipelines.yml
  2. 2
      src/components/NoticeIcon/index.tsx
  3. 2
      src/models/global.ts

4
azure-pipelines.yml

@ -50,7 +50,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: '11.x'
versionSpec: '12.x'
- script: yarn
displayName: install
- script: npm run lint
@ -73,7 +73,7 @@ jobs:
steps:
- task: NodeTool@0
inputs:
versionSpec: '11.x'
versionSpec: '12.x'
- script: yarn
displayName: install
- script: npm run lint

2
src/components/NoticeIcon/index.tsx

@ -69,6 +69,7 @@ const NoticeIcon: React.FC<NoticeIconProps> & {
panes.push(
<TabPane tab={tabTitle} key={tabKey}>
<NoticeList
{...child.props}
clearText={clearText}
viewMoreText={viewMoreText}
data={list}
@ -78,7 +79,6 @@ const NoticeIcon: React.FC<NoticeIconProps> & {
showClear={showClear}
showViewMore={showViewMore}
title={title}
{...child.props}
/>
</TabPane>,
);

2
src/models/global.ts

@ -116,8 +116,8 @@ const GlobalModel: GlobalModelType = {
},
saveClearedNotices(state = { notices: [], collapsed: true }, { payload }): GlobalModelState {
return {
collapsed: false,
...state,
collapsed: false,
notices: state.notices.filter((item): boolean => item.type !== payload),
};
},

Loading…
Cancel
Save