From 5af5ff2f52735bd86511e843dbef3c785a171cb6 Mon Sep 17 00:00:00 2001 From: chenshuai2144 Date: Fri, 6 Dec 2019 18:32:02 +0800 Subject: [PATCH] chore : add hrad code for block --- src/typings.d.ts | 5 +---- src/utils/Authorized.ts | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/typings.d.ts b/src/typings.d.ts index cd47da33..ddc5a8d3 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -11,10 +11,6 @@ declare module '*.gif'; declare module '*.bmp'; declare module '*.tiff'; declare module 'omit.js'; -declare module 'react-copy-to-clipboard'; -declare module 'react-fittext'; -declare module '@antv/data-set'; -declare module 'nzh/cn'; // google analytics interface interface GAFieldsObject { @@ -30,6 +26,7 @@ interface Window { hitType: 'event' | 'pageview', fieldsObject: GAFieldsObject | string, ) => void; + reloadAuthorized: () => void; } declare let ga: Function; diff --git a/src/utils/Authorized.ts b/src/utils/Authorized.ts index 807fc1fe..5c789648 100644 --- a/src/utils/Authorized.ts +++ b/src/utils/Authorized.ts @@ -9,5 +9,11 @@ const reloadAuthorized = (): void => { Authorized = RenderAuthorize(getAuthority()); }; +/** + * hard code + * block need it。 + */ +window.reloadAuthorized = reloadAuthorized; + export { reloadAuthorized }; export default Authorized;