ls-pro-common 3.1.28 → 3.1.30
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/dist/common.js +1 -1
- package/dist/common.min.js +1 -1
- package/es/components/index.d.ts +21 -0
- package/es/components/index.js +21 -0
- package/es/hooks/index.d.ts +13 -0
- package/es/hooks/index.js +13 -0
- package/es/http/index.js +33 -22
- package/es/http/mdmRequest.js +2 -2
- package/es/index.d.ts +21 -43
- package/es/index.js +16 -37
- package/es/utils/index.d.ts +4 -3
- package/es/utils/index.js +6 -1
- package/lib/components/index.d.ts +21 -0
- package/lib/components/index.js +21 -0
- package/lib/hooks/index.d.ts +13 -0
- package/lib/hooks/index.js +13 -0
- package/lib/http/index.js +33 -22
- package/lib/http/mdmRequest.js +2 -2
- package/lib/index.d.ts +21 -43
- package/lib/index.js +16 -37
- package/lib/utils/index.d.ts +4 -3
- package/lib/utils/index.js +6 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,46 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import IconQuestion from './components/IconQuestion';
|
|
16
|
-
import IconBell from './components/IconBell';
|
|
17
|
-
import IconSearch from './components/IconSearch';
|
|
18
|
-
import TagCheck from './components/TagCheck';
|
|
19
|
-
import ViewOffice from './components/ViewOffice';
|
|
20
|
-
import ProButton from './components/ProButton';
|
|
21
|
-
import RecordLog from './components/RecordLog';
|
|
22
|
-
import request, { httpGet, httpPut, httpPost, httpDelete, getDict, fetchOptions, httpBatchGet, httpBatchPost, getResourceRight } from './http';
|
|
23
|
-
import BaseService from './service/BaseService';
|
|
1
|
+
/** 组件 */
|
|
2
|
+
export * from './components';
|
|
3
|
+
/** Hooks */
|
|
4
|
+
export * from './hooks';
|
|
5
|
+
/** Http请求 */
|
|
6
|
+
export { default as request } from './http';
|
|
7
|
+
export * from './http';
|
|
8
|
+
/** 基础服务 */
|
|
9
|
+
export { default as BaseService } from './service/BaseService';
|
|
10
|
+
/** 导出进度及完成后自动下载 */
|
|
11
|
+
export { default as exportProcess } from './utils/exportProcess';
|
|
12
|
+
/** Utils 方法,放在第一层级,方便调用 */
|
|
13
|
+
export * from './utils';
|
|
14
|
+
/** 主数据请求 */
|
|
24
15
|
import * as mdmRequest from './http/mdmRequest';
|
|
16
|
+
/** Utils 对象 */
|
|
25
17
|
import * as utils from './utils';
|
|
26
|
-
|
|
27
|
-
/** Hooks */
|
|
28
|
-
import useSingle from './hooks/useSingle';
|
|
29
|
-
import useDtl from './hooks/useDtl';
|
|
30
|
-
import usePermission from './hooks/usePermission';
|
|
31
|
-
import useGetState from './hooks/useGetState';
|
|
32
|
-
import useFilterLocal from './hooks/useFilterBack';
|
|
33
|
-
import useBaseDict from './hooks/useBaseDict';
|
|
34
|
-
import useSelectOptions from './hooks/useSelectOptions';
|
|
35
|
-
import showConfirmFun from './hooks/useShowConfirm';
|
|
36
|
-
import useQueue from './hooks/useQueue';
|
|
37
|
-
import { useDict } from './hooks/useDict';
|
|
38
|
-
import useMdm from './hooks/useMdm';
|
|
18
|
+
export { utils, mdmRequest };
|
|
39
19
|
/** Type */
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export type { ApiResponse, TableToolbar, BaseApiType, MethodType, DtlLyaoutProps, DescritionCardProps, PermissionProps, TDict, };
|
|
46
|
-
export { DtlLayout, InputTable, Page404, Loading, IconSelector, ImageSelector, InputMultiLine, AreaCascader, AreaCascaderPanel, DescritionCard, Permission, GroupTip, ViewOffice, IconBack, IconText, IconBell, IconQuestion, IconSearch, TagCheck, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, httpBatchGet, httpBatchPost, getResourceRight, utils, useSingle, useDtl, usePermission, useGetState, useFilterLocal, useQueue, useBaseDict, useSelectOptions, useDict, useMdm, showConfirmFun, exportProcess, mdmRequest, ProButton, RecordLog, };
|
|
20
|
+
export type { ApiResponse, TableToolbar, BaseApiType, MethodType } from './typing';
|
|
21
|
+
export type { DtlLyaoutProps } from './components/DtlLayout';
|
|
22
|
+
export type { DescritionCardProps } from './components/DescritionCard';
|
|
23
|
+
export type { PermissionProps } from './components/Permission';
|
|
24
|
+
export type { TDict } from './hooks/useDict';
|
package/lib/index.js
CHANGED
|
@@ -1,39 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import IconQuestion from './components/IconQuestion';
|
|
16
|
-
import IconBell from './components/IconBell';
|
|
17
|
-
import IconSearch from './components/IconSearch';
|
|
18
|
-
import TagCheck from './components/TagCheck';
|
|
19
|
-
import ViewOffice from './components/ViewOffice';
|
|
20
|
-
import ProButton from './components/ProButton';
|
|
21
|
-
import RecordLog from './components/RecordLog';
|
|
22
|
-
import request, { httpGet, httpPut, httpPost, httpDelete, getDict, fetchOptions, httpBatchGet, httpBatchPost, getResourceRight } from './http';
|
|
23
|
-
import BaseService from './service/BaseService';
|
|
1
|
+
/** 组件 */
|
|
2
|
+
export * from './components';
|
|
3
|
+
/** Hooks */
|
|
4
|
+
export * from './hooks';
|
|
5
|
+
/** Http请求 */
|
|
6
|
+
export { default as request } from './http';
|
|
7
|
+
export * from './http';
|
|
8
|
+
/** 基础服务 */
|
|
9
|
+
export { default as BaseService } from './service/BaseService';
|
|
10
|
+
/** 导出进度及完成后自动下载 */
|
|
11
|
+
export { default as exportProcess } from './utils/exportProcess';
|
|
12
|
+
/** Utils 方法,放在第一层级,方便调用 */
|
|
13
|
+
export * from './utils';
|
|
14
|
+
/** 主数据请求 */
|
|
24
15
|
import * as mdmRequest from './http/mdmRequest';
|
|
16
|
+
/** Utils 对象 */
|
|
25
17
|
import * as utils from './utils';
|
|
26
|
-
|
|
27
|
-
/** Hooks */
|
|
28
|
-
import useSingle from './hooks/useSingle';
|
|
29
|
-
import useDtl from './hooks/useDtl';
|
|
30
|
-
import usePermission from './hooks/usePermission';
|
|
31
|
-
import useGetState from './hooks/useGetState';
|
|
32
|
-
import useFilterLocal from './hooks/useFilterBack';
|
|
33
|
-
import useBaseDict from './hooks/useBaseDict';
|
|
34
|
-
import useSelectOptions from './hooks/useSelectOptions';
|
|
35
|
-
import showConfirmFun from './hooks/useShowConfirm';
|
|
36
|
-
import useQueue from './hooks/useQueue';
|
|
37
|
-
import { useDict } from './hooks/useDict';
|
|
38
|
-
import useMdm from './hooks/useMdm';
|
|
39
|
-
export { DtlLayout, InputTable, Page404, Loading, IconSelector, ImageSelector, InputMultiLine, AreaCascader, AreaCascaderPanel, DescritionCard, Permission, GroupTip, ViewOffice, IconBack, IconText, IconBell, IconQuestion, IconSearch, TagCheck, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, httpBatchGet, httpBatchPost, getResourceRight, utils, useSingle, useDtl, usePermission, useGetState, useFilterLocal, useQueue, useBaseDict, useSelectOptions, useDict, useMdm, showConfirmFun, exportProcess, mdmRequest, ProButton, RecordLog };
|
|
18
|
+
export { utils, mdmRequest };
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -75,14 +75,14 @@ export declare const setCache: (key: string, data: any, session?: boolean) => vo
|
|
|
75
75
|
* @param {boolean} session 从 sessionStorage 取数还是从 localStorage 中取数 默认从 localStorage
|
|
76
76
|
* @returns 关键字对应的值
|
|
77
77
|
*/
|
|
78
|
-
export declare const getCache:
|
|
78
|
+
export declare const getCache: any;
|
|
79
79
|
/**
|
|
80
80
|
* 读取本地缓存,优先从sessionStorage 取,取不到时再从 localStorage取
|
|
81
81
|
*
|
|
82
82
|
* @param key
|
|
83
83
|
* @returns
|
|
84
84
|
*/
|
|
85
|
-
export declare const getCacheSessionFirst: (key: string) =>
|
|
85
|
+
export declare const getCacheSessionFirst: (key: string) => any;
|
|
86
86
|
/**
|
|
87
87
|
* @param key 关键字,不传清除所有
|
|
88
88
|
* @param session 是否session storage , 默认 localStorage
|
|
@@ -226,5 +226,6 @@ export declare const urlDownloadDomain: (url: string) => string;
|
|
|
226
226
|
*
|
|
227
227
|
* @param url 文件地址
|
|
228
228
|
* @param fileName 文件名
|
|
229
|
+
* @param isBlank 是否新开窗口下载,默认新开窗口,不影响原页面展示
|
|
229
230
|
*/
|
|
230
|
-
export declare const downloadFile: (url: string, fileName?: string | undefined) => void;
|
|
231
|
+
export declare const downloadFile: (url: string, fileName?: string | undefined, isBlank?: boolean) => void;
|
package/lib/utils/index.js
CHANGED
|
@@ -493,12 +493,17 @@ export var urlDownloadDomain = function urlDownloadDomain(url) {
|
|
|
493
493
|
*
|
|
494
494
|
* @param url 文件地址
|
|
495
495
|
* @param fileName 文件名
|
|
496
|
+
* @param isBlank 是否新开窗口下载,默认新开窗口,不影响原页面展示
|
|
496
497
|
*/
|
|
497
498
|
export var downloadFile = function downloadFile(url, fileName) {
|
|
499
|
+
var isBlank = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
498
500
|
var a = document.createElement('a');
|
|
499
501
|
url = urlDownloadDomain(url);
|
|
500
502
|
a.href = url;
|
|
501
|
-
|
|
503
|
+
if (isBlank) {
|
|
504
|
+
a.target = '_blank'; // 新开屏有闪烁,但不会导致下载文件不存在或无法访问时原始页面出错。
|
|
505
|
+
}
|
|
506
|
+
|
|
502
507
|
if (fileName) {
|
|
503
508
|
a.setAttribute('download', fileName);
|
|
504
509
|
}
|