@kbapp/js-bridge 0.4.5-alpha.0 → 0.4.8-alpha.0

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
@@ -59,6 +59,7 @@ defineComponents({
59
59
  | closeWebView | 关闭当前 webview |
60
60
  | definePermissionUsage | 定义隐私权限协议文案 |
61
61
  | getDeviceInfo | 获取设备信息 |
62
+ | openPostEditor | 唤起发帖器 |
62
63
  | runAction | 执行 action |
63
64
  | saveImageToLocal | 保存图片到本地 |
64
65
  | saveVideoToLocal | 保存视频到本地 |
@@ -73,10 +74,10 @@ defineComponents({
73
74
  | reportGetui | 个推事件上报 |
74
75
  | generateKBSign | 生成 kbsign |
75
76
 
76
- | 枚举 | 说明 |
77
- | ------------- | ---------------- |
78
- | JSBridgeCode | kbapp 桥接状态码 |
79
- | AppLoginModel | 登录信息 model |
77
+ | 枚举 | 说明 |
78
+ | ------------------ | ---------------- |
79
+ | JSBridgeCode | kbapp 桥接状态码 |
80
+ | AppBridgedUserInfo | 登录信息 model |
80
81
 
81
82
  ### 登录设计
82
83
 
@@ -101,7 +102,7 @@ const onTapSomeButton = decorateLogin(() => {
101
102
 
102
103
  #### 如果是某个组件/页面加载的时候就得登录才能正常操作
103
104
 
104
- 暂时没想好, 反正也是需要禁止无限制事件类型, 小程序情况下, 某个链接点击打开小程序, 然后关闭, 再重新点链接打开小程序, 页面生命周期是重复触发onMounted
105
+ 暂时没想好, 反正也是需要禁止无限制事件类型, 小程序情况下, 某个链接点击打开小程序, 然后关闭, 再重新点链接打开小程序, 页面生命周期是重复触发 onMounted
105
106
 
106
107
  其中最终的目的就是禁止出现监听登录成功事件无限累加, 曾经在这上面吃了不少的亏
107
108
 
@@ -310,8 +311,8 @@ if (await canIUse('sharePoster')) {
310
311
  | 参数 | 值类型 | 必填? | 说明 |
311
312
  | -------- | ------ | ----- | ---------- |
312
313
  | title | string | 必填 | 标题 |
313
- | content | string | 必填 | 内容 |
314
- | imgUrl | string | 必填 | 图片 |
314
+ | content | string | 选填 | 内容 |
315
+ | imageUrl | string | 必填 | 图片 |
315
316
  | url | string | 必填 | https 链接 |
316
317
  | tmuTrack | any | 选填 | 天目埋点 |
317
318
  | qqUrl | string | 选填 | 未知 |
@@ -333,26 +334,7 @@ if (await canIUse('sharePoster')) {
333
334
  #### 返回值
334
335
 
335
336
  ```js
336
- Promise<{
337
- /** 车牌号:例如浙A999999 */
338
- carNo: string
339
- /** 未知 */
340
- role: number
341
- /** 手机号 */
342
- mobile: string
343
- /** 性别 */
344
- sex: number
345
- /** 电台id */
346
- siteId: string
347
- /** 头像地址 */
348
- avatar: string
349
- /** token */
350
- token: string
351
- /** 用户id */
352
- userId: number
353
- /** 用户名 */
354
- userName: string
355
- } | null>
337
+ Promise<AppBridgedUserInfo | null>
356
338
 
357
339
  ```
358
340
 
@@ -369,26 +351,7 @@ Promise<{
369
351
  #### 返回值
370
352
 
371
353
  ```js
372
- Promise<{
373
- /** 车牌号:例如浙A999999 */
374
- carNo: string
375
- /** 未知 */
376
- role: number
377
- /** 手机号 */
378
- mobile: string
379
- /** 性别 */
380
- sex: number
381
- /** 电台id */
382
- siteId: string
383
- /** 头像地址 */
384
- avatar: string
385
- /** token */
386
- token: string
387
- /** 用户id */
388
- userId: number
389
- /** 用户名 */
390
- userName: string
391
- }>
354
+ Promise<AppBridgedUserInfo>
392
355
 
393
356
  ```
394
357
 
@@ -425,6 +388,36 @@ const handle = watchAppLoginSuccess(() => {
425
388
 
426
389
  ---
427
390
 
391
+ ### AppBridgedUserInfo
392
+
393
+ > 登录信息类型
394
+
395
+ ```js
396
+ Promise<{
397
+ /** 车牌号:例如浙A999999 */
398
+ carNo?: string
399
+ /** 未知 */
400
+ role?: number
401
+ /** 手机号 */
402
+ mobile: string
403
+ /** 性别 */
404
+ sex: number
405
+ /** 电台id */
406
+ siteId: number
407
+ /** 头像地址 */
408
+ avatar: string
409
+ /** token */
410
+ token: string
411
+ /** 用户id */
412
+ userId: number
413
+ /** 用户名 */
414
+ userName: string
415
+ }>
416
+
417
+ ```
418
+
419
+ ---
420
+
428
421
  ### JSBridgeCode
429
422
 
430
423
  > 错误码枚举
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './core';
1
2
  export * from './lib/can-i-use';
2
3
  export * from './lib/check-for-new-version';
3
4
  export * from './lib/close-webview';
@@ -5,6 +6,7 @@ export * from './lib/define-permission-usage';
5
6
  export * from './lib/generate-kb-sign';
6
7
  export * from './lib/get-device-info';
7
8
  export * from './lib/js-bridge-code';
9
+ export * from './lib/open-post-editor';
8
10
  export * from './lib/report-getui';
9
11
  export * from './lib/run-action';
10
12
  export * from './lib/save-image-to-local';
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./core"), exports);
17
18
  __exportStar(require("./lib/can-i-use"), exports);
18
19
  __exportStar(require("./lib/check-for-new-version"), exports);
19
20
  __exportStar(require("./lib/close-webview"), exports);
@@ -21,6 +22,7 @@ __exportStar(require("./lib/define-permission-usage"), exports);
21
22
  __exportStar(require("./lib/generate-kb-sign"), exports);
22
23
  __exportStar(require("./lib/get-device-info"), exports);
23
24
  __exportStar(require("./lib/js-bridge-code"), exports);
25
+ __exportStar(require("./lib/open-post-editor"), exports);
24
26
  __exportStar(require("./lib/report-getui"), exports);
25
27
  __exportStar(require("./lib/run-action"), exports);
26
28
  __exportStar(require("./lib/save-image-to-local"), exports);
@@ -1,16 +1,8 @@
1
1
  /**
2
2
  *
3
- * @description 获取设备信息
4
- *
5
- * **示例代码**
6
- ```js
7
- import { getDeviceInfo } from '@kbapp/js-bridge';
8
-
9
- const deviceInfo = await getDeviceInfo()
10
- deviceInfo.vcode
11
- ```
3
+ * @description app本地设备信息
12
4
  */
13
- export declare const getDeviceInfo: () => Promise<{
5
+ export declare class AppDeviceInfo {
14
6
  /** 例如iOS */
15
7
  do: string;
16
8
  /** 例如iPhone11,2 */
@@ -21,10 +13,25 @@ export declare const getDeviceInfo: () => Promise<{
21
13
  vcode: number;
22
14
  /** 版本号.例如6.90.11 */
23
15
  v: string;
16
+ /** 未知 */
17
+ source: number;
24
18
  /** 电台id */
25
19
  siteId: number;
26
20
  /** 用户id.当登录时返回 */
27
21
  userId?: number;
28
22
  /** 未知 */
29
23
  cid: string;
30
- }>;
24
+ }
25
+ /**
26
+ *
27
+ * @description 获取设备信息
28
+ *
29
+ * **示例代码**
30
+ ```js
31
+ import { getDeviceInfo } from '@kbapp/js-bridge';
32
+
33
+ const deviceInfo = await getDeviceInfo()
34
+ deviceInfo.vcode
35
+ ```
36
+ */
37
+ export declare const getDeviceInfo: () => Promise<AppDeviceInfo>;
@@ -1,8 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDeviceInfo = void 0;
3
+ exports.getDeviceInfo = exports.AppDeviceInfo = void 0;
4
4
  var promise_cache_1 = require("../util/promise-cache");
5
5
  var core_1 = require("../core");
6
+ /**
7
+ *
8
+ * @description app本地设备信息
9
+ */
10
+ var AppDeviceInfo = /** @class */ (function () {
11
+ function AppDeviceInfo() {
12
+ }
13
+ return AppDeviceInfo;
14
+ }());
15
+ exports.AppDeviceInfo = AppDeviceInfo;
6
16
  /**
7
17
  *
8
18
  * @description 获取设备信息
@@ -0,0 +1,110 @@
1
+ /**
2
+ *
3
+ * @description 默认显示 image, video, address, audio
4
+ */
5
+ export declare class PostEditorParams {
6
+ /** 文本输入框 低下显示的提示文案 */
7
+ placeholder?: string;
8
+ /** 初始化文本内容 */
9
+ initialText?: string;
10
+ /** 是否启用图片选择器 默认启用 */
11
+ enableImageUpload: boolean;
12
+ /** 是否启用音频录制功能 默认启用 */
13
+ enableAudioUpload: boolean;
14
+ /** 是否启用普通视频上传功能 默认启用 */
15
+ enableVideoUpload: boolean;
16
+ /** 是否启用定位 */
17
+ enableAddress: boolean;
18
+ /** 是否启用媒资视频上传功能 默认禁用 */
19
+ enableMediaVideoUpload: boolean;
20
+ /** 最少输入多少字符, 默认 0 */
21
+ minTextLength: number;
22
+ /** 最多输入多少字符, 默认 1000 */
23
+ maxTextLength: number;
24
+ /** 最少上传多少张图片, 默认 0 */
25
+ minImageCount: number;
26
+ /** 最多上传多少张图片, 默认 9 */
27
+ maxImageCount: number;
28
+ /** 普通音频是否必传. 默认不必传 */
29
+ isAudioRequired: boolean;
30
+ /** 普通视频是否必传. 默认不必传 */
31
+ isVideoRequired: boolean;
32
+ /** 媒资视频是否必传. 默认不必传 */
33
+ isMediaVideoRequired: boolean;
34
+ }
35
+ /**
36
+ *
37
+ * @description 构造富文本编辑器参数
38
+ */
39
+ export declare function createPostEditorParams(params?: Partial<PostEditorParams>): {
40
+ hint: string | undefined;
41
+ initialText: string | undefined;
42
+ audio: boolean;
43
+ image: boolean;
44
+ video: boolean;
45
+ address: boolean;
46
+ asset_video: boolean;
47
+ text_must: boolean;
48
+ content_min_length: number;
49
+ content_max_length: number;
50
+ image_must: boolean;
51
+ min_image_count: number;
52
+ max_image_count: number;
53
+ audio_must: boolean;
54
+ video_must: boolean;
55
+ asset_video_must: boolean;
56
+ };
57
+ /**
58
+ *
59
+ * @description 唤起发帖器, 由于原生发帖器桥接参数存在一些小问题, 建议使用 createPostEditorParams 来构造参数
60
+ */
61
+ export declare function openPostEditor(data?: {
62
+ /** 文本默认显示内容(placehold) */
63
+ hint?: string;
64
+ /** 默认初始化文案 */
65
+ initialText?: string;
66
+ /** 是否显示音频按钮, 默认显示 */
67
+ audio?: boolean;
68
+ /** 是否显示图片按钮, 默认显示 */
69
+ image?: boolean;
70
+ /** 是否显示视频按钮, 默认显示 */
71
+ video?: boolean;
72
+ /** 是否显示定位按钮, 默认显示 */
73
+ address?: boolean;
74
+ /** 是否显示媒资视频选项;默认不显示 */
75
+ asset_video?: boolean;
76
+ /** 音频是否必传 */
77
+ audio_must?: boolean;
78
+ /** 图片是否必传 */
79
+ image_must?: boolean;
80
+ /** 图片最大张数 */
81
+ max_image_count?: number;
82
+ /** 图片最小张数 */
83
+ min_image_count?: number;
84
+ /** 视频是否必传 */
85
+ video_must?: boolean;
86
+ /** 文本内容是否必传 */
87
+ text_must?: boolean;
88
+ /** 文本最大长度 */
89
+ content_max_length?: number;
90
+ /** 文本最小长度 */
91
+ content_min_length?: number;
92
+ [key: string]: any;
93
+ }): Promise<{
94
+ content: string;
95
+ /** 街道信息 */
96
+ street?: string;
97
+ /** 音频model */
98
+ audio?: unknown;
99
+ /** 视频model */
100
+ video?: unknown;
101
+ /** 媒资视频 */
102
+ mediaVideo?: {
103
+ mediaId: string;
104
+ };
105
+ images: {
106
+ url: string;
107
+ width: number;
108
+ height: number;
109
+ }[] | undefined;
110
+ }>;
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.PostEditorParams = void 0;
26
+ exports.createPostEditorParams = createPostEditorParams;
27
+ exports.openPostEditor = openPostEditor;
28
+ var core_1 = require("../core");
29
+ /**
30
+ *
31
+ * @description 默认显示 image, video, address, audio
32
+ */
33
+ var PostEditorParams = /** @class */ (function () {
34
+ function PostEditorParams() {
35
+ /** 是否启用图片选择器 默认启用 */
36
+ this.enableImageUpload = true;
37
+ /** 是否启用音频录制功能 默认启用 */
38
+ this.enableAudioUpload = true;
39
+ /** 是否启用普通视频上传功能 默认启用 */
40
+ this.enableVideoUpload = true;
41
+ /** 是否启用定位 */
42
+ this.enableAddress = true;
43
+ /** 是否启用媒资视频上传功能 默认禁用 */
44
+ this.enableMediaVideoUpload = false;
45
+ /** 最少输入多少字符, 默认 0 */
46
+ this.minTextLength = 0;
47
+ /** 最多输入多少字符, 默认 1000 */
48
+ this.maxTextLength = 1000;
49
+ /** 最少上传多少张图片, 默认 0 */
50
+ this.minImageCount = 0;
51
+ /** 最多上传多少张图片, 默认 9 */
52
+ this.maxImageCount = 9;
53
+ /** 普通音频是否必传. 默认不必传 */
54
+ this.isAudioRequired = false;
55
+ /** 普通视频是否必传. 默认不必传 */
56
+ this.isVideoRequired = false;
57
+ /** 媒资视频是否必传. 默认不必传 */
58
+ this.isMediaVideoRequired = false;
59
+ }
60
+ return PostEditorParams;
61
+ }());
62
+ exports.PostEditorParams = PostEditorParams;
63
+ /**
64
+ *
65
+ * @description 构造富文本编辑器参数
66
+ */
67
+ function createPostEditorParams(params) {
68
+ var instance = new PostEditorParams();
69
+ if (params) {
70
+ var keys = Object.keys(params);
71
+ keys.forEach(function (key) {
72
+ // 显式指定this的索引类型
73
+ ;
74
+ instance[key] = params[key];
75
+ });
76
+ }
77
+ return {
78
+ hint: instance.placeholder,
79
+ initialText: instance.initialText,
80
+ audio: instance.enableAudioUpload,
81
+ image: instance.enableImageUpload,
82
+ video: instance.enableVideoUpload,
83
+ address: instance.enableAddress,
84
+ asset_video: instance.enableMediaVideoUpload,
85
+ text_must: instance.minTextLength > 0,
86
+ content_min_length: instance.minTextLength,
87
+ content_max_length: instance.maxTextLength,
88
+ image_must: instance.minImageCount > 0,
89
+ min_image_count: instance.minImageCount,
90
+ max_image_count: instance.maxImageCount,
91
+ audio_must: instance.isAudioRequired,
92
+ video_must: instance.isVideoRequired,
93
+ asset_video_must: instance.isMediaVideoRequired,
94
+ };
95
+ }
96
+ /**
97
+ *
98
+ * @description 唤起发帖器, 由于原生发帖器桥接参数存在一些小问题, 建议使用 createPostEditorParams 来构造参数
99
+ */
100
+ function openPostEditor(data) {
101
+ if (data === void 0) { data = {}; }
102
+ /**
103
+ *
104
+ * 经过测试, 设置 text_must: true, 还必须设置 content_min_length: 1 才表示必须填写内容,
105
+ * 单独设置 text_must: true 或者单独设置 content_min_length:1 都无法要求内容必填
106
+ * 设置 image_must 和 min_image_count 同理
107
+ */
108
+ return (0, core_1.callHandlerPromise)({
109
+ name: 'OpenActRequest',
110
+ params: { type: 13, data: data },
111
+ }).then(function (_a) {
112
+ var data = _a.data;
113
+ var images = data.pic, others = __rest(data, ["pic"]);
114
+ return __assign({ images: images }, others);
115
+ });
116
+ }
@@ -8,11 +8,13 @@ import { runAction } from '@kbapp/js-bridge';
8
8
 
9
9
  runAction({
10
10
  action: 'pageWeb',
11
- actionParams: {}
11
+ actionParams: {
12
+ url: 'https://www.baidu.com',
13
+ }
12
14
  })
13
15
  ```
14
16
  */
15
17
  export declare function runAction(data: {
16
18
  action: string;
17
- actionParams: Record<string, any>;
19
+ actionParams?: Record<string, any>;
18
20
  }): void;
@@ -12,7 +12,9 @@ import { runAction } from '@kbapp/js-bridge';
12
12
 
13
13
  runAction({
14
14
  action: 'pageWeb',
15
- actionParams: {}
15
+ actionParams: {
16
+ url: 'https://www.baidu.com',
17
+ }
16
18
  })
17
19
  ```
18
20
  */
@@ -9,7 +9,7 @@ import { defineShareModel } from '@kbapp/js-bridge';
9
9
  defineShareModel({
10
10
  title: '分享标题',
11
11
  content: '分享内容',
12
- imgUrl: 'https://static.kaiba315.com.cn/kaiba-logo.png', // 分享图片
12
+ imageUrl: 'https://static.kaiba315.com.cn/kaiba-logo.png', // 分享图片
13
13
  url: 'http://www.kaiba315.com.cn/' // 分享网页地址
14
14
  })
15
15
  ```
@@ -63,7 +63,7 @@ export declare function invokeShareModal(data: {
63
63
  /** 分享出去的标题 */
64
64
  title: string;
65
65
  /** 分享出去的正文内容 */
66
- content: string;
66
+ content?: string;
67
67
  /** 分享出去的封面图片 */
68
68
  imageUrl: string;
69
69
  }): void;
@@ -15,7 +15,7 @@ import { defineShareModel } from '@kbapp/js-bridge';
15
15
  defineShareModel({
16
16
  title: '分享标题',
17
17
  content: '分享内容',
18
- imgUrl: 'https://static.kaiba315.com.cn/kaiba-logo.png', // 分享图片
18
+ imageUrl: 'https://static.kaiba315.com.cn/kaiba-logo.png', // 分享图片
19
19
  url: 'http://www.kaiba315.com.cn/' // 分享网页地址
20
20
  })
21
21
  ```
@@ -2,7 +2,7 @@
2
2
  *
3
3
  * @description 登录信息
4
4
  */
5
- export declare class AppLoginModel {
5
+ export declare class AppBridgedUserInfo {
6
6
  /** 车牌号:例如浙A999999 */
7
7
  carNo?: string;
8
8
  /** 未知 */
@@ -12,7 +12,7 @@ export declare class AppLoginModel {
12
12
  /** 性别 */
13
13
  sex: number;
14
14
  /** 电台id */
15
- siteId: string;
15
+ siteId: number;
16
16
  /** 头像地址 */
17
17
  avatar: string;
18
18
  /** token */
@@ -26,17 +26,17 @@ export declare class AppLoginModel {
26
26
  *
27
27
  * @description 获取用户登录信息.如果未登录返回null
28
28
  */
29
- export declare function getAppLoginInfo(): Promise<AppLoginModel | null>;
29
+ export declare function getAppLoginInfo(): Promise<AppBridgedUserInfo | null>;
30
30
  /**
31
31
  *
32
32
  * @description 触发登录
33
33
  * 如果已登录,将直接返回登录信息, 请通过 `watchAppLoginSuccess` 监听登录成功事件
34
34
  */
35
- export declare function triggerAppLogin(): Promise<AppLoginModel>;
35
+ export declare function triggerAppLogin(): Promise<AppBridgedUserInfo>;
36
36
  /**
37
37
  *
38
38
  * @description 注册监听app登录成功, 监听时候立刻执行检测一次, 注意,该函数仅读取登录信息, 不会触发登录
39
- * @param {(loginInfo: AppLoginModel) => void} callback 登录成功回调
39
+ * @param {(loginInfo: AppBridgedUserInfo) => void} callback 登录成功回调
40
40
  * @returns {() => void} 调用该函数取消监听
41
41
  *
42
42
  * **示例代码**
@@ -50,4 +50,4 @@ const handle = watchAppLoginSuccess(() => {
50
50
  // handle() 停止监听
51
51
  ```
52
52
  */
53
- export declare const watchAppLoginSuccess: (callback: (loginInfo: AppLoginModel) => void) => () => void;
53
+ export declare const watchAppLoginSuccess: (callback: (loginInfo: AppBridgedUserInfo) => void) => () => void;
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.watchAppLoginSuccess = exports.AppLoginModel = void 0;
39
+ exports.watchAppLoginSuccess = exports.AppBridgedUserInfo = void 0;
40
40
  exports.getAppLoginInfo = getAppLoginInfo;
41
41
  exports.triggerAppLogin = triggerAppLogin;
42
42
  var js_bridge_code_1 = require("./js-bridge-code");
@@ -45,12 +45,12 @@ var core_1 = require("../core");
45
45
  *
46
46
  * @description 登录信息
47
47
  */
48
- var AppLoginModel = /** @class */ (function () {
49
- function AppLoginModel() {
48
+ var AppBridgedUserInfo = /** @class */ (function () {
49
+ function AppBridgedUserInfo() {
50
50
  }
51
- return AppLoginModel;
51
+ return AppBridgedUserInfo;
52
52
  }());
53
- exports.AppLoginModel = AppLoginModel;
53
+ exports.AppBridgedUserInfo = AppBridgedUserInfo;
54
54
  /**
55
55
  *
56
56
  * @description 获取用户登录信息.如果未登录返回null
@@ -171,7 +171,7 @@ function triggerAppLogin() {
171
171
  /**
172
172
  *
173
173
  * @description 注册监听app登录成功, 监听时候立刻执行检测一次, 注意,该函数仅读取登录信息, 不会触发登录
174
- * @param {(loginInfo: AppLoginModel) => void} callback 登录成功回调
174
+ * @param {(loginInfo: AppBridgedUserInfo) => void} callback 登录成功回调
175
175
  * @returns {() => void} 调用该函数取消监听
176
176
  *
177
177
  * **示例代码**
package/package.json CHANGED
@@ -3,9 +3,8 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.4.5-alpha.0",
6
+ "version": "0.4.8-alpha.0",
7
7
  "description": "开吧客户端桥接",
8
8
  "main": "./dist/index.js",
9
- "author": "along",
10
- "gitHead": "1ae6636e6e5180193f58946cc75766872d786107"
9
+ "author": "along"
11
10
  }