cfel-base-components 1.0.3 → 1.0.5
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/demo/src/index.jsx
CHANGED
|
@@ -11,13 +11,9 @@ import PageContainer from '../../src/components/base-component/PageContainer';
|
|
|
11
11
|
// import RoleInfo from '../../src/components/universal-pages/roleInfo';
|
|
12
12
|
|
|
13
13
|
const App = () => {
|
|
14
|
-
return <
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</PageContainer>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
return <PageContainer className={"aaa"}>
|
|
15
|
+
123
|
|
16
|
+
</PageContainer>
|
|
21
17
|
}
|
|
22
18
|
const container = document.getElementById('root');
|
|
23
19
|
const root = createRoot(container);
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// This file is generated by Umi automatically
|
|
3
|
+
// DO NOT CHANGE IT MANUALLY!
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { HelmetProvider } from '/Users/wujingang/Desktop/workspace/base-components/node_modules/@umijs/renderer-react';
|
|
6
|
+
import { context } from './helmetContext';
|
|
7
|
+
|
|
8
|
+
export const innerProvider = (container) => {
|
|
9
|
+
return React.createElement(HelmetProvider, { context }, container);
|
|
10
|
+
}
|
package/src/index.tsx
CHANGED
|
@@ -10,6 +10,8 @@ import Role from './components/universal-pages/role'
|
|
|
10
10
|
import RoleInfo from './components/universal-pages/roleInfo'
|
|
11
11
|
import request from './apiRequest/config'
|
|
12
12
|
import iotRequest from './apiRequest/iotConfig'
|
|
13
|
+
import { hosts } from './apiRequest/hosts'
|
|
14
|
+
|
|
13
15
|
import { getUrlParams, downloadFile, timeFormatter } from './utils/index'
|
|
14
16
|
export {
|
|
15
17
|
LiosLayout,
|
|
@@ -23,10 +25,11 @@ export {
|
|
|
23
25
|
AccountInfo,
|
|
24
26
|
Role,
|
|
25
27
|
RoleInfo,
|
|
26
|
-
|
|
28
|
+
|
|
27
29
|
request,
|
|
28
30
|
iotRequest,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
hosts,
|
|
32
|
+
getUrlParams,
|
|
33
|
+
downloadFile,
|
|
31
34
|
timeFormatter
|
|
32
35
|
}
|
package/src/utils/index.ts
CHANGED
|
@@ -5,13 +5,13 @@ 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) => {
|
|
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
|
-
method: 'post',
|
|
14
|
+
method: method || 'post',
|
|
15
15
|
}).then(res => res.blob()).then((blob) => {
|
|
16
16
|
link.href = URL.createObjectURL(blob);
|
|
17
17
|
link.download = name + "." + (suffix || 'xlsx');
|