clickgo 3.1.0-dev9 → 3.1.2-dev11
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/dist/app/demo/app.js +2 -1
- package/dist/app/demo/form/control/dialog/dialog.js +10 -6
- package/dist/app/demo/form/main.js +19 -0
- package/dist/app/demo/form/main.xml +4 -3
- package/dist/app/demo/form/method/aform/aform.js +57 -0
- package/dist/app/demo/form/method/aform/aform.xml +34 -0
- package/dist/app/demo/form/method/aform/test.xml +6 -0
- package/dist/app/demo/form/method/form/form.js +94 -110
- package/dist/app/demo/form/method/form/form.xml +13 -21
- package/dist/app/task/form/bar/bar.js +1 -1
- package/dist/clickgo.js +16 -4
- package/dist/clickgo.ts +21 -2
- package/dist/control/common.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/monaco.cgc +0 -0
- package/dist/control/property.cgc +0 -0
- package/dist/control/task.cgc +0 -0
- package/dist/global.css +1 -1
- package/dist/index.js +25 -5
- package/dist/index.ts +31 -5
- package/dist/lib/control.js +5 -1
- package/dist/lib/control.ts +5 -1
- package/dist/lib/form.js +100 -65
- package/dist/lib/form.ts +115 -70
- package/dist/lib/fs.js +1 -1
- package/dist/lib/fs.ts +1 -1
- package/dist/lib/native.js +1 -1
- package/dist/lib/native.ts +1 -1
- package/dist/lib/task.js +19 -26
- package/dist/lib/task.ts +20 -48
- package/dist/lib/tool.ts +1 -0
- package/dist/theme/familiar.cgt +0 -0
- package/package.json +1 -1
- package/types/index.d.ts +13 -15
- package/dist/app/demo/form/method/form/test.xml +0 -5
package/dist/lib/form.ts
CHANGED
|
@@ -78,7 +78,12 @@ const info: {
|
|
|
78
78
|
/** --- 窗体的抽象类 --- */
|
|
79
79
|
export class AbstractForm {
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
/**
|
|
82
|
+
* --- 创建窗体工厂函数 ---
|
|
83
|
+
* @param data 要传递的对象
|
|
84
|
+
* @param layout 是否使用此参数替换 layout 值
|
|
85
|
+
*/
|
|
86
|
+
public static async create(data?: Record<string, any>, layout?: string): Promise<AbstractForm | number> {
|
|
82
87
|
const frm = new this();
|
|
83
88
|
/** --- 要挂载的 vue 参数 --- */
|
|
84
89
|
const code: types.IFormCreateCode = {
|
|
@@ -118,9 +123,12 @@ export class AbstractForm {
|
|
|
118
123
|
for (const item of cdata) {
|
|
119
124
|
code.data![item[0]] = item[1];
|
|
120
125
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
if (!layout) {
|
|
127
|
+
const l = task.list[frm.taskId].app.files[frm.filename.slice(0, -2) + 'xml'];
|
|
128
|
+
if (typeof l !== 'string') {
|
|
129
|
+
return 0;
|
|
130
|
+
}
|
|
131
|
+
layout = l;
|
|
124
132
|
}
|
|
125
133
|
const prot = tool.getClassPrototype(frm);
|
|
126
134
|
code.methods = prot.method;
|
|
@@ -285,6 +293,26 @@ export class AbstractForm {
|
|
|
285
293
|
|
|
286
294
|
// --- 以下为窗体有,但 control 没有 ---
|
|
287
295
|
|
|
296
|
+
/**
|
|
297
|
+
* --- 无 js 文件的窗体创建 ---
|
|
298
|
+
* @param path 包内相对于本窗体的路径或包内绝对路径,不含扩展名
|
|
299
|
+
* @param data 要传递的值
|
|
300
|
+
*/
|
|
301
|
+
public async createForm(path: string, data?: Record<string, any>): Promise<AbstractForm | number> {
|
|
302
|
+
path = tool.urlResolve(this.filename, path);
|
|
303
|
+
const taskId = this.taskId;
|
|
304
|
+
const cls = class extends AbstractForm {
|
|
305
|
+
public get filename(): string {
|
|
306
|
+
return path + '.js';
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
public get taskId(): number {
|
|
310
|
+
return taskId;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
return cls.create(data);
|
|
314
|
+
}
|
|
315
|
+
|
|
288
316
|
/** --- 是否是置顶 --- */
|
|
289
317
|
public get topMost(): boolean {
|
|
290
318
|
// --- 将在初始化时系统自动重写本函数 ---
|
|
@@ -324,7 +352,7 @@ export class AbstractForm {
|
|
|
324
352
|
public show(): void {
|
|
325
353
|
// --- 创建成功的窗体,可以直接显示 ---
|
|
326
354
|
const v = this as any;
|
|
327
|
-
v.$refs.form.$data.
|
|
355
|
+
v.$refs.form.$data.isShow = true;
|
|
328
356
|
if (this._firstShow) {
|
|
329
357
|
this._firstShow = false;
|
|
330
358
|
// --- 将窗体居中 ---
|
|
@@ -337,7 +365,7 @@ export class AbstractForm {
|
|
|
337
365
|
v.$refs.form.setPropData('top', (area.height - v.$el.offsetHeight) / 2);
|
|
338
366
|
}
|
|
339
367
|
}
|
|
340
|
-
v.$refs.form.$data.
|
|
368
|
+
v.$refs.form.$data.isShow = true;
|
|
341
369
|
changeFocus(this.formId);
|
|
342
370
|
}
|
|
343
371
|
}
|
|
@@ -346,6 +374,7 @@ export class AbstractForm {
|
|
|
346
374
|
* --- 显示独占的窗体 ---
|
|
347
375
|
*/
|
|
348
376
|
public async showDialog(): Promise<string> {
|
|
377
|
+
this.topMost = true;
|
|
349
378
|
this.show();
|
|
350
379
|
task.list[this.taskId].runtime.dialogFormIds.push(this.formId);
|
|
351
380
|
return new Promise((resolve) => {
|
|
@@ -360,7 +389,7 @@ export class AbstractForm {
|
|
|
360
389
|
*/
|
|
361
390
|
public hide(): void {
|
|
362
391
|
const v = this as any;
|
|
363
|
-
v.$refs.form.$data.
|
|
392
|
+
v.$refs.form.$data.isShow = false;
|
|
364
393
|
}
|
|
365
394
|
|
|
366
395
|
/**
|
|
@@ -547,7 +576,8 @@ const elements: {
|
|
|
547
576
|
/** --- clickgo 所有的 div wrap --- */
|
|
548
577
|
this.wrap.id = 'cg-wrap';
|
|
549
578
|
document.getElementsByTagName('body')[0].appendChild(this.wrap);
|
|
550
|
-
if (clickgo.
|
|
579
|
+
if (clickgo.isImmersion()) {
|
|
580
|
+
// --- 只有沉浸式模式(Windows 下非 frame 的 native)才会绑定这个事件 ---
|
|
551
581
|
this.wrap.addEventListener('mouseenter', function() {
|
|
552
582
|
native.invoke('cg-mouse-ignore', native.getToken(), false);
|
|
553
583
|
});
|
|
@@ -1012,10 +1042,10 @@ export function get(formId: number): types.IFormInfo | null {
|
|
|
1012
1042
|
return {
|
|
1013
1043
|
'taskId': taskId,
|
|
1014
1044
|
'title': item.vroot.$refs.form.title,
|
|
1015
|
-
'icon': item.vroot.$refs.form.
|
|
1045
|
+
'icon': item.vroot.$refs.form.iconDataUrl,
|
|
1016
1046
|
'stateMax': item.vroot.$refs.form.stateMaxData,
|
|
1017
1047
|
'stateMin': item.vroot.$refs.form.stateMinData,
|
|
1018
|
-
'show': item.vroot.$refs.form.
|
|
1048
|
+
'show': item.vroot.$refs.form.isShow,
|
|
1019
1049
|
'focus': item.vroot.formFocus
|
|
1020
1050
|
};
|
|
1021
1051
|
}
|
|
@@ -1048,10 +1078,10 @@ export function getList(taskId: number): Record<string, types.IFormInfo> {
|
|
|
1048
1078
|
list[fid] = {
|
|
1049
1079
|
'taskId': taskId,
|
|
1050
1080
|
'title': item.vroot.$refs.form.title,
|
|
1051
|
-
'icon': item.vroot.$refs.form.
|
|
1081
|
+
'icon': item.vroot.$refs.form.iconDataUrl,
|
|
1052
1082
|
'stateMax': item.vroot.$refs.form.stateMaxData,
|
|
1053
1083
|
'stateMin': item.vroot.$refs.form.stateMinData,
|
|
1054
|
-
'show': item.vroot.$refs.form.
|
|
1084
|
+
'show': item.vroot.$refs.form.isShow,
|
|
1055
1085
|
'focus': item.vroot.formFocus
|
|
1056
1086
|
};
|
|
1057
1087
|
}
|
|
@@ -1106,40 +1136,39 @@ export function changeFocus(formId: number = 0): void {
|
|
|
1106
1136
|
// --- 获取所属的 taskId ---
|
|
1107
1137
|
const taskId: number = parseInt(el.getAttribute('data-task-id') ?? '0');
|
|
1108
1138
|
const t = task.list[taskId];
|
|
1109
|
-
// --- 如果不是自定义的 zindex,则设置 zIndex 为最大 ---
|
|
1110
|
-
if (t.forms[formId].vroot._topMost) {
|
|
1111
|
-
t.forms[formId].vroot.$refs.form.$data.zIndexData = ++info.topLastZIndex;
|
|
1112
|
-
}
|
|
1113
|
-
else {
|
|
1114
|
-
t.forms[formId].vroot.$refs.form.$data.zIndexData = ++info.lastZIndex;
|
|
1115
|
-
}
|
|
1116
1139
|
// --- 检测是否有 dialog mask 层 ---
|
|
1117
1140
|
if (t.runtime.dialogFormIds.length) {
|
|
1118
1141
|
// --- 有 dialog ---
|
|
1119
1142
|
const dialogFormId = t.runtime.dialogFormIds[t.runtime.dialogFormIds.length - 1];
|
|
1120
|
-
// ---
|
|
1143
|
+
// --- 如果是最小化状态的话,需要还原 ---
|
|
1144
|
+
if (get(dialogFormId)!.stateMin) {
|
|
1145
|
+
min(dialogFormId);
|
|
1146
|
+
}
|
|
1147
|
+
if (t.forms[dialogFormId].vroot._topMost) {
|
|
1148
|
+
t.forms[dialogFormId].vroot.$refs.form.$data.zIndex = ++info.topLastZIndex;
|
|
1149
|
+
}
|
|
1150
|
+
else {
|
|
1151
|
+
t.forms[dialogFormId].vroot.$refs.form.$data.zIndex = ++info.lastZIndex;
|
|
1152
|
+
}
|
|
1153
|
+
// --- 开启 focus ---
|
|
1154
|
+
t.forms[dialogFormId].vapp._container.dataset.formFocus = '';
|
|
1155
|
+
t.forms[dialogFormId].vroot._formFocus = true;
|
|
1156
|
+
// --- 触发 formFocused 事件 ---
|
|
1157
|
+
core.trigger('formFocused', taskId, dialogFormId);
|
|
1158
|
+
// --- 判断点击的窗体是不是就是 dialog mask 窗体本身 ---
|
|
1121
1159
|
if (dialogFormId !== formId) {
|
|
1122
|
-
// --- 如果是最小化状态的话,需要还原 ---
|
|
1123
|
-
if (get(dialogFormId)!.stateMin) {
|
|
1124
|
-
min(dialogFormId);
|
|
1125
|
-
}
|
|
1126
|
-
// --- 如果不是自定义的 zindex,则设置 zIndex 为最大 ---
|
|
1127
|
-
if (task.list[taskId].forms[dialogFormId].vroot._topMost) {
|
|
1128
|
-
task.list[taskId].forms[dialogFormId].vroot.$refs.form.$data.zIndexData = ++info.topLastZIndex;
|
|
1129
|
-
}
|
|
1130
|
-
else {
|
|
1131
|
-
task.list[taskId].forms[dialogFormId].vroot.$refs.form.$data.zIndexData = ++info.lastZIndex;
|
|
1132
|
-
}
|
|
1133
|
-
// --- 开启 focus ---
|
|
1134
|
-
task.list[taskId].forms[dialogFormId].vapp._container.dataset.formFocus = '';
|
|
1135
|
-
task.list[taskId].forms[dialogFormId].vroot._formFocus = true;
|
|
1136
|
-
// --- 触发 formFocused 事件 ---
|
|
1137
|
-
core.trigger('formFocused', taskId, dialogFormId);
|
|
1138
1160
|
// --- 闪烁 ---
|
|
1139
1161
|
clickgo.form.flash(dialogFormId, taskId);
|
|
1140
1162
|
}
|
|
1141
1163
|
}
|
|
1142
1164
|
else {
|
|
1165
|
+
// --- 没有 dialog,才修改 zindex ---
|
|
1166
|
+
if (t.forms[formId].vroot._topMost) {
|
|
1167
|
+
t.forms[formId].vroot.$refs.form.$data.zIndex = ++info.topLastZIndex;
|
|
1168
|
+
}
|
|
1169
|
+
else {
|
|
1170
|
+
t.forms[formId].vroot.$refs.form.$data.zIndex = ++info.lastZIndex;
|
|
1171
|
+
}
|
|
1143
1172
|
// --- 正常开启 focus ---
|
|
1144
1173
|
t.forms[formId].vapp._container.dataset.formFocus = '';
|
|
1145
1174
|
t.forms[formId].vroot._formFocus = true;
|
|
@@ -1797,13 +1826,13 @@ export function remove(formId: number): boolean {
|
|
|
1797
1826
|
let icon = '';
|
|
1798
1827
|
if (task.list[taskId].forms[formId]) {
|
|
1799
1828
|
title = task.list[taskId].forms[formId].vroot.$refs.form.title;
|
|
1800
|
-
icon = task.list[taskId].forms[formId].vroot.$refs.form.
|
|
1829
|
+
icon = task.list[taskId].forms[formId].vroot.$refs.form.iconDataUrl;
|
|
1801
1830
|
const io = task.list[taskId].runtime.dialogFormIds.indexOf(formId);
|
|
1802
1831
|
if (io > -1) {
|
|
1803
1832
|
// --- 取消 dialog mask 记录 ---
|
|
1804
1833
|
task.list[taskId].runtime.dialogFormIds.splice(io, 1);
|
|
1805
1834
|
}
|
|
1806
|
-
task.list[taskId].forms[formId].vroot.$refs.form.$data.
|
|
1835
|
+
task.list[taskId].forms[formId].vroot.$refs.form.$data.isShow = false;
|
|
1807
1836
|
setTimeout(function() {
|
|
1808
1837
|
// --- 获取最大的 z index 窗体,并让他获取焦点 ---
|
|
1809
1838
|
const fid = getMaxZIndexID({
|
|
@@ -1999,13 +2028,13 @@ export async function create(opt: types.IFormCreateOptions): Promise<number> {
|
|
|
1999
2028
|
changeFocus(form.id);
|
|
2000
2029
|
}
|
|
2001
2030
|
else {
|
|
2002
|
-
form.vroot.$refs.form.$data.
|
|
2031
|
+
form.vroot.$refs.form.$data.zIndex = ++info.topLastZIndex;
|
|
2003
2032
|
}
|
|
2004
2033
|
}
|
|
2005
2034
|
else {
|
|
2006
2035
|
// --- 取消置顶 ---
|
|
2007
2036
|
form.vroot.$data._topMost = false;
|
|
2008
|
-
form.vroot.$refs.form.$data.
|
|
2037
|
+
form.vroot.$refs.form.$data.zIndex = ++info.lastZIndex;
|
|
2009
2038
|
}
|
|
2010
2039
|
return;
|
|
2011
2040
|
}
|
|
@@ -2041,7 +2070,7 @@ export async function create(opt: types.IFormCreateOptions): Promise<number> {
|
|
|
2041
2070
|
'current': t.current,
|
|
2042
2071
|
'files': t.app.files
|
|
2043
2072
|
});
|
|
2044
|
-
this.$refs.form.
|
|
2073
|
+
this.$refs.form.iconDataUrl = (icon instanceof Blob) ? await tool.blob2DataUrl(icon) : '';
|
|
2045
2074
|
}
|
|
2046
2075
|
// --- 完成 ---
|
|
2047
2076
|
resolve({
|
|
@@ -2103,7 +2132,16 @@ export async function create(opt: types.IFormCreateOptions): Promise<number> {
|
|
|
2103
2132
|
}
|
|
2104
2133
|
}
|
|
2105
2134
|
// --- 触发 formCreated 事件 ---
|
|
2106
|
-
core.trigger('formCreated', opt.taskId, formId, rtn.vroot.$refs.form.title, rtn.vroot.$refs.form.
|
|
2135
|
+
core.trigger('formCreated', opt.taskId, formId, rtn.vroot.$refs.form.title, rtn.vroot.$refs.form.iconDataUrl);
|
|
2136
|
+
// --- 判断是否要与 native 实体窗体大小同步 ---
|
|
2137
|
+
if (clickgo.isNative() && (formId === 1) && !clickgo.isImmersion() && !clickgo.hasFrame()) {
|
|
2138
|
+
rtn.vroot.$refs.form.isNativeSync = true;
|
|
2139
|
+
native.invoke('cg-set-size', native.getToken(), rtn.vroot.$refs.form.$el.offsetWidth, rtn.vroot.$refs.form.$el.offsetHeight);
|
|
2140
|
+
window.addEventListener('resize', function(): void {
|
|
2141
|
+
rtn.vroot.$refs.form.setPropData('width', window.innerWidth);
|
|
2142
|
+
rtn.vroot.$refs.form.setPropData('height', window.innerHeight);
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2107
2145
|
return formId;
|
|
2108
2146
|
}
|
|
2109
2147
|
|
|
@@ -2118,7 +2156,8 @@ export function dialog(opt: string | types.IFormDialogOptions): Promise<string>
|
|
|
2118
2156
|
'content': opt
|
|
2119
2157
|
};
|
|
2120
2158
|
}
|
|
2121
|
-
const
|
|
2159
|
+
const nopt = opt;
|
|
2160
|
+
const taskId = nopt.taskId;
|
|
2122
2161
|
if (!taskId) {
|
|
2123
2162
|
resolve('');
|
|
2124
2163
|
return;
|
|
@@ -2129,36 +2168,42 @@ export function dialog(opt: string | types.IFormDialogOptions): Promise<string>
|
|
|
2129
2168
|
return;
|
|
2130
2169
|
}
|
|
2131
2170
|
const locale = t.locale.lang || core.config.locale;
|
|
2132
|
-
if (
|
|
2133
|
-
|
|
2171
|
+
if (nopt.buttons === undefined) {
|
|
2172
|
+
nopt.buttons = [info.locale[locale]?.ok ?? info.locale['en'].ok];
|
|
2134
2173
|
}
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
};
|
|
2148
|
-
(opt as types.IFormDialogOptions).select?.(event as unknown as Event, button);
|
|
2149
|
-
if (event.go) {
|
|
2150
|
-
this.dialogResult = button;
|
|
2151
|
-
close(this.formId);
|
|
2152
|
-
}
|
|
2174
|
+
const cls = class extends AbstractForm {
|
|
2175
|
+
public buttons = nopt.buttons;
|
|
2176
|
+
|
|
2177
|
+
public get taskId(): number {
|
|
2178
|
+
return taskId;
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
public select(button: string): void {
|
|
2182
|
+
const event = {
|
|
2183
|
+
'go': true,
|
|
2184
|
+
preventDefault: function() {
|
|
2185
|
+
this.go = false;
|
|
2153
2186
|
}
|
|
2187
|
+
};
|
|
2188
|
+
nopt.select?.(event as unknown as Event, button);
|
|
2189
|
+
if (event.go) {
|
|
2190
|
+
this.dialogResult = button;
|
|
2191
|
+
close(this.formId);
|
|
2154
2192
|
}
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2193
|
+
}
|
|
2194
|
+
};
|
|
2195
|
+
cls.create(undefined, `<form title="${nopt.title ?? 'dialog'}" min="false" max="false" resize="false" height="0" border="${nopt.title ? 'normal' : 'plain'}" direction="v"><dialog :buttons="buttons" @select="select"${nopt.direction ? ` direction="${nopt.direction}"` : ''}>${nopt.content}</dialog></form>`).then((frm) => {
|
|
2196
|
+
if (typeof frm === 'number') {
|
|
2197
|
+
resolve('');
|
|
2198
|
+
return;
|
|
2199
|
+
}
|
|
2200
|
+
frm.showDialog().then((v) => {
|
|
2201
|
+
resolve(v);
|
|
2202
|
+
}).catch(() => {
|
|
2203
|
+
resolve('');
|
|
2204
|
+
});
|
|
2205
|
+
}).catch(() => {
|
|
2206
|
+
resolve('');
|
|
2162
2207
|
});
|
|
2163
2208
|
});
|
|
2164
2209
|
}
|
package/dist/lib/fs.js
CHANGED
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.copyFile = exports.copyFolder = exports.readDir = exports.rename = exports.chmod = exports.rmdirDeep = exports.rmdir = exports.mkdir = exports.isFile = exports.isDir = exports.stats = exports.unlink = exports.symlink = exports.readLink = exports.putContent = exports.getContent = void 0;
|
|
13
13
|
const tool = require("./tool");
|
|
14
|
-
const clickgoFiles = ['/app/', '/app/demo/', '/app/demo/app.js', '/app/demo/form/', '/app/demo/form/control/', '/app/demo/form/control/block/', '/app/demo/form/control/block/block.css', '/app/demo/form/control/block/block.xml', '/app/demo/form/control/button/', '/app/demo/form/control/button/button.css', '/app/demo/form/control/button/button.js', '/app/demo/form/control/button/button.xml', '/app/demo/form/control/check/', '/app/demo/form/control/check/check.js', '/app/demo/form/control/check/check.xml', '/app/demo/form/control/dialog/', '/app/demo/form/control/dialog/dialog.js', '/app/demo/form/control/dialog/dialog.xml', '/app/demo/form/control/file/', '/app/demo/form/control/file/file.js', '/app/demo/form/control/file/file.xml', '/app/demo/form/control/form/', '/app/demo/form/control/form/form.css', '/app/demo/form/control/form/form.js', '/app/demo/form/control/form/form.xml', '/app/demo/form/control/greatview/', '/app/demo/form/control/greatview/greatview.css', '/app/demo/form/control/greatview/greatview.js', '/app/demo/form/control/greatview/greatview.xml', '/app/demo/form/control/img/', '/app/demo/form/control/img/img.xml', '/app/demo/form/control/label/', '/app/demo/form/control/label/label.xml', '/app/demo/form/control/list/', '/app/demo/form/control/list/list.css', '/app/demo/form/control/list/list.js', '/app/demo/form/control/list/list.xml', '/app/demo/form/control/loading/', '/app/demo/form/control/loading/loading.xml', '/app/demo/form/control/marquee/', '/app/demo/form/control/marquee/marquee.js', '/app/demo/form/control/marquee/marquee.xml', '/app/demo/form/control/menu/', '/app/demo/form/control/menu/menu.js', '/app/demo/form/control/menu/menu.xml', '/app/demo/form/control/monaco/', '/app/demo/form/control/monaco/monaco.js', '/app/demo/form/control/monaco/monaco.xml', '/app/demo/form/control/overflow/', '/app/demo/form/control/overflow/overflow.css', '/app/demo/form/control/overflow/overflow.js', '/app/demo/form/control/overflow/overflow.xml', '/app/demo/form/control/property/', '/app/demo/form/control/property/property.js', '/app/demo/form/control/property/property.xml', '/app/demo/form/control/radio/', '/app/demo/form/control/radio/radio.js', '/app/demo/form/control/radio/radio.xml', '/app/demo/form/control/scroll/', '/app/demo/form/control/scroll/scroll.js', '/app/demo/form/control/scroll/scroll.xml', '/app/demo/form/control/select/', '/app/demo/form/control/select/select.js', '/app/demo/form/control/select/select.xml', '/app/demo/form/control/tab/', '/app/demo/form/control/tab/tab.js', '/app/demo/form/control/tab/tab.xml', '/app/demo/form/control/text/', '/app/demo/form/control/text/text.js', '/app/demo/form/control/text/text.xml', '/app/demo/form/control/view/', '/app/demo/form/control/view/view.css', '/app/demo/form/control/view/view.js', '/app/demo/form/control/view/view.xml', '/app/demo/form/event/', '/app/demo/form/event/form/', '/app/demo/form/event/form/form.css', '/app/demo/form/event/form/form.js', '/app/demo/form/event/form/form.xml', '/app/demo/form/event/screen/', '/app/demo/form/event/screen/screen.js', '/app/demo/form/event/screen/screen.xml', '/app/demo/form/event/task/', '/app/demo/form/event/task/task.js', '/app/demo/form/event/task/task.xml', '/app/demo/form/main.css', '/app/demo/form/main.js', '/app/demo/form/main.xml', '/app/demo/form/method/', '/app/demo/form/method/
|
|
14
|
+
const clickgoFiles = ['/app/', '/app/demo/', '/app/demo/app.js', '/app/demo/form/', '/app/demo/form/control/', '/app/demo/form/control/block/', '/app/demo/form/control/block/block.css', '/app/demo/form/control/block/block.xml', '/app/demo/form/control/button/', '/app/demo/form/control/button/button.css', '/app/demo/form/control/button/button.js', '/app/demo/form/control/button/button.xml', '/app/demo/form/control/check/', '/app/demo/form/control/check/check.js', '/app/demo/form/control/check/check.xml', '/app/demo/form/control/dialog/', '/app/demo/form/control/dialog/dialog.js', '/app/demo/form/control/dialog/dialog.xml', '/app/demo/form/control/file/', '/app/demo/form/control/file/file.js', '/app/demo/form/control/file/file.xml', '/app/demo/form/control/form/', '/app/demo/form/control/form/form.css', '/app/demo/form/control/form/form.js', '/app/demo/form/control/form/form.xml', '/app/demo/form/control/greatview/', '/app/demo/form/control/greatview/greatview.css', '/app/demo/form/control/greatview/greatview.js', '/app/demo/form/control/greatview/greatview.xml', '/app/demo/form/control/img/', '/app/demo/form/control/img/img.xml', '/app/demo/form/control/label/', '/app/demo/form/control/label/label.xml', '/app/demo/form/control/list/', '/app/demo/form/control/list/list.css', '/app/demo/form/control/list/list.js', '/app/demo/form/control/list/list.xml', '/app/demo/form/control/loading/', '/app/demo/form/control/loading/loading.xml', '/app/demo/form/control/marquee/', '/app/demo/form/control/marquee/marquee.js', '/app/demo/form/control/marquee/marquee.xml', '/app/demo/form/control/menu/', '/app/demo/form/control/menu/menu.js', '/app/demo/form/control/menu/menu.xml', '/app/demo/form/control/monaco/', '/app/demo/form/control/monaco/monaco.js', '/app/demo/form/control/monaco/monaco.xml', '/app/demo/form/control/overflow/', '/app/demo/form/control/overflow/overflow.css', '/app/demo/form/control/overflow/overflow.js', '/app/demo/form/control/overflow/overflow.xml', '/app/demo/form/control/property/', '/app/demo/form/control/property/property.js', '/app/demo/form/control/property/property.xml', '/app/demo/form/control/radio/', '/app/demo/form/control/radio/radio.js', '/app/demo/form/control/radio/radio.xml', '/app/demo/form/control/scroll/', '/app/demo/form/control/scroll/scroll.js', '/app/demo/form/control/scroll/scroll.xml', '/app/demo/form/control/select/', '/app/demo/form/control/select/select.js', '/app/demo/form/control/select/select.xml', '/app/demo/form/control/tab/', '/app/demo/form/control/tab/tab.js', '/app/demo/form/control/tab/tab.xml', '/app/demo/form/control/text/', '/app/demo/form/control/text/text.js', '/app/demo/form/control/text/text.xml', '/app/demo/form/control/view/', '/app/demo/form/control/view/view.css', '/app/demo/form/control/view/view.js', '/app/demo/form/control/view/view.xml', '/app/demo/form/event/', '/app/demo/form/event/form/', '/app/demo/form/event/form/form.css', '/app/demo/form/event/form/form.js', '/app/demo/form/event/form/form.xml', '/app/demo/form/event/screen/', '/app/demo/form/event/screen/screen.js', '/app/demo/form/event/screen/screen.xml', '/app/demo/form/event/task/', '/app/demo/form/event/task/task.js', '/app/demo/form/event/task/task.xml', '/app/demo/form/main.css', '/app/demo/form/main.js', '/app/demo/form/main.xml', '/app/demo/form/method/', '/app/demo/form/method/aform/', '/app/demo/form/method/aform/aform.js', '/app/demo/form/method/aform/aform.xml', '/app/demo/form/method/aform/test.xml', '/app/demo/form/method/core/', '/app/demo/form/method/core/core.js', '/app/demo/form/method/core/core.xml', '/app/demo/form/method/dom/', '/app/demo/form/method/dom/dom.css', '/app/demo/form/method/dom/dom.js', '/app/demo/form/method/dom/dom.xml', '/app/demo/form/method/form/', '/app/demo/form/method/form/form.css', '/app/demo/form/method/form/form.js', '/app/demo/form/method/form/form.xml', '/app/demo/form/method/fs/', '/app/demo/form/method/fs/fs.js', '/app/demo/form/method/fs/fs.xml', '/app/demo/form/method/fs/text.js', '/app/demo/form/method/fs/text.xml', '/app/demo/form/method/task/', '/app/demo/form/method/task/locale1.json', '/app/demo/form/method/task/locale2.json', '/app/demo/form/method/task/task.js', '/app/demo/form/method/task/task.xml', '/app/demo/form/method/theme/', '/app/demo/form/method/theme/theme.js', '/app/demo/form/method/theme/theme.xml', '/app/demo/form/method/tool/', '/app/demo/form/method/tool/tool.js', '/app/demo/form/method/tool/tool.xml', '/app/demo/form/method/zip/', '/app/demo/form/method/zip/zip.js', '/app/demo/form/method/zip/zip.xml', '/app/demo/global.css', '/app/demo/res/', '/app/demo/res/icon.svg', '/app/demo/res/img.jpg', '/app/demo/res/r-1.svg', '/app/demo/res/r-2.svg', '/app/demo/res/sql.svg', '/app/demo/res/txt.svg', '/app/demo/res/zip.svg', '/app/task/', '/app/task/app.js', '/app/task/form/', '/app/task/form/bar/', '/app/task/form/bar/bar.js', '/app/task/form/bar/bar.xml', '/app/task/form/desktop/', '/app/task/form/desktop/desktop.xml', '/app/task/locale/', '/app/task/locale/en.json', '/app/task/locale/ja.json', '/app/task/locale/sc.json', '/app/task/locale/tc.json', '/clickgo.js', '/clickgo.ts', '/control/', '/control/common.cgc', '/control/form.cgc', '/control/monaco.cgc', '/control/property.cgc', '/control/task.cgc', '/global.css', '/icon.png', '/index.js', '/index.ts', '/lib/', '/lib/control.js', '/lib/control.ts', '/lib/core.js', '/lib/core.ts', '/lib/dom.js', '/lib/dom.ts', '/lib/form.js', '/lib/form.ts', '/lib/fs.js', '/lib/fs.ts', '/lib/native.js', '/lib/native.ts', '/lib/task.js', '/lib/task.ts', '/lib/theme.js', '/lib/theme.ts', '/lib/tool.js', '/lib/tool.ts', '/lib/zip.js', '/lib/zip.ts', '/theme/', '/theme/familiar.cgt'];
|
|
15
15
|
function getContent(path, options) {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
path = tool.urlResolve('/', path);
|
package/dist/lib/fs.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import * as types from '../../types';
|
|
9
9
|
import * as tool from './tool';
|
|
10
10
|
|
|
11
|
-
const clickgoFiles = ['/app/', '/app/demo/', '/app/demo/app.js', '/app/demo/form/', '/app/demo/form/control/', '/app/demo/form/control/block/', '/app/demo/form/control/block/block.css', '/app/demo/form/control/block/block.xml', '/app/demo/form/control/button/', '/app/demo/form/control/button/button.css', '/app/demo/form/control/button/button.js', '/app/demo/form/control/button/button.xml', '/app/demo/form/control/check/', '/app/demo/form/control/check/check.js', '/app/demo/form/control/check/check.xml', '/app/demo/form/control/dialog/', '/app/demo/form/control/dialog/dialog.js', '/app/demo/form/control/dialog/dialog.xml', '/app/demo/form/control/file/', '/app/demo/form/control/file/file.js', '/app/demo/form/control/file/file.xml', '/app/demo/form/control/form/', '/app/demo/form/control/form/form.css', '/app/demo/form/control/form/form.js', '/app/demo/form/control/form/form.xml', '/app/demo/form/control/greatview/', '/app/demo/form/control/greatview/greatview.css', '/app/demo/form/control/greatview/greatview.js', '/app/demo/form/control/greatview/greatview.xml', '/app/demo/form/control/img/', '/app/demo/form/control/img/img.xml', '/app/demo/form/control/label/', '/app/demo/form/control/label/label.xml', '/app/demo/form/control/list/', '/app/demo/form/control/list/list.css', '/app/demo/form/control/list/list.js', '/app/demo/form/control/list/list.xml', '/app/demo/form/control/loading/', '/app/demo/form/control/loading/loading.xml', '/app/demo/form/control/marquee/', '/app/demo/form/control/marquee/marquee.js', '/app/demo/form/control/marquee/marquee.xml', '/app/demo/form/control/menu/', '/app/demo/form/control/menu/menu.js', '/app/demo/form/control/menu/menu.xml', '/app/demo/form/control/monaco/', '/app/demo/form/control/monaco/monaco.js', '/app/demo/form/control/monaco/monaco.xml', '/app/demo/form/control/overflow/', '/app/demo/form/control/overflow/overflow.css', '/app/demo/form/control/overflow/overflow.js', '/app/demo/form/control/overflow/overflow.xml', '/app/demo/form/control/property/', '/app/demo/form/control/property/property.js', '/app/demo/form/control/property/property.xml', '/app/demo/form/control/radio/', '/app/demo/form/control/radio/radio.js', '/app/demo/form/control/radio/radio.xml', '/app/demo/form/control/scroll/', '/app/demo/form/control/scroll/scroll.js', '/app/demo/form/control/scroll/scroll.xml', '/app/demo/form/control/select/', '/app/demo/form/control/select/select.js', '/app/demo/form/control/select/select.xml', '/app/demo/form/control/tab/', '/app/demo/form/control/tab/tab.js', '/app/demo/form/control/tab/tab.xml', '/app/demo/form/control/text/', '/app/demo/form/control/text/text.js', '/app/demo/form/control/text/text.xml', '/app/demo/form/control/view/', '/app/demo/form/control/view/view.css', '/app/demo/form/control/view/view.js', '/app/demo/form/control/view/view.xml', '/app/demo/form/event/', '/app/demo/form/event/form/', '/app/demo/form/event/form/form.css', '/app/demo/form/event/form/form.js', '/app/demo/form/event/form/form.xml', '/app/demo/form/event/screen/', '/app/demo/form/event/screen/screen.js', '/app/demo/form/event/screen/screen.xml', '/app/demo/form/event/task/', '/app/demo/form/event/task/task.js', '/app/demo/form/event/task/task.xml', '/app/demo/form/main.css', '/app/demo/form/main.js', '/app/demo/form/main.xml', '/app/demo/form/method/', '/app/demo/form/method/
|
|
11
|
+
const clickgoFiles = ['/app/', '/app/demo/', '/app/demo/app.js', '/app/demo/form/', '/app/demo/form/control/', '/app/demo/form/control/block/', '/app/demo/form/control/block/block.css', '/app/demo/form/control/block/block.xml', '/app/demo/form/control/button/', '/app/demo/form/control/button/button.css', '/app/demo/form/control/button/button.js', '/app/demo/form/control/button/button.xml', '/app/demo/form/control/check/', '/app/demo/form/control/check/check.js', '/app/demo/form/control/check/check.xml', '/app/demo/form/control/dialog/', '/app/demo/form/control/dialog/dialog.js', '/app/demo/form/control/dialog/dialog.xml', '/app/demo/form/control/file/', '/app/demo/form/control/file/file.js', '/app/demo/form/control/file/file.xml', '/app/demo/form/control/form/', '/app/demo/form/control/form/form.css', '/app/demo/form/control/form/form.js', '/app/demo/form/control/form/form.xml', '/app/demo/form/control/greatview/', '/app/demo/form/control/greatview/greatview.css', '/app/demo/form/control/greatview/greatview.js', '/app/demo/form/control/greatview/greatview.xml', '/app/demo/form/control/img/', '/app/demo/form/control/img/img.xml', '/app/demo/form/control/label/', '/app/demo/form/control/label/label.xml', '/app/demo/form/control/list/', '/app/demo/form/control/list/list.css', '/app/demo/form/control/list/list.js', '/app/demo/form/control/list/list.xml', '/app/demo/form/control/loading/', '/app/demo/form/control/loading/loading.xml', '/app/demo/form/control/marquee/', '/app/demo/form/control/marquee/marquee.js', '/app/demo/form/control/marquee/marquee.xml', '/app/demo/form/control/menu/', '/app/demo/form/control/menu/menu.js', '/app/demo/form/control/menu/menu.xml', '/app/demo/form/control/monaco/', '/app/demo/form/control/monaco/monaco.js', '/app/demo/form/control/monaco/monaco.xml', '/app/demo/form/control/overflow/', '/app/demo/form/control/overflow/overflow.css', '/app/demo/form/control/overflow/overflow.js', '/app/demo/form/control/overflow/overflow.xml', '/app/demo/form/control/property/', '/app/demo/form/control/property/property.js', '/app/demo/form/control/property/property.xml', '/app/demo/form/control/radio/', '/app/demo/form/control/radio/radio.js', '/app/demo/form/control/radio/radio.xml', '/app/demo/form/control/scroll/', '/app/demo/form/control/scroll/scroll.js', '/app/demo/form/control/scroll/scroll.xml', '/app/demo/form/control/select/', '/app/demo/form/control/select/select.js', '/app/demo/form/control/select/select.xml', '/app/demo/form/control/tab/', '/app/demo/form/control/tab/tab.js', '/app/demo/form/control/tab/tab.xml', '/app/demo/form/control/text/', '/app/demo/form/control/text/text.js', '/app/demo/form/control/text/text.xml', '/app/demo/form/control/view/', '/app/demo/form/control/view/view.css', '/app/demo/form/control/view/view.js', '/app/demo/form/control/view/view.xml', '/app/demo/form/event/', '/app/demo/form/event/form/', '/app/demo/form/event/form/form.css', '/app/demo/form/event/form/form.js', '/app/demo/form/event/form/form.xml', '/app/demo/form/event/screen/', '/app/demo/form/event/screen/screen.js', '/app/demo/form/event/screen/screen.xml', '/app/demo/form/event/task/', '/app/demo/form/event/task/task.js', '/app/demo/form/event/task/task.xml', '/app/demo/form/main.css', '/app/demo/form/main.js', '/app/demo/form/main.xml', '/app/demo/form/method/', '/app/demo/form/method/aform/', '/app/demo/form/method/aform/aform.js', '/app/demo/form/method/aform/aform.xml', '/app/demo/form/method/aform/test.xml', '/app/demo/form/method/core/', '/app/demo/form/method/core/core.js', '/app/demo/form/method/core/core.xml', '/app/demo/form/method/dom/', '/app/demo/form/method/dom/dom.css', '/app/demo/form/method/dom/dom.js', '/app/demo/form/method/dom/dom.xml', '/app/demo/form/method/form/', '/app/demo/form/method/form/form.css', '/app/demo/form/method/form/form.js', '/app/demo/form/method/form/form.xml', '/app/demo/form/method/fs/', '/app/demo/form/method/fs/fs.js', '/app/demo/form/method/fs/fs.xml', '/app/demo/form/method/fs/text.js', '/app/demo/form/method/fs/text.xml', '/app/demo/form/method/task/', '/app/demo/form/method/task/locale1.json', '/app/demo/form/method/task/locale2.json', '/app/demo/form/method/task/task.js', '/app/demo/form/method/task/task.xml', '/app/demo/form/method/theme/', '/app/demo/form/method/theme/theme.js', '/app/demo/form/method/theme/theme.xml', '/app/demo/form/method/tool/', '/app/demo/form/method/tool/tool.js', '/app/demo/form/method/tool/tool.xml', '/app/demo/form/method/zip/', '/app/demo/form/method/zip/zip.js', '/app/demo/form/method/zip/zip.xml', '/app/demo/global.css', '/app/demo/res/', '/app/demo/res/icon.svg', '/app/demo/res/img.jpg', '/app/demo/res/r-1.svg', '/app/demo/res/r-2.svg', '/app/demo/res/sql.svg', '/app/demo/res/txt.svg', '/app/demo/res/zip.svg', '/app/task/', '/app/task/app.js', '/app/task/form/', '/app/task/form/bar/', '/app/task/form/bar/bar.js', '/app/task/form/bar/bar.xml', '/app/task/form/desktop/', '/app/task/form/desktop/desktop.xml', '/app/task/locale/', '/app/task/locale/en.json', '/app/task/locale/ja.json', '/app/task/locale/sc.json', '/app/task/locale/tc.json', '/clickgo.js', '/clickgo.ts', '/control/', '/control/common.cgc', '/control/form.cgc', '/control/monaco.cgc', '/control/property.cgc', '/control/task.cgc', '/global.css', '/icon.png', '/index.js', '/index.ts', '/lib/', '/lib/control.js', '/lib/control.ts', '/lib/core.js', '/lib/core.ts', '/lib/dom.js', '/lib/dom.ts', '/lib/form.js', '/lib/form.ts', '/lib/fs.js', '/lib/fs.ts', '/lib/native.js', '/lib/native.ts', '/lib/task.js', '/lib/task.ts', '/lib/theme.js', '/lib/theme.ts', '/lib/tool.js', '/lib/tool.ts', '/lib/zip.js', '/lib/zip.ts', '/theme/', '/theme/familiar.cgt'];
|
|
12
12
|
|
|
13
13
|
export async function getContent(path: string, options?: {
|
|
14
14
|
'start'?: number;
|
package/dist/lib/native.js
CHANGED
package/dist/lib/native.ts
CHANGED
|
@@ -29,7 +29,7 @@ export function getToken(): string {
|
|
|
29
29
|
* @param param 参数
|
|
30
30
|
*/
|
|
31
31
|
export function invoke(name: string, ...param: any[]): any {
|
|
32
|
-
if (!clickgo.
|
|
32
|
+
if (!clickgo.isNative()) {
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
return (window as any).clickgoNative.invoke(name, ...param);
|
package/dist/lib/task.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.refreshSystemPosition = exports.clearSystem = exports.setSystem = exports.systemTaskInfo = exports.sleep = exports.removeTimer = exports.createTimer = exports.clearLocaleLang = exports.setLocaleLang = exports.setLocale = exports.clearLocale = exports.loadLocale = exports.loadLocaleData = exports.end = exports.run = exports.getList = exports.get = exports.offFrame = exports.onFrame = exports.
|
|
12
|
+
exports.refreshSystemPosition = exports.clearSystem = exports.setSystem = exports.systemTaskInfo = exports.sleep = exports.removeTimer = exports.createTimer = exports.clearLocaleLang = exports.setLocaleLang = exports.setLocale = exports.clearLocale = exports.loadLocale = exports.loadLocaleData = exports.end = exports.run = exports.getList = exports.get = exports.offFrame = exports.onFrame = exports.lastId = exports.list = void 0;
|
|
13
13
|
const clickgo = require("../clickgo");
|
|
14
14
|
const core = require("./core");
|
|
15
15
|
const dom = require("./dom");
|
|
@@ -20,19 +20,6 @@ const fs = require("./fs");
|
|
|
20
20
|
const native = require("./native");
|
|
21
21
|
exports.list = {};
|
|
22
22
|
exports.lastId = 0;
|
|
23
|
-
let mainTaskId = 0;
|
|
24
|
-
function setMain(taskId) {
|
|
25
|
-
if (mainTaskId > 0) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
mainTaskId = taskId;
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
exports.setMain = setMain;
|
|
32
|
-
function isMain(taskId) {
|
|
33
|
-
return taskId === mainTaskId;
|
|
34
|
-
}
|
|
35
|
-
exports.isMain = isMain;
|
|
36
23
|
const localeData = {
|
|
37
24
|
'en': {
|
|
38
25
|
'loading': 'Loading...',
|
|
@@ -269,12 +256,18 @@ function run(url, opt = {}) {
|
|
|
269
256
|
getVersion: function () {
|
|
270
257
|
return clickgo.getVersion();
|
|
271
258
|
},
|
|
272
|
-
|
|
273
|
-
return clickgo.
|
|
259
|
+
isNative() {
|
|
260
|
+
return clickgo.isNative();
|
|
274
261
|
},
|
|
275
262
|
getPlatform() {
|
|
276
263
|
return clickgo.getPlatform();
|
|
277
264
|
},
|
|
265
|
+
isImmersion() {
|
|
266
|
+
return clickgo.isImmersion();
|
|
267
|
+
},
|
|
268
|
+
hasFrame() {
|
|
269
|
+
return clickgo.hasFrame();
|
|
270
|
+
},
|
|
278
271
|
'control': {
|
|
279
272
|
'AbstractControl': class extends control.AbstractControl {
|
|
280
273
|
get taskId() {
|
|
@@ -619,9 +612,6 @@ function run(url, opt = {}) {
|
|
|
619
612
|
}
|
|
620
613
|
},
|
|
621
614
|
'task': {
|
|
622
|
-
isMain(taskId) {
|
|
623
|
-
return isMain(taskId);
|
|
624
|
-
},
|
|
625
615
|
onFrame: function (fun, opt = {}) {
|
|
626
616
|
opt.taskId = taskId;
|
|
627
617
|
return clickgo.task.onFrame(fun, opt);
|
|
@@ -638,7 +628,6 @@ function run(url, opt = {}) {
|
|
|
638
628
|
},
|
|
639
629
|
run: function (url, opt = {}) {
|
|
640
630
|
opt.taskId = taskId;
|
|
641
|
-
opt.main = false;
|
|
642
631
|
return clickgo.task.run(url, opt);
|
|
643
632
|
},
|
|
644
633
|
end: function (tid) {
|
|
@@ -736,6 +725,9 @@ function run(url, opt = {}) {
|
|
|
736
725
|
getBoolean: function (param) {
|
|
737
726
|
return clickgo.tool.getBoolean(param);
|
|
738
727
|
},
|
|
728
|
+
getNumber: function (param) {
|
|
729
|
+
return clickgo.tool.getNumber(param);
|
|
730
|
+
},
|
|
739
731
|
escapeHTML: function (html) {
|
|
740
732
|
return clickgo.tool.escapeHTML(html);
|
|
741
733
|
},
|
|
@@ -823,17 +815,18 @@ function run(url, opt = {}) {
|
|
|
823
815
|
return -3;
|
|
824
816
|
}
|
|
825
817
|
dom.createToStyleList(taskId);
|
|
818
|
+
core.trigger('taskStarted', taskId);
|
|
819
|
+
if (taskId === 1) {
|
|
820
|
+
native.invoke('cg-init', native.getToken());
|
|
821
|
+
}
|
|
826
822
|
const appCls = new expo.default();
|
|
827
823
|
yield appCls.main();
|
|
828
824
|
if (!exports.list[taskId].class) {
|
|
829
825
|
delete exports.list[taskId];
|
|
830
826
|
dom.removeFromStyleList(taskId);
|
|
827
|
+
core.trigger('taskEnded', taskId);
|
|
831
828
|
return -4;
|
|
832
829
|
}
|
|
833
|
-
core.trigger('taskStarted', taskId);
|
|
834
|
-
if (taskId === 1) {
|
|
835
|
-
native.invoke('cg-init', native.getToken());
|
|
836
|
-
}
|
|
837
830
|
return taskId;
|
|
838
831
|
});
|
|
839
832
|
}
|
|
@@ -843,7 +836,7 @@ function end(taskId) {
|
|
|
843
836
|
if (!task) {
|
|
844
837
|
return true;
|
|
845
838
|
}
|
|
846
|
-
if (clickgo.
|
|
839
|
+
if (clickgo.isNative() && (taskId === 1)) {
|
|
847
840
|
native.invoke('cg-close', native.getToken());
|
|
848
841
|
}
|
|
849
842
|
const fid = form.getMaxZIndexID({
|
|
@@ -857,7 +850,7 @@ function end(taskId) {
|
|
|
857
850
|
}
|
|
858
851
|
for (const fid in task.forms) {
|
|
859
852
|
const f = task.forms[fid];
|
|
860
|
-
core.trigger('formRemoved', taskId, f.id, f.vroot.$refs.form.title, f.vroot.$refs.form.
|
|
853
|
+
core.trigger('formRemoved', taskId, f.id, f.vroot.$refs.form.title, f.vroot.$refs.form.iconDataUrl);
|
|
861
854
|
try {
|
|
862
855
|
f.vapp.unmount();
|
|
863
856
|
}
|