xframelib 0.8.4 → 0.8.6
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/README.md +2 -0
- package/dist/core/IModel.d.ts +1 -1
- package/dist/core/MsgHelper.d.ts +1 -1
- package/dist/core/SysEvents.d.ts +7 -0
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/utils/AxiosHelper.d.ts +16 -5
- package/dist/utils/FileDownload.d.ts +1 -0
- package/dist/utils/StringUtils.d.ts +5 -0
- package/package.json +68 -68
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResponseType } from
|
|
1
|
+
import { ResponseType } from "axios";
|
|
2
2
|
/**
|
|
3
3
|
* Get服务请求
|
|
4
4
|
* @param apiUrl API接口路径
|
|
@@ -35,12 +35,13 @@ declare function requestPost(apiUrl: string, baseUrl?: string, _bodyFormParams?:
|
|
|
35
35
|
*/
|
|
36
36
|
declare function requestPostBody(apiUrl: string, baseUrl?: string, _bodyParams?: any, _queryParams?: any, headers?: any, responseType?: ResponseType, timeoutMS?: number): Promise<any>;
|
|
37
37
|
/**
|
|
38
|
-
* 业务服务Get
|
|
39
|
-
* @param
|
|
38
|
+
* 业务服务Get请求、请求网站下资源、http完整请求
|
|
39
|
+
* @param url public下资源相对路径
|
|
40
40
|
* @param _params 参数
|
|
41
|
+
* @param isForceAPI 是否强制为API请求,默认false
|
|
41
42
|
* @returns 返回Promise对象
|
|
42
43
|
*/
|
|
43
|
-
declare function get(
|
|
44
|
+
declare function get(url: string, _params?: any, isForceAPI?: boolean): Promise<any>;
|
|
44
45
|
/**
|
|
45
46
|
* 业务服务Post请求
|
|
46
47
|
* @param apiUrl API接口路径
|
|
@@ -53,7 +54,17 @@ declare function post(apiUrl: string, _params?: any): Promise<any>;
|
|
|
53
54
|
* @param fullRequestURL 完整请求路径
|
|
54
55
|
* @param _params 请求参数
|
|
55
56
|
* @returns 返回Promise对象
|
|
57
|
+
* @deprecated 使用get方法替代,日后删除
|
|
56
58
|
*/
|
|
57
59
|
declare function getData(fullRequestURL: string, _params?: any): Promise<any>;
|
|
58
|
-
|
|
60
|
+
/**
|
|
61
|
+
* 下载网站或完整路径的文件(二进制、文本)
|
|
62
|
+
* @param url 网站相对路径或完整路径
|
|
63
|
+
* @param fileName 文件名(默认为空,从URL里截取)
|
|
64
|
+
* @param _params get请求参数
|
|
65
|
+
* @param responseType 返回类型,默认为blob,可以改为arraybuffer\text\json
|
|
66
|
+
* @returns
|
|
67
|
+
*/
|
|
68
|
+
declare function getDownload(url: string, fileName?: string, _params?: any, responseType?: ResponseType): void;
|
|
69
|
+
export { get, post, requestPost, requestGet, getData, requestPostBody, getDownload };
|
|
59
70
|
export type { ResponseType };
|
|
@@ -21,6 +21,7 @@ declare const JsonDownload: (jsonObject: object, jsonID: string) => void;
|
|
|
21
21
|
* (通过axios下载)
|
|
22
22
|
* @param requestUrl URL下载地址
|
|
23
23
|
* @param fileName 文件名
|
|
24
|
+
* @deprecated 废弃,请使用getDownload方法替换
|
|
24
25
|
*/
|
|
25
26
|
declare const HttpDownload: (axios: any, requestUrl: string, fileName: string) => void;
|
|
26
27
|
export { Download, SaveAs, JsonDownload, HttpDownload };
|
package/package.json
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "xframelib",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "积累的前端开发基础库",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"common": "dist/index.cjs",
|
|
7
|
-
"typings": "dist/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"dev": "vite --port 8099",
|
|
10
|
-
"build": "vite build",
|
|
11
|
-
"lib": "rollup -c ",
|
|
12
|
-
"serve": "vite preview",
|
|
13
|
-
"clean": "rimraf dist && rimraf package-lock.json && rimraf node_modules/.cache && rimraf node_modules/.vite"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"hprose",
|
|
17
|
-
"rpc",
|
|
18
|
-
"typescript"
|
|
19
|
-
],
|
|
20
|
-
"author": {
|
|
21
|
-
"name": "zorrowm",
|
|
22
|
-
"email": "zorrowm@126.com"
|
|
23
|
-
},
|
|
24
|
-
"repository": {
|
|
25
|
-
"type": "git",
|
|
26
|
-
"url": "https://github.com/zorrowm/vue-widget-template.git"
|
|
27
|
-
},
|
|
28
|
-
"homepage": "https://zorrowm.github.io/doc/template.html",
|
|
29
|
-
"license": "MIT",
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"@hprose/io": "^3.0.10",
|
|
32
|
-
"@hprose/rpc-core": "^3.0.10",
|
|
33
|
-
"@hprose/rpc-html5": "^3.0.10",
|
|
34
|
-
"@iconify/vue": "^4.
|
|
35
|
-
"@microsoft/signalr": "^8.0.7",
|
|
36
|
-
"axios": "^1.7.9",
|
|
37
|
-
"localforage": "^1.10.0",
|
|
38
|
-
"loglevel": "^1.9.2",
|
|
39
|
-
"qs": "^6.13.1",
|
|
40
|
-
"spark-md5": "^3.0.2",
|
|
41
|
-
"streamsaver": "^2.0.6",
|
|
42
|
-
"xhr": "^2.6.0"
|
|
43
|
-
},
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"@rollup/plugin-alias": "^5.1.1",
|
|
46
|
-
"@rollup/plugin-commonjs": "^28.0.1",
|
|
47
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
48
|
-
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
49
|
-
"@rollup/plugin-typescript": "^12.1.1",
|
|
50
|
-
"@types/streamsaver": "^2.0.5",
|
|
51
|
-
"@vitejs/plugin-vue": "^5.2.1",
|
|
52
|
-
"@vue/compiler-sfc": "^3.5.13",
|
|
53
|
-
"esbuild": "^0.24.0",
|
|
54
|
-
"rimraf": "^6.0.1",
|
|
55
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
56
|
-
"rollup-plugin-esbuild": "^6.1.1",
|
|
57
|
-
"rollup-plugin-scss": "^4.0.0",
|
|
58
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
59
|
-
"rollup-plugin-typescript2": "^0.36.0",
|
|
60
|
-
"rollup-plugin-vue": "^6.0.0",
|
|
61
|
-
"sass": "^1.82.0",
|
|
62
|
-
"typescript": "^5.7.2",
|
|
63
|
-
"vite": "^6.0.
|
|
64
|
-
"vue": "^3.5.13",
|
|
65
|
-
"vue-router": "^4.5.0",
|
|
66
|
-
"vue-tsc": "^2.1.10"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "xframelib",
|
|
3
|
+
"version": "0.8.6",
|
|
4
|
+
"description": "积累的前端开发基础库",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"common": "dist/index.cjs",
|
|
7
|
+
"typings": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "vite --port 8099",
|
|
10
|
+
"build": "vite build",
|
|
11
|
+
"lib": "rollup -c ",
|
|
12
|
+
"serve": "vite preview",
|
|
13
|
+
"clean": "rimraf dist && rimraf package-lock.json && rimraf node_modules/.cache && rimraf node_modules/.vite"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"hprose",
|
|
17
|
+
"rpc",
|
|
18
|
+
"typescript"
|
|
19
|
+
],
|
|
20
|
+
"author": {
|
|
21
|
+
"name": "zorrowm",
|
|
22
|
+
"email": "zorrowm@126.com"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/zorrowm/vue-widget-template.git"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://zorrowm.github.io/doc/template.html",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@hprose/io": "^3.0.10",
|
|
32
|
+
"@hprose/rpc-core": "^3.0.10",
|
|
33
|
+
"@hprose/rpc-html5": "^3.0.10",
|
|
34
|
+
"@iconify/vue": "^4.2.0",
|
|
35
|
+
"@microsoft/signalr": "^8.0.7",
|
|
36
|
+
"axios": "^1.7.9",
|
|
37
|
+
"localforage": "^1.10.0",
|
|
38
|
+
"loglevel": "^1.9.2",
|
|
39
|
+
"qs": "^6.13.1",
|
|
40
|
+
"spark-md5": "^3.0.2",
|
|
41
|
+
"streamsaver": "^2.0.6",
|
|
42
|
+
"xhr": "^2.6.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@rollup/plugin-alias": "^5.1.1",
|
|
46
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
47
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
48
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
49
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
50
|
+
"@types/streamsaver": "^2.0.5",
|
|
51
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
52
|
+
"@vue/compiler-sfc": "^3.5.13",
|
|
53
|
+
"esbuild": "^0.24.0",
|
|
54
|
+
"rimraf": "^6.0.1",
|
|
55
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
56
|
+
"rollup-plugin-esbuild": "^6.1.1",
|
|
57
|
+
"rollup-plugin-scss": "^4.0.0",
|
|
58
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
59
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
60
|
+
"rollup-plugin-vue": "^6.0.0",
|
|
61
|
+
"sass": "^1.82.0",
|
|
62
|
+
"typescript": "^5.7.2",
|
|
63
|
+
"vite": "^6.0.3",
|
|
64
|
+
"vue": "^3.5.13",
|
|
65
|
+
"vue-router": "^4.5.0",
|
|
66
|
+
"vue-tsc": "^2.1.10"
|
|
67
|
+
}
|
|
68
|
+
}
|