cfel-base-components 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cfel-base-components",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "cfel-base-components",
5
5
  "main": "/src/index.tsx",
6
6
  "types": "src/index.d.ts",
@@ -7,6 +7,7 @@ import { get } from 'lodash';
7
7
  import { Modal, Button, Divider, Descriptions, Space, message, Avatar } from 'antd';
8
8
  import { UserOutlined } from '@ant-design/icons';
9
9
  import EditAccountDrawer from './EditAccountDrawer/index'
10
+ import useTableHooks from "../../../hooks/useTableHooks"
10
11
  import { timeFormatter, getUrlParams } from '../../../utils';
11
12
  import {
12
13
  getAccount,
@@ -5,13 +5,16 @@ export const getUrlParams = (id: string) => {
5
5
  return params.get(id) || ""
6
6
  }
7
7
 
8
- export const downloadFile = (url: string, name: string, suffix?: string,method?:string) => {
8
+ export const downloadFile = (url: string, name: string, suffix?: string, method?:string) => {
9
9
  if (!url || !name) return
10
10
  const link = document.createElement('a');
11
11
  link.target = '_blank'
12
12
  link.style.display = 'none';
13
13
  fetch(url, {
14
14
  method: method || 'post',
15
+ headers: {
16
+ "cfel-token": (window as any)?.g_config?.token
17
+ },
15
18
  }).then(res => res.blob()).then((blob) => {
16
19
  link.href = URL.createObjectURL(blob);
17
20
  link.download = name + "." + (suffix || 'xlsx');