feat: compatible brower behavior

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-05-30 10:43:33 +08:00
parent c9ca4ffd39
commit c45bbb9821
10 changed files with 94 additions and 96 deletions

View File

@@ -58,9 +58,9 @@ export namespace task {
return this;
}
protected run(): void {
protected run(...args: any[]): void {
try {
this.func();
this.func(...args);
} catch (ex) {
console.console('§4插件执行任务时发生错误', ex)
console.ex(ex);
@@ -69,8 +69,9 @@ export namespace task {
/**
* 提交任务
* @param args 任务参数
*/
abstract submit(): Cancelable;
abstract submit(...args: any[]): Cancelable;
}
/**
* 返可取消的对象