yxuse 2.0.34 → 2.0.36
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 +46 -548
- package/lib/api.cjs.js +2 -1
- package/lib/api.cjs.js.map +1 -0
- package/lib/api.es.js +5 -4
- package/lib/api.es.js.map +1 -0
- package/lib/app.cjs.js +2 -1
- package/lib/app.cjs.js.map +1 -0
- package/lib/app.es.js +2 -1
- package/lib/app.es.js.map +1 -0
- package/lib/components.cjs.js +2 -1
- package/lib/components.cjs.js.map +1 -0
- package/lib/components.es.js +9 -6
- package/lib/components.es.js.map +1 -0
- package/lib/dayjs.min.cjs.js +2 -0
- package/lib/dayjs.min.cjs.js.map +1 -0
- package/lib/dayjs.min.es.js +313 -0
- package/lib/dayjs.min.es.js.gz +0 -0
- package/lib/dayjs.min.es.js.map +1 -0
- package/lib/directives.cjs.js +2 -1
- package/lib/directives.cjs.js.map +1 -0
- package/lib/directives.es.js +2 -1
- package/lib/directives.es.js.map +1 -0
- package/lib/hooks.cjs.js +2 -1
- package/lib/hooks.cjs.js.map +1 -0
- package/lib/hooks.es.js +2 -1
- package/lib/hooks.es.js.map +1 -0
- package/lib/index.cjs.js +2 -1
- package/lib/index.cjs.js.map +1 -0
- package/lib/index.cjs10.js +2 -1
- package/lib/index.cjs10.js.map +1 -0
- package/lib/index.cjs11.js +2 -2
- package/lib/index.cjs11.js.map +1 -0
- package/lib/index.cjs12.js +8 -1
- package/lib/index.cjs12.js.gz +0 -0
- package/lib/index.cjs12.js.map +1 -0
- package/lib/index.cjs13.js +2 -1
- package/lib/index.cjs13.js.map +1 -0
- package/lib/index.cjs2.js +2 -1
- package/lib/index.cjs2.js.map +1 -0
- package/lib/index.cjs3.js +2 -1
- package/lib/index.cjs3.js.map +1 -0
- package/lib/index.cjs4.js +2 -1
- package/lib/index.cjs4.js.map +1 -0
- package/lib/index.cjs5.js +7 -5
- package/lib/index.cjs5.js.gz +0 -0
- package/lib/index.cjs5.js.map +1 -0
- package/lib/index.cjs6.js +5 -1
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.cjs6.js.map +1 -0
- package/lib/index.cjs7.js +17 -1
- package/lib/index.cjs7.js.gz +0 -0
- package/lib/index.cjs7.js.map +1 -0
- package/lib/index.cjs8.js +2 -1
- package/lib/index.cjs8.js.map +1 -0
- package/lib/index.cjs9.js +2 -1
- package/lib/index.cjs9.js.map +1 -0
- package/lib/index.es.js +8 -17
- package/lib/index.es.js.map +1 -0
- package/lib/index.es10.js +11 -298
- package/lib/index.es10.js.map +1 -0
- package/lib/index.es11.js +16 -5437
- package/lib/index.es11.js.map +1 -0
- package/lib/index.es12.js +6045 -154
- package/lib/index.es12.js.gz +0 -0
- package/lib/index.es12.js.map +1 -0
- package/lib/index.es13.js +2 -1
- package/lib/index.es13.js.map +1 -0
- package/lib/index.es2.js +334 -3
- package/lib/index.es2.js.map +1 -0
- package/lib/index.es3.js +2 -1
- package/lib/index.es3.js.map +1 -0
- package/lib/index.es4.js +2 -1
- package/lib/index.es4.js.map +1 -0
- package/lib/index.es5.js +14655 -107
- package/lib/index.es5.js.gz +0 -0
- package/lib/index.es5.js.map +1 -0
- package/lib/index.es6.js +20721 -584
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es6.js.map +1 -0
- package/lib/index.es7.js +5415 -17
- package/lib/index.es7.js.gz +0 -0
- package/lib/index.es7.js.map +1 -0
- package/lib/index.es8.js +25 -4
- package/lib/index.es8.js.map +1 -0
- package/lib/index.es9.js +5 -9
- package/lib/index.es9.js.map +1 -0
- package/lib/mqtt.min.cjs.js +2 -0
- package/lib/mqtt.min.cjs.js.gz +0 -0
- package/lib/mqtt.min.cjs.js.map +1 -0
- package/lib/mqtt.min.es.js +7069 -0
- package/lib/mqtt.min.es.js.gz +0 -0
- package/lib/mqtt.min.es.js.map +1 -0
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/lib/theme.cjs.js +2 -1
- package/lib/theme.cjs.js.map +1 -0
- package/lib/theme.es.js +13 -11
- package/lib/theme.es.js.map +1 -0
- package/lib/translate.cjs.js +2 -1
- package/lib/translate.cjs.js.map +1 -0
- package/lib/translate.es.js +13 -6
- package/lib/translate.es.js.map +1 -0
- package/lib/utils.cjs.js +2 -1
- package/lib/utils.cjs.js.map +1 -0
- package/lib/utils.es.js +16 -7
- package/lib/utils.es.js.map +1 -0
- package/lib/vue.runtime.esm-bundler.cjs.js +22 -2
- package/lib/vue.runtime.esm-bundler.cjs.js.gz +0 -0
- package/lib/vue.runtime.esm-bundler.cjs.js.map +1 -0
- package/lib/vue.runtime.esm-bundler.es.js +3633 -2981
- package/lib/vue.runtime.esm-bundler.es.js.gz +0 -0
- package/lib/vue.runtime.esm-bundler.es.js.map +1 -0
- package/lib/yxIcon.cjs.js +2 -1
- package/lib/yxIcon.cjs.js.map +1 -0
- package/lib/yxIcon.es.js +2 -1
- package/lib/yxIcon.es.js.map +1 -0
- package/lib/yxi18n.cjs.js +2 -0
- package/lib/yxi18n.cjs.js.map +1 -0
- package/lib/yxi18n.es.js +6 -0
- package/lib/yxi18n.es.js.map +1 -0
- package/package.json +16 -7
- package/types/api/auth/index.d.ts +4 -2
- package/types/bc/index.d.ts +7 -0
- package/types/components/Common/DynamicComponent/index.vue.d.ts +5 -4
- package/types/components/LogoTitle/index.d.ts +7 -0
- package/types/components/LogoTitle/index.vue.d.ts +38 -0
- package/types/components/LogoTitle/type.d.ts +18 -0
- package/types/components/Toolbar/index.d.ts +1 -0
- package/types/components/Toolbar/src/index.vue.d.ts +1 -1
- package/types/components/Toolbar/src/utils/mounted.d.ts +1 -0
- package/types/components/Update/index.d.ts +1 -1
- package/types/components/Update/index.vue.d.ts +1 -1
- package/types/components/YxDialog/index.d.ts +3 -3
- package/types/components/YxDialog/index.vue.d.ts +4 -3
- package/types/components/YxDrawer/index.d.ts +3 -0
- package/types/components/YxDrawer/index.vue.d.ts +14 -0
- package/types/components/YxDrawer/type.d.ts +18 -0
- package/types/components/YxForm/index.d.ts +3 -3
- package/types/components/YxForm/index.vue.d.ts +47 -0
- package/types/components/YxForm/type.d.ts +79 -0
- package/types/components/YxIcon/index.d.ts +3 -3
- package/types/components/YxIcon/type.d.ts +1 -0
- package/types/components/YxSearchForm/index.d.ts +3 -3
- package/types/components/YxSearchForm/index.vue.d.ts +8 -7
- package/types/components/YxTable/index.d.ts +3 -3
- package/types/components/YxTable/index.vue.d.ts +10 -10
- package/types/components/YxTable/type.d.ts +23 -7
- package/types/components/YxUpload/index.d.ts +3 -3
- package/types/components/YxUpload/index.vue.d.ts +7 -4
- package/types/components/YxUpload/type.d.ts +7 -1
- package/types/components/index.d.ts +10 -9
- package/types/components/type.d.ts +5 -5
- package/types/directives/index.d.ts +2 -1
- package/types/directives/modules/auth.d.ts +2 -1
- package/types/hooks/index.d.ts +1 -1
- package/types/hooks/useTime/index.d.ts +1 -1
- package/types/index.d.ts +12 -12
- package/types/theme/config.d.ts +3 -0
- package/types/theme/index.d.ts +2 -1
- package/types/translate/index.d.ts +3 -1
- package/types/utils/common/index.d.ts +25 -1
- package/types/utils/common/util.d.ts +2 -1
- package/types/utils/excel/index.d.ts +35 -0
- package/types/utils/fecth/index.d.ts +8 -0
- package/types/utils/fecth/interface.d.ts +8 -0
- package/types/utils/http/config.d.ts +1 -0
- package/types/utils/http/index.d.ts +2 -1
- package/types/utils/index.d.ts +6 -3
- package/types/utils/mqtt/index.d.ts +16 -0
- package/types/utils/mqtt/interface.d.ts +17 -0
- package/types/utils/socket/index.d.ts +36 -0
- package/types/utils/socket/interface.d.ts +16 -0
- package/types/yxIcon/index.d.ts +2 -1
- package/types/yxi18n/index.d.ts +2 -4
- package/lib/index.cjs11.js.gz +0 -0
- package/lib/index.es10.js.gz +0 -0
- package/lib/index.es11.js.gz +0 -0
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { YxUploadProps } from './type';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<YxUploadProps>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
4
|
"update:fileObsUrl": (value: string) => void;
|
|
4
|
-
|
|
5
|
+
getFile: (value: any) => void;
|
|
6
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<YxUploadProps>>> & Readonly<{
|
|
5
7
|
"onUpdate:fileObsUrl"?: ((value: string) => any) | undefined;
|
|
6
|
-
|
|
8
|
+
onGetFile?: ((value: any) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
7
10
|
export default _default;
|
|
8
11
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
12
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -2,5 +2,11 @@ export interface YxUploadProps {
|
|
|
2
2
|
/**上传提示 */
|
|
3
3
|
uploadTips?: string;
|
|
4
4
|
/**上传触发器 */
|
|
5
|
-
|
|
5
|
+
triggerRender?: Function;
|
|
6
|
+
/** 是否自定义上传方法 */
|
|
7
|
+
customUpload?: Function;
|
|
8
|
+
/** 上传触发文本 */
|
|
9
|
+
triggerText?: String;
|
|
10
|
+
/** 上传文件接口 */
|
|
11
|
+
uploadResourceApi?: Function;
|
|
6
12
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export
|
|
1
|
+
export * from './YxDialog/index';
|
|
2
|
+
export * from './YxDrawer/index';
|
|
3
|
+
export * from './YxTable/index';
|
|
4
|
+
export * from './YxSearchForm/index';
|
|
5
|
+
export * from './YxForm/index';
|
|
6
|
+
export * from './Update/index';
|
|
7
|
+
export * from './YxIcon/index';
|
|
8
|
+
export * from './YxUpload/index';
|
|
9
|
+
export * from './LogoTitle/index';
|
|
10
|
+
export { default as Toolbar } from './Toolbar/index';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from './YxTable/type';
|
|
2
|
+
export * from './YxSearchForm/type';
|
|
3
|
+
export * from './YxForm/type';
|
|
4
|
+
export * from './YxDialog/type';
|
|
5
|
+
export * from './YxUpload/type';
|
package/types/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './useTime';
|
package/types/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * as utils from
|
|
2
|
-
export * as yxIcon from
|
|
3
|
-
export * as api from
|
|
4
|
-
export * as theme from
|
|
5
|
-
export * as components from
|
|
6
|
-
export * as translate from
|
|
7
|
-
export * as yxi18n from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
1
|
+
export * as utils from './utils';
|
|
2
|
+
export * as yxIcon from './yxIcon';
|
|
3
|
+
export * as api from './api';
|
|
4
|
+
export * as theme from './theme';
|
|
5
|
+
export * as components from './components';
|
|
6
|
+
export * as translate from './translate';
|
|
7
|
+
export * as yxi18n from './yxi18n';
|
|
8
|
+
export * from './directives';
|
|
9
|
+
export * from './hooks';
|
|
10
|
+
export * from './app';
|
|
11
|
+
export * from './bc';
|
|
12
|
+
export * from './components/type';
|
|
13
13
|
import * as utils from "./utils";
|
|
14
14
|
import * as api from "./api";
|
|
15
15
|
import * as theme from "./theme";
|
package/types/theme/config.d.ts
CHANGED
|
@@ -6,9 +6,12 @@ export declare const defaultConfig: {
|
|
|
6
6
|
themeApiUrl: string;
|
|
7
7
|
loginApiUrl: string;
|
|
8
8
|
translateApiUrl: string;
|
|
9
|
+
userConfigApiUrl: string;
|
|
9
10
|
environment: string;
|
|
10
11
|
isRenderToolbar: boolean;
|
|
11
12
|
isRenderIssue: boolean;
|
|
12
13
|
isRenderLang: boolean;
|
|
13
14
|
systemKey: string;
|
|
15
|
+
isTranslateApi: boolean;
|
|
16
|
+
whitelistTranslateApi: never[];
|
|
14
17
|
};
|
package/types/theme/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './api';
|
|
2
|
+
export declare const initTranslate: ({ to, systemKey, translateApiUrl, asyncThesaurusList }: {
|
|
2
3
|
to: any;
|
|
3
4
|
systemKey: any;
|
|
4
5
|
translateApiUrl?: any;
|
|
@@ -7,3 +8,4 @@ export declare const changeLang: (to: any) => Promise<void>;
|
|
|
7
8
|
export declare const getLang: () => Promise<any>;
|
|
8
9
|
export declare const getWordByYxI18nThesaurus: (word: any) => any;
|
|
9
10
|
export declare const getZhWordByYxI18nThesaurus: (word: any) => any;
|
|
11
|
+
export declare const loadCustomThesaurus: (systemKey: string, lang: string) => Promise<any>;
|
|
@@ -42,5 +42,29 @@ export declare const isDarkColor: (color: string) => boolean | null;
|
|
|
42
42
|
* @param threshold 阈值,用于判断两个颜色是否相近
|
|
43
43
|
*/
|
|
44
44
|
export declare const areColorsSimilar: (color1: string, color2: string, threshold?: number) => boolean;
|
|
45
|
-
export declare const isColorEqual: (color1:
|
|
45
|
+
export declare const isColorEqual: (color1: string, color2: string) => boolean;
|
|
46
|
+
/**
|
|
47
|
+
* @param data //后端返回的数据
|
|
48
|
+
* @param isShowError //是否显示后端服务的报错信息
|
|
49
|
+
* @param callback //回调
|
|
50
|
+
* @description 消息提示
|
|
51
|
+
*/
|
|
52
|
+
export declare const yxMessage: (data: any, callback?: Function, isShowError?: boolean) => void;
|
|
53
|
+
/**
|
|
54
|
+
* @param text 要复制的文本
|
|
55
|
+
* @description 复制文本到剪贴板
|
|
56
|
+
* @return void
|
|
57
|
+
*/
|
|
58
|
+
export declare const copyText: (text: string) => void;
|
|
59
|
+
/**
|
|
60
|
+
* @param time 时间
|
|
61
|
+
* @description 将传入的时间转为距离当前时间的 时 分 秒 的字符串
|
|
62
|
+
* @return void
|
|
63
|
+
*/
|
|
64
|
+
export declare const getCownDownTime: (time: string) => string;
|
|
65
|
+
/**
|
|
66
|
+
* 判断当前标签页是否处于激活状态(可见并聚焦)
|
|
67
|
+
* @returns {boolean} 是否激活
|
|
68
|
+
*/
|
|
69
|
+
export declare function isTabActive(): boolean;
|
|
46
70
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { App, Plugin } from 'vue';
|
|
2
|
+
|
|
2
3
|
export type SFCWithInstall<T> = T & Plugin;
|
|
3
4
|
export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E | undefined) => SFCWithInstall<T> & E;
|
|
4
5
|
export declare const makeInstaller: (components?: Plugin[]) => {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare function export_table_to_excel(id: any): void;
|
|
2
|
+
export declare function export_json_to_excel({ multiHeader, header, data, filename, merges, autoWidth, excelWidth, bookType }?: {
|
|
3
|
+
multiHeader?: never[] | undefined;
|
|
4
|
+
header: any;
|
|
5
|
+
data: any;
|
|
6
|
+
filename: any;
|
|
7
|
+
merges?: never[] | undefined;
|
|
8
|
+
autoWidth?: boolean | undefined;
|
|
9
|
+
excelWidth?: boolean | undefined;
|
|
10
|
+
bookType?: string | undefined;
|
|
11
|
+
}): void;
|
|
12
|
+
export declare function readFile(file: any): Promise<unknown>;
|
|
13
|
+
export declare function readExcel(file: any): Promise<unknown[]>;
|
|
14
|
+
export declare function readExcelToArray(file: any): Promise<unknown[]>;
|
|
15
|
+
export declare function saveFile(content: any, fileName: any): Promise<void>;
|
|
16
|
+
export declare function export_excel_style({ header, data, filename, merges, autoWidth, excelWidth }?: {
|
|
17
|
+
header: any;
|
|
18
|
+
data: any;
|
|
19
|
+
filename: any;
|
|
20
|
+
merges?: never[] | undefined;
|
|
21
|
+
autoWidth?: boolean | undefined;
|
|
22
|
+
excelWidth?: boolean | undefined;
|
|
23
|
+
}): void;
|
|
24
|
+
export declare function checkFileType(file: any, fileType: any): string;
|
|
25
|
+
export declare function parseFile(file: any, config: any): Promise<{
|
|
26
|
+
code: number;
|
|
27
|
+
message: string;
|
|
28
|
+
data?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
code: number;
|
|
31
|
+
data: unknown;
|
|
32
|
+
message?: undefined;
|
|
33
|
+
}>;
|
|
34
|
+
export declare function exportMultiSheetExcel(fileName: any, list: any): Promise<void>;
|
|
35
|
+
export declare const exportToExcel: ({ header, tableData, fileName }: any) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RequestConfig } from './interface';
|
|
2
|
+
|
|
3
|
+
export declare const yxFecth: {
|
|
4
|
+
get: <T = any>(url: string, params?: Record<string, any>, config?: RequestConfig) => Promise<T>;
|
|
5
|
+
post: <T_1 = any>(url: string, data?: any, config?: RequestConfig) => Promise<T_1>;
|
|
6
|
+
put: <T_2 = any>(url: string, data?: any, config?: RequestConfig) => Promise<T_2>;
|
|
7
|
+
delete: <T_3 = any>(url: string, data?: any, config?: RequestConfig) => Promise<T_3>;
|
|
8
|
+
};
|
package/types/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export { default as http } from
|
|
2
|
-
export * from
|
|
3
|
-
export { default as yxSubscribe } from
|
|
1
|
+
export { default as http } from './http/index';
|
|
2
|
+
export * from './common/index';
|
|
3
|
+
export { default as yxSubscribe } from './subscribe/index';
|
|
4
|
+
export { yxFecth } from './fecth/index';
|
|
5
|
+
export { default as MQ } from './mqtt/index';
|
|
6
|
+
export { default as WS } from './socket/index';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CusOptions } from './interface';
|
|
2
|
+
|
|
3
|
+
declare class MQ {
|
|
4
|
+
client: any;
|
|
5
|
+
constructor(url: string, options: CusOptions);
|
|
6
|
+
createClient(url: string, options: CusOptions): void;
|
|
7
|
+
publish(topic: string, message: any): void;
|
|
8
|
+
subscribe(topic: any, callback: any): void;
|
|
9
|
+
unsubscribe(topic: any): void;
|
|
10
|
+
onConnect(e: any): void;
|
|
11
|
+
onReconnect(error: any): void;
|
|
12
|
+
onError(error: any): void;
|
|
13
|
+
onMessage(topic: any, message: any): void;
|
|
14
|
+
destroyed(): void;
|
|
15
|
+
}
|
|
16
|
+
export default MQ;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ClientOptions {
|
|
2
|
+
mqttVersion: number;
|
|
3
|
+
/**true: 清除会话, false: 保留会话 */
|
|
4
|
+
clean: boolean;
|
|
5
|
+
/**超时时间 */
|
|
6
|
+
connectTimeout: number;
|
|
7
|
+
keepAlive: number;
|
|
8
|
+
/**认证信息 */
|
|
9
|
+
clientId?: string;
|
|
10
|
+
qos: 1;
|
|
11
|
+
}
|
|
12
|
+
export interface CusOptions {
|
|
13
|
+
/**用户名 */
|
|
14
|
+
username?: string;
|
|
15
|
+
/**密码 */
|
|
16
|
+
password?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SocketParams, HeartMessage } from './interface';
|
|
2
|
+
|
|
3
|
+
export default class Ws {
|
|
4
|
+
url: string;
|
|
5
|
+
protocols: any;
|
|
6
|
+
webSocketState: boolean;
|
|
7
|
+
isCustomClose: boolean;
|
|
8
|
+
reconnectTime: number;
|
|
9
|
+
heartBeatTime: number;
|
|
10
|
+
waitBeatTime: number;
|
|
11
|
+
callback: Function;
|
|
12
|
+
HEART_KEY?: string;
|
|
13
|
+
HEART_VALUE?: string | number;
|
|
14
|
+
ws: WebSocket | null;
|
|
15
|
+
isReconnectionLoading: boolean;
|
|
16
|
+
timeId: any;
|
|
17
|
+
eventCenter: any;
|
|
18
|
+
errorStack: any;
|
|
19
|
+
heartMessage?: HeartMessage;
|
|
20
|
+
msgDataPreHandler?: Function;
|
|
21
|
+
constructor(options: SocketParams, protocols?: string);
|
|
22
|
+
createWs(): void;
|
|
23
|
+
onopen(): void;
|
|
24
|
+
startHeartBeat(time: any): void;
|
|
25
|
+
waitingServer(): void;
|
|
26
|
+
onerror(): void;
|
|
27
|
+
onclose(): void;
|
|
28
|
+
onmessage(): Promise<void>;
|
|
29
|
+
reconnection(): void;
|
|
30
|
+
send(message: any): void;
|
|
31
|
+
close(): void;
|
|
32
|
+
start(): void;
|
|
33
|
+
subscribe(eventName: string, cb: Function): void;
|
|
34
|
+
unsubscribe(eventName: string, cb: Function): void;
|
|
35
|
+
destroy(): void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface SocketParams {
|
|
2
|
+
url: string;
|
|
3
|
+
reconnectTime: number;
|
|
4
|
+
heartBeatTime: number;
|
|
5
|
+
waitBeatTime: number;
|
|
6
|
+
msgDataPreHandler?: Function;
|
|
7
|
+
callback: Function;
|
|
8
|
+
heartMessage?: HeartMessage;
|
|
9
|
+
HEART_KEY?: string;
|
|
10
|
+
HEART_VALUE?: string | number;
|
|
11
|
+
}
|
|
12
|
+
export interface HeartMessage {
|
|
13
|
+
data?: string;
|
|
14
|
+
msgId?: number;
|
|
15
|
+
msgName?: string;
|
|
16
|
+
}
|
package/types/yxIcon/index.d.ts
CHANGED
package/types/yxi18n/index.d.ts
CHANGED
package/lib/index.cjs11.js.gz
DELETED
|
Binary file
|
package/lib/index.es10.js.gz
DELETED
|
Binary file
|
package/lib/index.es11.js.gz
DELETED
|
Binary file
|