deeke-script-app 1.5.2 → 1.5.4
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/@deekeScript/@type/Class/Global.d.ts +1 -1
- package/@deekeScript/@type/Class/Rect.d.ts +16 -16
- package/@deekeScript/@type/Class/UiSelector.d.ts +201 -191
- package/@deekeScript/@type/Class/WebSocket.d.ts +49 -49
- package/@deekeScript/@type/interface/Access.d.ts +71 -71
- package/@deekeScript/@type/interface/Engines.d.ts +34 -34
- package/@deekeScript/@type/interface/ForegroundServiceBridge.d.ts +31 -31
- package/@deekeScript/@type/interface/Hid.d.ts +342 -342
- package/@deekeScript/@type/interface/Http.d.ts +41 -41
- package/@deekeScript/@type/interface/Images.d.ts +71 -71
- package/@deekeScript/@type/interface/Java.d.ts +7 -7
- package/@deekeScript/@type/interface/KeyBoards.d.ts +27 -27
- package/@deekeScript/@type/interface/Log.d.ts +16 -16
- package/@deekeScript/@type/interface/NotificationBridge.d.ts +28 -28
- package/@deekeScript/@type/interface/{SocketIOClient.d.ts → SocketIoClient.d.ts} +76 -76
- package/@deekeScript/@type/interface/UiObject.d.ts +12 -0
- package/README.md +35 -35
- package/deekeScript.json +611 -611
- package/deekeScriptZipBuild +48 -48
- package/gulpfile +17 -17
- package/init +32 -32
- package/jsconfig.json +11 -11
- package/package.json +42 -42
- package/script/statistics/statistics.js +120 -120
- package/script/task/dy.js +14 -14
- package/script/task/dyApp.js +7 -7
- package/script/task/tool.js +19 -19
- package/script/task.html +4 -4
- package/src/statistics/statistics.js +120 -120
- package/src/task/dy.js +14 -14
- package/src/task/dyApp.js +7 -7
- package/src/task/tool.js +19 -19
- package/src/task.html +4 -4
- package/test/2.js +6 -6
- package/test/SocketIOClient.js +39 -39
- package/test/SocketIOServer.js +49 -49
- package/test/Storage.js +3 -3
- package/test/console.js +5 -5
- package/test/deekeScriptJson.js +5 -5
- package/test/encrypt.js +3 -3
- package/test/engines/1.js +4 -4
- package/test/engines/eng/1.js +8 -8
- package/test/engines/engines.js +6 -6
- package/test/engines/relative.dir.js +8 -8
- package/test/engines/relative.js +1 -1
- package/test/engines/test.js +6 -6
- package/test/engines.js +5 -5
- package/test/extension.js +27 -27
- package/test/files.js +7 -7
- package/test/foreground.js +23 -23
- package/test/http.js +19 -19
- package/test/images/findColor.js +15 -15
- package/test/java.js +28 -28
- package/test/log.js +10 -10
- package/test/module/module.js +4 -4
- package/test/notification.js +26 -26
- package/test/package.js +3 -3
- package/test/permise.js +29 -29
- package/test/thread.js +11 -11
- package/test/timer.close.js +27 -27
- package/test/timer.js +25 -25
- package/test/timer.stop.js +28 -28
- package/test/webSocket.js +22 -22
- package/uglify-config.json +15 -15
- package/images/test/statistics.png +0 -0
- package/test/2.0/engines/enginesSimple.js +0 -72
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var Http: Http;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface Http {
|
|
6
|
-
/**
|
|
7
|
-
* post请求 {"Content-Type":"application/json"}
|
|
8
|
-
* @param url 请求地址
|
|
9
|
-
* @param json 请求内容,请使用JOSN.parse()将对象处理成字符串
|
|
10
|
-
*/
|
|
11
|
-
public post(url: string, json: object): string;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param url 请求地址
|
|
16
|
-
* @param json 请求内容
|
|
17
|
-
* @param headers 请求头n的请求头,如:{"Content-Type":"application/json"}
|
|
18
|
-
*/
|
|
19
|
-
public postHeaders(url: string, json: object, headers: object): string | null;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* get请求
|
|
23
|
-
* @param url 请求地址
|
|
24
|
-
*/
|
|
25
|
-
public get(url: string): string;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* 带请求头的get请求
|
|
29
|
-
* @param url 请求地址
|
|
30
|
-
* @param headers 请求头
|
|
31
|
-
*/
|
|
32
|
-
public getHeaders(url: string, headers: object): string | null;
|
|
33
|
-
|
|
34
|
-
//下面的方法,暂时还没使用过
|
|
35
|
-
public postFile(url: string, files: string[], params: object, httpCallback: {
|
|
36
|
-
success: (response: any) => void,
|
|
37
|
-
fail: (response: any) => void
|
|
38
|
-
}): void;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { };
|
|
1
|
+
declare global {
|
|
2
|
+
var Http: Http;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface Http {
|
|
6
|
+
/**
|
|
7
|
+
* post请求 {"Content-Type":"application/json"}
|
|
8
|
+
* @param url 请求地址
|
|
9
|
+
* @param json 请求内容,请使用JOSN.parse()将对象处理成字符串
|
|
10
|
+
*/
|
|
11
|
+
public post(url: string, json: object): string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param url 请求地址
|
|
16
|
+
* @param json 请求内容
|
|
17
|
+
* @param headers 请求头n的请求头,如:{"Content-Type":"application/json"}
|
|
18
|
+
*/
|
|
19
|
+
public postHeaders(url: string, json: object, headers: object): string | null;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* get请求
|
|
23
|
+
* @param url 请求地址
|
|
24
|
+
*/
|
|
25
|
+
public get(url: string): string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 带请求头的get请求
|
|
29
|
+
* @param url 请求地址
|
|
30
|
+
* @param headers 请求头
|
|
31
|
+
*/
|
|
32
|
+
public getHeaders(url: string, headers: object): string | null;
|
|
33
|
+
|
|
34
|
+
//下面的方法,暂时还没使用过
|
|
35
|
+
public postFile(url: string, files: string[], params: object, httpCallback: {
|
|
36
|
+
success: (response: any) => void,
|
|
37
|
+
fail: (response: any) => void
|
|
38
|
+
}): void;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { };
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var Images: Images;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface Mat {
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface Point {
|
|
9
|
-
x: number;
|
|
10
|
-
y: number;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface TextAndRegion {
|
|
14
|
-
text: string;
|
|
15
|
-
rect: Rect;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface Images {
|
|
19
|
-
public getMat(imageFile: string): Mat;
|
|
20
|
-
|
|
21
|
-
public findOne(source: Mat, template: Mat, threshold: number): Point;
|
|
22
|
-
|
|
23
|
-
public find(source: Mat, template: Mat, threshold: number): Point[];
|
|
24
|
-
|
|
25
|
-
public capture(): string;
|
|
26
|
-
|
|
27
|
-
public getColor(imageFile: string, pixelX: number, pixelY: number): string;
|
|
28
|
-
|
|
29
|
-
public findColor(imageFile: string, color: string): Point[];
|
|
30
|
-
|
|
31
|
-
public findColor(imageFile: string, startColor: string, endColor: string): Point[];
|
|
32
|
-
|
|
33
|
-
public crop(imageFile: string, left: number, top: number, width: number, height: number): string;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
* @param imageFile 图片文件路径
|
|
38
|
-
* @param multiple 缩放倍数
|
|
39
|
-
* @throws Error 当参数非法时或者图片文件不存在时抛出异常
|
|
40
|
-
*/
|
|
41
|
-
public scale(imageFile: string, multiple: number): string;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* 返回图片的文本和区域
|
|
45
|
-
* @param imageFile 图片文件路径
|
|
46
|
-
* @throws Error 当图像识别失败或参数非法时
|
|
47
|
-
*/
|
|
48
|
-
public getTextAndRegion(imageFile: string): TextAndRegion[];
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* 查找文本位置
|
|
52
|
-
* @param imageFile 图片文件路径
|
|
53
|
-
* @param keyword 查找的文本
|
|
54
|
-
* @throws Error 当图像识别失败或参数非法时
|
|
55
|
-
*/
|
|
56
|
-
public findTextPosition(imageFile: string, keyword: string): Rect[];
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* 在指定区域内查找文本。
|
|
60
|
-
* @param imageFile 图片文件路径
|
|
61
|
-
* @param left 区域左边界
|
|
62
|
-
* @param top 区域上边界
|
|
63
|
-
* @param width 区域宽度
|
|
64
|
-
* @param height 区域高度
|
|
65
|
-
* @returns 识别出的文本数组
|
|
66
|
-
* @throws Error 当图像识别失败或参数非法时
|
|
67
|
-
*/
|
|
68
|
-
public findTextInRegion(imageFile: string, left: number, top: number, width: number, height: number): string[];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export { };
|
|
1
|
+
declare global {
|
|
2
|
+
var Images: Images;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface Mat {
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface Point {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface TextAndRegion {
|
|
14
|
+
text: string;
|
|
15
|
+
rect: Rect;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface Images {
|
|
19
|
+
public getMat(imageFile: string): Mat;
|
|
20
|
+
|
|
21
|
+
public findOne(source: Mat, template: Mat, threshold: number): Point;
|
|
22
|
+
|
|
23
|
+
public find(source: Mat, template: Mat, threshold: number): Point[];
|
|
24
|
+
|
|
25
|
+
public capture(): string;
|
|
26
|
+
|
|
27
|
+
public getColor(imageFile: string, pixelX: number, pixelY: number): string;
|
|
28
|
+
|
|
29
|
+
public findColor(imageFile: string, color: string): Point[];
|
|
30
|
+
|
|
31
|
+
public findColor(imageFile: string, startColor: string, endColor: string): Point[];
|
|
32
|
+
|
|
33
|
+
public crop(imageFile: string, left: number, top: number, width: number, height: number): string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param imageFile 图片文件路径
|
|
38
|
+
* @param multiple 缩放倍数
|
|
39
|
+
* @throws Error 当参数非法时或者图片文件不存在时抛出异常
|
|
40
|
+
*/
|
|
41
|
+
public scale(imageFile: string, multiple: number): string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 返回图片的文本和区域
|
|
45
|
+
* @param imageFile 图片文件路径
|
|
46
|
+
* @throws Error 当图像识别失败或参数非法时
|
|
47
|
+
*/
|
|
48
|
+
public getTextAndRegion(imageFile: string): TextAndRegion[];
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 查找文本位置
|
|
52
|
+
* @param imageFile 图片文件路径
|
|
53
|
+
* @param keyword 查找的文本
|
|
54
|
+
* @throws Error 当图像识别失败或参数非法时
|
|
55
|
+
*/
|
|
56
|
+
public findTextPosition(imageFile: string, keyword: string): Rect[];
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 在指定区域内查找文本。
|
|
60
|
+
* @param imageFile 图片文件路径
|
|
61
|
+
* @param left 区域左边界
|
|
62
|
+
* @param top 区域上边界
|
|
63
|
+
* @param width 区域宽度
|
|
64
|
+
* @param height 区域高度
|
|
65
|
+
* @returns 识别出的文本数组
|
|
66
|
+
* @throws Error 当图像识别失败或参数非法时
|
|
67
|
+
*/
|
|
68
|
+
public findTextInRegion(imageFile: string, left: number, top: number, width: number, height: number): string[];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var java: any;
|
|
3
|
-
var Packages: any;
|
|
4
|
-
function JavaImporter(...packages: any[]): any;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export { };
|
|
1
|
+
declare global {
|
|
2
|
+
var java: any;
|
|
3
|
+
var Packages: any;
|
|
4
|
+
function JavaImporter(...packages: any[]): any;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { };
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
global {
|
|
2
|
-
var KeyBoards: KeyBoards;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface KeyBoards {
|
|
6
|
-
/**
|
|
7
|
-
* DeekeScript输入法是否启用(未设置为默认,也返回true,但是此时不能输入和删除)
|
|
8
|
-
*/
|
|
9
|
-
public isEnabled(): boolean;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* 判断DeekeScript输入法是否设置为默认,是的话,则可以使用输入和删除方法
|
|
13
|
-
*/
|
|
14
|
-
public canInput():boolean;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* 往文本框追加字符串
|
|
18
|
-
*/
|
|
19
|
-
public input(str: string): boolean;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 删除文本框最后一个字符
|
|
23
|
-
*/
|
|
24
|
-
public delete():boolean;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { };
|
|
1
|
+
global {
|
|
2
|
+
var KeyBoards: KeyBoards;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface KeyBoards {
|
|
6
|
+
/**
|
|
7
|
+
* DeekeScript输入法是否启用(未设置为默认,也返回true,但是此时不能输入和删除)
|
|
8
|
+
*/
|
|
9
|
+
public isEnabled(): boolean;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 判断DeekeScript输入法是否设置为默认,是的话,则可以使用输入和删除方法
|
|
13
|
+
*/
|
|
14
|
+
public canInput():boolean;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 往文本框追加字符串
|
|
18
|
+
*/
|
|
19
|
+
public input(str: string): boolean;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 删除文本框最后一个字符
|
|
23
|
+
*/
|
|
24
|
+
public delete():boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
global {
|
|
2
|
-
var Log: log;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface log {
|
|
6
|
-
/**
|
|
7
|
-
* 全局设置日志输出文件
|
|
8
|
-
*/
|
|
9
|
-
public setFile(filename: string): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* 输出日志内容
|
|
12
|
-
*/
|
|
13
|
-
public log(...obj: object): void;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { };
|
|
1
|
+
global {
|
|
2
|
+
var Log: log;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface log {
|
|
6
|
+
/**
|
|
7
|
+
* 全局设置日志输出文件
|
|
8
|
+
*/
|
|
9
|
+
public setFile(filename: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 输出日志内容
|
|
12
|
+
*/
|
|
13
|
+
public log(...obj: object): void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { };
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
declare global {
|
|
3
|
-
var NotificationBridge: notificationBridge;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface notificationBridge {
|
|
7
|
-
/**
|
|
8
|
-
* 开启读取通知服务
|
|
9
|
-
*/
|
|
10
|
-
public startService(): void;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 监听通知
|
|
14
|
-
* @param onNotification 通知发起后执行 @argument packageName 包名 @argument title 标题 @argument text 内容
|
|
15
|
-
* @param onNotificationRemoved 通知移除后执行 @argument packageName 包名 @argument title 标题 @argument text 内容
|
|
16
|
-
*/
|
|
17
|
-
public startListening(
|
|
18
|
-
onNotification: (packageName: string, title: string, text: string) => void,
|
|
19
|
-
onNotificationRemoved: (packageName: string, title: string, text: string) => void
|
|
20
|
-
): void;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 关闭服务
|
|
24
|
-
*/
|
|
25
|
-
public stopService(): void;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export { };
|
|
1
|
+
|
|
2
|
+
declare global {
|
|
3
|
+
var NotificationBridge: notificationBridge;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
interface notificationBridge {
|
|
7
|
+
/**
|
|
8
|
+
* 开启读取通知服务
|
|
9
|
+
*/
|
|
10
|
+
public startService(): void;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 监听通知
|
|
14
|
+
* @param onNotification 通知发起后执行 @argument packageName 包名 @argument title 标题 @argument text 内容
|
|
15
|
+
* @param onNotificationRemoved 通知移除后执行 @argument packageName 包名 @argument title 标题 @argument text 内容
|
|
16
|
+
*/
|
|
17
|
+
public startListening(
|
|
18
|
+
onNotification: (packageName: string, title: string, text: string) => void,
|
|
19
|
+
onNotificationRemoved: (packageName: string, title: string, text: string) => void
|
|
20
|
+
): void;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 关闭服务
|
|
24
|
+
*/
|
|
25
|
+
public stopService(): void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { };
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
global {
|
|
2
|
-
var SocketIoClient: socketIoClient;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface socketIoClient {
|
|
6
|
-
/**
|
|
7
|
-
* 获取socketIOClient实例
|
|
8
|
-
* @param serverUrl socketIOServer地址
|
|
9
|
-
* @param reconnect 是否自动重连(默认为true)
|
|
10
|
-
* @param timeout 重连超时时间(毫秒)(默认为5000毫秒)
|
|
11
|
-
*/
|
|
12
|
-
public getInstance(serverUrl: string, reconnect: boolean = true, timeout: number = 5000): socketIOClient;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* 连接socketIOServer
|
|
16
|
-
*/
|
|
17
|
-
public connect(): void;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* 断开socketIOServer
|
|
21
|
-
*/
|
|
22
|
-
public disconnect(): void;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* 是否已连接
|
|
26
|
-
*/
|
|
27
|
-
public isConnected(): boolean;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* 向服务器发送事件和数据
|
|
31
|
-
* @param eventName 事件名称
|
|
32
|
-
* @param data 数据
|
|
33
|
-
*/
|
|
34
|
-
public emit(eventName: string, data: string): void;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* 向服务器发送事件和数据
|
|
38
|
-
* @param eventName 事件名称
|
|
39
|
-
* @param data 数据
|
|
40
|
-
* @param callback 服务器确认后的回调函数
|
|
41
|
-
*/
|
|
42
|
-
public emit(eventName: string, data: string, callback: function): void;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* 监听事件
|
|
46
|
-
* @param eventName
|
|
47
|
-
* @param callback
|
|
48
|
-
*/
|
|
49
|
-
public on(eventName: string, callback: (data: string) => void): void;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* 移除事件监听器
|
|
53
|
-
* @param eventName
|
|
54
|
-
* @param callback
|
|
55
|
-
*/
|
|
56
|
-
public off(eventName: string, callback: (data: string) => void): void;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* 移除事件监听器
|
|
60
|
-
* @param eventName
|
|
61
|
-
*/
|
|
62
|
-
public off(eventName: string): void;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* 移除所有事件监听器
|
|
66
|
-
*/
|
|
67
|
-
public off(): void;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* 重置当前实例的是否重连
|
|
71
|
-
* @param bool 是否自动重连
|
|
72
|
-
*/
|
|
73
|
-
public setReconnect(bool: boolean): void;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export { };
|
|
1
|
+
global {
|
|
2
|
+
var SocketIoClient: socketIoClient;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface socketIoClient {
|
|
6
|
+
/**
|
|
7
|
+
* 获取socketIOClient实例
|
|
8
|
+
* @param serverUrl socketIOServer地址
|
|
9
|
+
* @param reconnect 是否自动重连(默认为true)
|
|
10
|
+
* @param timeout 重连超时时间(毫秒)(默认为5000毫秒)
|
|
11
|
+
*/
|
|
12
|
+
public getInstance(serverUrl: string, reconnect: boolean = true, timeout: number = 5000): socketIOClient;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 连接socketIOServer
|
|
16
|
+
*/
|
|
17
|
+
public connect(): void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 断开socketIOServer
|
|
21
|
+
*/
|
|
22
|
+
public disconnect(): void;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 是否已连接
|
|
26
|
+
*/
|
|
27
|
+
public isConnected(): boolean;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 向服务器发送事件和数据
|
|
31
|
+
* @param eventName 事件名称
|
|
32
|
+
* @param data 数据
|
|
33
|
+
*/
|
|
34
|
+
public emit(eventName: string, data: string): void;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 向服务器发送事件和数据
|
|
38
|
+
* @param eventName 事件名称
|
|
39
|
+
* @param data 数据
|
|
40
|
+
* @param callback 服务器确认后的回调函数
|
|
41
|
+
*/
|
|
42
|
+
public emit(eventName: string, data: string, callback: function): void;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 监听事件
|
|
46
|
+
* @param eventName
|
|
47
|
+
* @param callback
|
|
48
|
+
*/
|
|
49
|
+
public on(eventName: string, callback: (data: string) => void): void;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 移除事件监听器
|
|
53
|
+
* @param eventName
|
|
54
|
+
* @param callback
|
|
55
|
+
*/
|
|
56
|
+
public off(eventName: string, callback: (data: string) => void): void;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 移除事件监听器
|
|
60
|
+
* @param eventName
|
|
61
|
+
*/
|
|
62
|
+
public off(eventName: string): void;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 移除所有事件监听器
|
|
66
|
+
*/
|
|
67
|
+
public off(): void;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 重置当前实例的是否重连
|
|
71
|
+
* @param bool 是否自动重连
|
|
72
|
+
*/
|
|
73
|
+
public setReconnect(bool: boolean): void;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { };
|
|
@@ -80,6 +80,18 @@ declare global {
|
|
|
80
80
|
*/
|
|
81
81
|
public desc(): string;
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
* 设置描述内容
|
|
85
|
+
* @param desc 要设置的内容
|
|
86
|
+
*/
|
|
87
|
+
public setDesc(desc: string): void;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 设置一个 辅助提示文本
|
|
91
|
+
* @param hintText 辅助文本
|
|
92
|
+
*/
|
|
93
|
+
public setHintText(hintText: string): void;
|
|
94
|
+
|
|
83
95
|
/**
|
|
84
96
|
* 获取控件的id
|
|
85
97
|
*/
|
package/README.md
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
## DeekeScript应用代码
|
|
2
|
-
|
|
3
|
-
**DeekeScript/deekeScript** 是采用DeekeScript框架开发✨模拟点击(代替人工操控基于Android的移动设备)✨类产品的模版。在环境安装好之后,拉取本仓库到本地,即可开启美妙的旅途~~
|
|
4
|
-
|
|
5
|
-
**最终能开发出什么样的应用❓请移步查阅:
|
|
6
|
-
[https://github.com/DeekeScript/ad-deeke](https://github.com/DeekeScript/ad-deeke)**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## 使用步骤
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
### 安装前准备
|
|
13
|
-
> 请移步到<a target="_blank" href="https://doc.deeke.cn">https://doc.deeke.cn</a> 或者 <a target="_blank" href="https://deekescript.github.io/">https://deekescript.github.io/</a>
|
|
14
|
-
>
|
|
15
|
-
> 阅读上述文档内容,并且安装相关软件和依赖
|
|
16
|
-
|
|
17
|
-
### 安装方式一:npm安装方式【推荐】
|
|
18
|
-
>
|
|
19
|
-
> 步骤一:创建文件夹
|
|
20
|
-
>
|
|
21
|
-
> 步骤二:执行下面的脚本
|
|
22
|
-
```npm i deeke-script-app```
|
|
23
|
-
|
|
24
|
-
### 安装方式二:git&npm安装方式
|
|
25
|
-
>
|
|
26
|
-
> git clone https://github.com/DeekeScript/deekeScript.git ./
|
|
27
|
-
>
|
|
28
|
-
> npm install
|
|
29
|
-
|
|
30
|
-
### 编写代码
|
|
31
|
-
> 请在src下创建代码文件
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## Tips 📢
|
|
35
|
-
> 文件夹@deekeScript请不要删除,此代码会提供代码提示能力~
|
|
1
|
+
## DeekeScript应用代码
|
|
2
|
+
|
|
3
|
+
**DeekeScript/deekeScript** 是采用DeekeScript框架开发✨模拟点击(代替人工操控基于Android的移动设备)✨类产品的模版。在环境安装好之后,拉取本仓库到本地,即可开启美妙的旅途~~
|
|
4
|
+
|
|
5
|
+
**最终能开发出什么样的应用❓请移步查阅:
|
|
6
|
+
[https://github.com/DeekeScript/ad-deeke](https://github.com/DeekeScript/ad-deeke)**
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## 使用步骤
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### 安装前准备
|
|
13
|
+
> 请移步到<a target="_blank" href="https://doc.deeke.cn">https://doc.deeke.cn</a> 或者 <a target="_blank" href="https://deekescript.github.io/">https://deekescript.github.io/</a>
|
|
14
|
+
>
|
|
15
|
+
> 阅读上述文档内容,并且安装相关软件和依赖
|
|
16
|
+
|
|
17
|
+
### 安装方式一:npm安装方式【推荐】
|
|
18
|
+
>
|
|
19
|
+
> 步骤一:创建文件夹
|
|
20
|
+
>
|
|
21
|
+
> 步骤二:执行下面的脚本
|
|
22
|
+
```npm i deeke-script-app```
|
|
23
|
+
|
|
24
|
+
### 安装方式二:git&npm安装方式
|
|
25
|
+
>
|
|
26
|
+
> git clone https://github.com/DeekeScript/deekeScript.git ./
|
|
27
|
+
>
|
|
28
|
+
> npm install
|
|
29
|
+
|
|
30
|
+
### 编写代码
|
|
31
|
+
> 请在src下创建代码文件
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Tips 📢
|
|
35
|
+
> 文件夹@deekeScript请不要删除,此代码会提供代码提示能力~
|