xframelib 0.8.1 → 0.8.2

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.
@@ -1,4 +1,4 @@
1
- export type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
1
+ import { ResponseType } from 'axios';
2
2
  /**
3
3
  * Get服务请求
4
4
  * @param apiUrl API接口路径
@@ -56,3 +56,4 @@ declare function post(apiUrl: string, _params?: any): Promise<any>;
56
56
  */
57
57
  declare function getData(fullRequestURL: string, _params?: any): Promise<any>;
58
58
  export { get, post, requestPost, requestGet, getData, requestPostBody };
59
+ export type { ResponseType };
@@ -24,9 +24,10 @@ declare const JsonDownload: (jsonObject: object, jsonID: string) => void;
24
24
  */
25
25
  declare const HttpDownload: (axios: any, requestUrl: string, fileName: string) => void;
26
26
  /**
27
- * 根据文件地址下载文件
28
- * (网站内部文件或外部图片地址)
27
+ * 只能下图片(无法解决跨域,建议:少用)
28
+ * (网站内部或外部图片地址)
29
29
  * @param {*} sUrl
30
+ * @deprecated 不建议使用,只能下图片
30
31
  */
31
32
  declare function DownloadByUrl({ url, target, fileName }: {
32
33
  url: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xframelib",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "积累的前端开发基础库",
5
5
  "main": "dist/index.js",
6
6
  "common": "dist/index.cjs",
@@ -21,6 +21,11 @@
21
21
  "name": "zorrowm",
22
22
  "email": "zorrowm@126.com"
23
23
  },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/zorrowm/vue-widget-template.git"
27
+ },
28
+ "homepage": "https://zorrowm.github.io",
24
29
  "license": "MIT",
25
30
  "dependencies": {
26
31
  "@hprose/io": "^3.0.10",
@@ -38,26 +43,26 @@
38
43
  },
39
44
  "devDependencies": {
40
45
  "@rollup/plugin-alias": "^5.1.1",
41
- "@rollup/plugin-commonjs": "^28.0.0",
46
+ "@rollup/plugin-commonjs": "^28.0.1",
42
47
  "@rollup/plugin-json": "^6.1.0",
43
48
  "@rollup/plugin-node-resolve": "^15.3.0",
44
- "@rollup/plugin-typescript": "^12.1.0",
49
+ "@rollup/plugin-typescript": "^12.1.1",
45
50
  "@types/streamsaver": "^2.0.5",
46
51
  "@vitejs/plugin-vue": "^5.1.4",
47
52
  "@vue/compiler-sfc": "^3.5.12",
48
53
  "esbuild": "^0.24.0",
49
- "rimraf": "^5.0.10",
54
+ "rimraf": "^6.0.1",
50
55
  "rollup-plugin-copy": "^3.5.0",
51
56
  "rollup-plugin-esbuild": "^6.1.1",
52
57
  "rollup-plugin-scss": "^4.0.0",
53
58
  "rollup-plugin-terser": "^7.0.2",
54
59
  "rollup-plugin-typescript2": "^0.36.0",
55
60
  "rollup-plugin-vue": "^6.0.0",
56
- "sass": "^1.79.5",
61
+ "sass": "^1.80.6",
57
62
  "typescript": "^5.6.3",
58
- "vite": "^5.4.8",
63
+ "vite": "^5.4.10",
59
64
  "vue": "^3.5.12",
60
65
  "vue-router": "^4.4.5",
61
- "vue-tsc": "^2.1.6"
66
+ "vue-tsc": "^2.1.10"
62
67
  }
63
68
  }
@@ -1,67 +0,0 @@
1
- /** WSynchro object to synchronize windows
2
- * - windows: array of windows to synchro (
3
- * - source: the window source (undefined if first window)
4
- */
5
- if (!window.WSynchro) {
6
- var WSynchro = { windows: [] };
7
- }
8
- /** Open a new window to synchronize
9
- * @param {url|undefined} url to open, default current window url
10
- * @param {specs|undefined|null} specs (as for window.open), undefined to open in a new window, null to open in a new tab, default new window
11
- */
12
- WSynchro.open = function (href, specs)
13
- { var w = window.open (href || window.location.href, "_blank", typeof(specs)=="undefined"? "location=1,menubar=1,toolbar=1,scrollbars=1" : specs);
14
- if (!w.WSynchro) w.WSynchro = { windows: [ window ], source:window };
15
- else
16
- { w.WSynchro.windows = [ window ];
17
- w.WSynchro.source = window;
18
- }
19
- this.windows.push(w);
20
- }
21
- /** Trigger function
22
- * @param {synchronize}
23
- * @param {function} synchronize function
24
- */
25
- WSynchro.on = function (e, syncFn)
26
- { if (!this.syncFn_) this.syncFn_ = [];
27
- if (e==='synchronize') this.syncFn_.push(syncFn);
28
- }
29
- /** Synchronize windows
30
- * @param {Object|undefined} if undefined stop synchro (when the window is synchronize)
31
- */
32
- WSynchro.synchronize = function(params)
33
- { this.synchronize_ (params);
34
- }
35
- /** Synchronize windows:
36
- * @param {Array} array of arguments to use with fn
37
- * @param {} internal syncrho time to avoid stnchro loops
38
- * @private
39
- */
40
- WSynchro.synchronize_ = function(args, sync) {
41
- var i;
42
- // Stop condition
43
- if (!sync)
44
- { if (this.synchronizing) sync = this.sync;
45
- else this.sync = sync = (new Date()).getTime();
46
- this.synchronizing = false;
47
- }
48
- else
49
- { // Don't synchronize twice
50
- if (sync == this.sync) return;
51
- this.sync = sync;
52
- this.synchronizing = true;
53
- try
54
- { if (WSynchro.syncFn_)
55
- { args.type = "synchronize";
56
- for (i=0; i<WSynchro.syncFn_.length; i++)
57
- { WSynchro.syncFn_[i].apply (null, [args]);
58
- }
59
- }
60
- } catch(e) { /* */ }
61
- }
62
- if (args) for (i=0; i<this.windows.length; i++)
63
- { try
64
- { this.windows[i].WSynchro.synchronize_(args, sync);
65
- } catch(e) { /* */ }
66
- }
67
- }