xframelib 0.8.1 → 0.8.3

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 CHANGED
@@ -8,11 +8,13 @@
8
8
  <img src="https://img.shields.io/npm/dt/xframelib?logo=npm"/>
9
9
  </a>
10
10
  </p>
11
- ## XFramelib前端基础库
12
11
 
13
- > 基于 VUE3+Hprose+Typescript 的前端框架,与ElementUI、AntDesign VUE、Quasar等界面库无关,一直是来源于项目和服务于项目。
12
+ ## XFramelib前端基础库
14
13
 
14
+ > 基于 VUE3+Hprose+Typescript+Widget 的前端框架,与ElementUI、AntDesign VUE、Quasar等界面库无关,一直是来源于项目和服务于项目。
15
15
 
16
+ - v0.8.3 增加HproseRPC过程的请求字符串和返回字符串的外部解码类HproseRPCCodec;
17
+ - v0.8.2 修改VueWindow组件(VWindow)拖动定位错误;弃用DownloadByUrl方法;移除窗体同步库WSynchro.js;更新依赖库版本;
16
18
  - v0.8.1 修改RouterTransition组件,增加具有默认动画的RouterTransitionAnimate组件;widget组件配置对象(IWidgetConfig)启用layout属性(IWidgetLayout布局样式),增加cssClass外部配置样式类名;更新依赖库版本;
17
19
  - v0.8.0 更新LayoutContainer各层的默认样式,默认空白区域鼠标可以穿越,各元素鼠标可点击;更新依赖库版本;
18
20
  - *v0.7.9 给H5Tool增加常用DOM操作方法;为SysEvents增加LayoutContainerLoaded,每个LayoutManager对象自动加载到Global.LayoutMap里,为Global默认增加CesiumViewer对象;强化Widget链式排队加载,必须先afterid对应的widget加载成功,然后才加载当前widget。
@@ -1,2 +1,55 @@
1
1
  export declare function serialize(value: unknown): string;
2
2
  export declare function deserialize(value: string): any;
3
+ export interface IHttpRPCHeaders {
4
+ [name: string]: any;
5
+ }
6
+ /**
7
+ * 用于HproseRPC过程的的前端请求和返回值的界面
8
+ * 参考RPC协议:https://github.com/hprose/hprose/tree/master/3.0
9
+ */
10
+ export declare class HproseRPCCodec {
11
+ private debug;
12
+ private simple;
13
+ private utc;
14
+ private longType;
15
+ private dictType;
16
+ private nullType;
17
+ static Instance: HproseRPCCodec;
18
+ private textEncoder;
19
+ private textDecoder;
20
+ constructor();
21
+ /**
22
+ * 编码返回结果
23
+ * 服务器处理
24
+ * @param result
25
+ * @param responseHeaders
26
+ * @returns
27
+ */
28
+ encodeResponse(result: any, responseHeaders?: IHttpRPCHeaders): string;
29
+ /**
30
+ * 解码 前端请求字符串
31
+ * 服务端
32
+ * @param requestStr
33
+ * @param resquestHeaders
34
+ * @returns
35
+ */
36
+ decodeRequest(requestStr: string, resquestHeaders?: IHttpRPCHeaders): Array<any>;
37
+ private decodeArguments;
38
+ /**
39
+ * 编码前端请求方法+参数
40
+ * 客户端处理
41
+ * @param name
42
+ * @param args
43
+ * @param requestHeaders
44
+ * @returns
45
+ */
46
+ encodeRequest(name: string, args: Array<any>, requestHeaders?: IHttpRPCHeaders): string;
47
+ /**
48
+ * 解码服务端返回结果编码字符串
49
+ * 客户端处理
50
+ * @param response
51
+ * @param responseHeaders
52
+ * @returns
53
+ */
54
+ decodeResponse(responseResult: any, responseHeaders?: IHttpRPCHeaders): any;
55
+ }
@@ -1,6 +1,6 @@
1
1
  import ProxyClient from './ProxyClient';
2
2
  import HproseClient from './HproseClient';
3
- import { deserialize, serialize } from './HproseIO';
3
+ import { deserialize, serialize, IHttpRPCHeaders, HproseRPCCodec } from './HproseIO';
4
4
  export interface GIHprose {
5
5
  getDefaultClient(): ProxyClient;
6
6
  registerHprose(hpClientName: string, hproseUrl: string): HproseClient | undefined;
@@ -9,4 +9,5 @@ export interface GIHprose {
9
9
  unregisterHprose(hpClientName: string): void;
10
10
  }
11
11
  declare const GlobalHprose: GIHprose;
12
- export { GlobalHprose, ProxyClient, HproseClient, deserialize, serialize };
12
+ export { GlobalHprose, ProxyClient, HproseClient, deserialize, serialize, HproseRPCCodec };
13
+ export type { IHttpRPCHeaders };