From 9882eb5c2269a77df282cf88419789833d37a045 Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Fri, 16 Oct 2020 14:40:36 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20remove=20unuse=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +-- src/models/global.ts | 14 +------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index e8621d81..cbce103b 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@ant-design/pro-descriptions": "^1.0.19", "@ant-design/pro-form": "^1.0.2", "@ant-design/pro-layout": "^6.4.19", - "@ant-design/pro-table": "^2.8.1", + "@ant-design/pro-table": "^2.9.5", "@umijs/route-utils": "^1.0.33", "antd": "^4.7.0", "classnames": "^2.2.6", @@ -87,7 +87,6 @@ "@umijs/plugin-blocks": "^2.0.5", "@umijs/preset-ant-design-pro": "^1.2.0", "@umijs/preset-react": "^1.4.8", - "@umijs/preset-ui": "^2.0.9", "@umijs/yorkie": "^2.0.3", "carlo": "^0.9.46", "chalk": "^4.0.0", diff --git a/src/models/global.ts b/src/models/global.ts index 5d4c4e40..c7a30342 100644 --- a/src/models/global.ts +++ b/src/models/global.ts @@ -1,4 +1,4 @@ -import { Subscription, Reducer, Effect } from 'umi'; +import { Reducer, Effect } from 'umi'; import { NoticeIconData } from '@/components/NoticeIcon'; import { queryNotices } from '@/services/user'; @@ -28,7 +28,6 @@ export interface GlobalModelType { saveNotices: Reducer; saveClearedNotices: Reducer; }; - subscriptions: { setup: Subscription }; } const GlobalModel: GlobalModelType = { @@ -122,17 +121,6 @@ const GlobalModel: GlobalModelType = { }; }, }, - - subscriptions: { - setup({ history }): void { - // Subscribe history(url) change, trigger `load` action if pathname is `/` - history.listen(({ pathname, search }): void => { - if (typeof window.ga !== 'undefined') { - window.ga('send', 'pageview', pathname + search); - } - }); - }, - }, }; export default GlobalModel;