Comparing version 3.1.8-dev17 to 3.1.9-dev18
@@ -41,5 +41,8 @@ "use strict"; | ||
class default_1 extends clickgo.core.AbstractApp { | ||
main() { | ||
main(data) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
this.run(yield clickgo.form.create(main_1.default)); | ||
this.run(yield clickgo.form.create(main_1.default, { | ||
'param': (_a = data.param) !== null && _a !== void 0 ? _a : 'none' | ||
})); | ||
}); | ||
@@ -46,0 +49,0 @@ } |
@@ -80,2 +80,3 @@ "use strict"; | ||
this.ntab = ''; | ||
this.adata = {}; | ||
} | ||
@@ -261,3 +262,6 @@ openForm(name) { | ||
} | ||
onMounted(data) { | ||
this.adata = data; | ||
} | ||
} | ||
exports.default = default_1; |
@@ -70,3 +70,3 @@ /** | ||
/** --- App 的入口文件 --- */ | ||
public abstract main(): Promise<void>; | ||
public abstract main(data: Record<string, any>): Promise<void>; | ||
@@ -73,0 +73,0 @@ /** |
@@ -196,3 +196,3 @@ "use strict"; | ||
function run(url, opt = {}, ntid) { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c, _d, _e; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -1002,3 +1002,3 @@ if (!url.endsWith('/') && !url.endsWith('.cga')) { | ||
} | ||
catch (_e) { | ||
catch (_f) { | ||
} | ||
@@ -1071,3 +1071,3 @@ } | ||
exports.list[taskId].class = appCls; | ||
yield appCls.main(); | ||
yield appCls.main((_e = opt.data) !== null && _e !== void 0 ? _e : {}); | ||
return taskId; | ||
@@ -1074,0 +1074,0 @@ }); |
@@ -1189,3 +1189,3 @@ /** | ||
list[taskId].class = appCls; | ||
await appCls.main(); | ||
await appCls.main(opt.data ?? {}); | ||
return taskId; | ||
@@ -1192,0 +1192,0 @@ } |
{ | ||
"name": "clickgo", | ||
"version": "3.1.8-dev17", | ||
"version": "3.1.9-dev18", | ||
"description": "Background interface, software interface, mobile phone APP interface operation library.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -22,3 +22,3 @@ # ClickGo | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.4.6/dist/loader.min.js?path=index&npm={'clickgo':'3.1.7-dev16'}"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.4.8/dist/loader.min.js?path=index&npm={'clickgo':'3.1.9-dev18'}"></script> | ||
``` | ||
@@ -25,0 +25,0 @@ |
@@ -430,2 +430,4 @@ export * as control from '../dist/lib/control'; | ||
'permissions'?: string[]; | ||
/** --- 给 task 传值 --- */ | ||
'data'?: Record<string, any>; | ||
} | ||
@@ -432,0 +434,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1224142
26034