Просмотр исходного кода

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

* 🔥 type: fix ts error in 3.9

* use node@12
陈帅 5 лет назад
Родитель
Сommit
6617bbb3b0
3 измененных файлов с 4 добавлено и 4 удалено
  1. 2 2
      azure-pipelines.yml
  2. 1 1
      src/components/NoticeIcon/index.tsx
  3. 1 1
      src/models/global.ts

+ 2 - 2
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

+ 1 - 1
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>,
       );

+ 1 - 1
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),
       };
     },