ソースを参照

chore : add hrad code for block

chenshuai2144 6 年 前
コミット
5af5ff2f52
2 ファイル変更7 行追加4 行削除
  1. 1 4
      src/typings.d.ts
  2. 6 0
      src/utils/Authorized.ts

+ 1 - 4
src/typings.d.ts

@@ -11,10 +11,6 @@ declare module '*.gif';
 declare module '*.bmp';
 declare module '*.bmp';
 declare module '*.tiff';
 declare module '*.tiff';
 declare module 'omit.js';
 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
 // google analytics interface
 interface GAFieldsObject {
 interface GAFieldsObject {
@@ -30,6 +26,7 @@ interface Window {
     hitType: 'event' | 'pageview',
     hitType: 'event' | 'pageview',
     fieldsObject: GAFieldsObject | string,
     fieldsObject: GAFieldsObject | string,
   ) => void;
   ) => void;
+  reloadAuthorized: () => void;
 }
 }
 
 
 declare let ga: Function;
 declare let ga: Function;

+ 6 - 0
src/utils/Authorized.ts

@@ -9,5 +9,11 @@ const reloadAuthorized = (): void => {
   Authorized = RenderAuthorize(getAuthority());
   Authorized = RenderAuthorize(getAuthority());
 };
 };
 
 
+/**
+ * hard code
+ * block need it。
+ */
+window.reloadAuthorized = reloadAuthorized;
+
 export { reloadAuthorized };
 export { reloadAuthorized };
 export default Authorized;
 export default Authorized;