clickgo 3.1.2-dev11 → 3.1.4-dev13
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 +1 -1
- package/dist/app/demo/app.js +0 -73
- package/dist/app/demo/config.json +113 -0
- package/dist/app/demo/form/control/button/button.js +12 -11
- package/dist/app/demo/form/control/button/button.xml +6 -6
- package/dist/app/demo/form/control/check/check.js +14 -10
- package/dist/app/demo/form/control/file/file.js +15 -13
- package/dist/app/demo/form/control/{overflow/overflow.css → flow/flow.css} +0 -0
- package/dist/app/demo/form/control/flow/flow.js +64 -0
- package/dist/app/demo/form/control/{overflow/overflow.scss → flow/flow.scss} +0 -0
- package/dist/app/demo/form/control/flow/flow.xml +101 -0
- package/dist/app/demo/form/control/form/form.js +1 -1
- package/dist/app/demo/form/control/form/form.xml +3 -3
- package/dist/app/demo/form/control/img/img.xml +2 -2
- package/dist/app/demo/form/control/list/list.js +95 -75
- package/dist/app/demo/form/control/list/list.xml +15 -11
- package/dist/app/demo/form/control/marquee/marquee.js +12 -10
- package/dist/app/demo/form/control/menu/menu.js +10 -6
- package/dist/app/demo/form/control/monaco/monaco.js +50 -60
- package/dist/app/demo/form/control/monaco/monaco.xml +6 -5
- package/dist/app/demo/form/control/property/property.js +131 -127
- package/dist/app/demo/form/control/radio/radio.js +9 -5
- package/dist/app/demo/form/control/scroll/scroll.js +16 -12
- package/dist/app/demo/form/control/scroll/scroll.xml +10 -10
- package/dist/app/demo/form/control/select/select.js +132 -71
- package/dist/app/demo/form/control/select/select.xml +69 -67
- package/dist/app/demo/form/control/tab/tab.js +21 -20
- package/dist/app/demo/form/control/tab/tab.xml +2 -2
- package/dist/app/demo/form/control/text/text.js +53 -45
- package/dist/app/demo/form/control/text/text.xml +3 -3
- package/dist/app/demo/form/control/{greatview/greatview.css → vflow/vflow.css} +0 -0
- package/dist/app/demo/form/control/vflow/vflow.js +79 -0
- package/dist/app/demo/form/control/{greatview/greatview.scss → vflow/vflow.scss} +0 -0
- package/dist/app/demo/form/control/{greatview/greatview.xml → vflow/vflow.xml} +25 -25
- package/dist/app/demo/form/event/form/form.js +58 -56
- package/dist/app/demo/form/event/form/form.xml +3 -3
- package/dist/app/demo/form/event/other/other.js +29 -0
- package/dist/app/demo/form/event/other/other.xml +5 -0
- package/dist/app/demo/form/event/screen/screen.js +30 -28
- package/dist/app/demo/form/event/screen/screen.xml +2 -2
- package/dist/app/demo/form/event/task/task.js +31 -31
- package/dist/app/demo/form/event/task/task.xml +3 -3
- package/dist/app/demo/form/main.js +166 -5
- package/dist/app/demo/form/main.xml +37 -35
- package/dist/app/demo/form/method/aform/aform.js +2 -1
- package/dist/app/demo/form/method/aform/aform.xml +3 -2
- package/dist/app/demo/form/method/aform/sd.js +28 -0
- package/dist/app/demo/form/method/aform/sd.xml +7 -0
- package/dist/app/demo/form/method/aform/test.xml +4 -5
- package/dist/app/demo/form/method/core/core.js +23 -8
- package/dist/app/demo/form/method/core/core.xml +6 -1
- package/dist/app/demo/form/method/dom/dom.js +91 -99
- package/dist/app/demo/form/method/dom/dom.xml +6 -7
- package/dist/app/demo/form/method/form/form.js +8 -8
- package/dist/app/demo/form/method/form/form.xml +4 -4
- package/dist/app/demo/form/method/fs/fs.js +34 -33
- package/dist/app/demo/form/method/fs/fs.xml +1 -1
- package/dist/app/demo/form/method/fs/text.js +12 -12
- package/dist/app/demo/form/method/native/native.js +50 -0
- package/dist/app/demo/form/method/native/native.xml +12 -0
- package/dist/app/demo/form/method/system/system.js +50 -0
- package/dist/app/demo/form/method/system/system.xml +11 -0
- package/dist/app/demo/form/method/task/task.js +68 -62
- package/dist/app/demo/form/method/task/task.xml +5 -6
- package/dist/app/demo/form/method/theme/theme.js +14 -14
- package/dist/app/demo/form/method/tool/tool.js +29 -28
- package/dist/app/demo/form/method/tool/tool.xml +3 -3
- package/dist/app/demo/form/method/zip/zip.js +46 -41
- package/dist/app/demo/form/method/zip/zip.xml +1 -1
- package/dist/app/task/app.js +0 -25
- package/dist/app/task/config.json +29 -0
- package/dist/app/task/form/bar/bar.js +1 -1
- package/dist/app/task/form/bar/bar.xml +1 -1
- package/dist/clickgo.js +1 -1
- package/dist/clickgo.ts +1 -1
- 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 +6 -3
- package/dist/index.ts +9 -3
- package/dist/lib/control.js +70 -104
- package/dist/lib/control.ts +97 -123
- package/dist/lib/core.js +163 -253
- package/dist/lib/core.ts +185 -268
- package/dist/lib/dom.js +565 -484
- package/dist/lib/dom.ts +704 -547
- package/dist/lib/form.js +211 -159
- package/dist/lib/form.ts +196 -121
- package/dist/lib/fs.js +107 -12
- package/dist/lib/fs.ts +111 -20
- package/dist/lib/native.js +142 -8
- package/dist/lib/native.ts +181 -11
- package/dist/lib/task.js +526 -164
- package/dist/lib/task.ts +598 -179
- package/dist/lib/tool.js +48 -1
- package/dist/lib/tool.ts +61 -0
- package/dist/lib/zip.ts +2 -0
- package/dist/theme/familiar.cgt +0 -0
- package/package.json +2 -2
- package/types/index.d.ts +83 -39
- package/dist/app/demo/form/control/greatview/greatview.js +0 -92
- package/dist/app/demo/form/control/overflow/overflow.js +0 -70
- package/dist/app/demo/form/control/overflow/overflow.xml +0 -98
- package/dist/app/demo/form/control/view/view.css +0 -1
- package/dist/app/demo/form/control/view/view.js +0 -73
- package/dist/app/demo/form/control/view/view.scss +0 -18
- package/dist/app/demo/form/control/view/view.xml +0 -94
|
@@ -9,42 +9,42 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.mounted = exports.methods = exports.data = void 0;
|
|
13
12
|
const clickgo = require("clickgo");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
class default_1 extends clickgo.form.AbstractForm {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.flist = {};
|
|
17
|
+
this.list = [];
|
|
18
|
+
}
|
|
19
|
+
pushConsole(name, text) {
|
|
20
20
|
const date = new Date();
|
|
21
21
|
this.list.unshift({
|
|
22
22
|
'time': date.getHours().toString() + ':' + date.getMinutes().toString() + ':' + date.getSeconds().toString(),
|
|
23
23
|
'name': name,
|
|
24
24
|
'text': text
|
|
25
25
|
});
|
|
26
|
-
}
|
|
27
|
-
|
|
26
|
+
}
|
|
27
|
+
changeFocus(fid) {
|
|
28
28
|
clickgo.form.changeFocus(parseInt(fid));
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
30
|
+
onMounted() {
|
|
31
|
+
const list = clickgo.task.getList();
|
|
32
|
+
for (const taskId in list) {
|
|
33
|
+
const flist = clickgo.form.getList(parseInt(taskId));
|
|
34
|
+
for (const fid in flist) {
|
|
35
|
+
this.flist[fid] = {
|
|
36
|
+
'title': flist[fid].title,
|
|
37
|
+
'icon': flist[fid].icon,
|
|
38
|
+
'stateMax': flist[fid].stateMax,
|
|
39
|
+
'stateMin': flist[fid].stateMin,
|
|
40
|
+
'show': flist[fid].show,
|
|
41
|
+
'focus': flist[fid].focus,
|
|
42
|
+
'flash': false
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
onFormCreated(taskId, formId, title, icon) {
|
|
48
48
|
this.flist[formId] = {
|
|
49
49
|
'title': title,
|
|
50
50
|
'icon': icon,
|
|
@@ -55,75 +55,77 @@ const mounted = function () {
|
|
|
55
55
|
'flash': false
|
|
56
56
|
};
|
|
57
57
|
this.pushConsole('formCreated', `taskId: ${taskId}, formId: ${formId}, title: ${title}, icon: ${icon ? icon.slice(0, 10) + '...' : 'null'}`);
|
|
58
|
-
}
|
|
59
|
-
|
|
58
|
+
}
|
|
59
|
+
onFormRemoved(taskId, formId, title, icon) {
|
|
60
60
|
if (!this.flist[formId]) {
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
63
|
this.flist[formId] = undefined;
|
|
64
64
|
delete this.flist[formId];
|
|
65
65
|
this.pushConsole('formRemoved', `taskId: ${taskId}, formId: ${formId}, title: ${title}, icon: ${icon ? icon.slice(0, 10) + '...' : 'null'}`);
|
|
66
|
-
}
|
|
67
|
-
|
|
66
|
+
}
|
|
67
|
+
onFormTitleChanged(taskId, formId, title) {
|
|
68
68
|
if (!this.flist[formId]) {
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
this.flist[formId].title = title;
|
|
72
72
|
this.pushConsole('formTitleChanged', `taskId: ${taskId}, formId: ${formId}, title: ${title}`);
|
|
73
|
-
}
|
|
74
|
-
|
|
73
|
+
}
|
|
74
|
+
onFormIconChanged(taskId, formId, icon) {
|
|
75
75
|
if (!this.flist[formId]) {
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
this.flist[formId].icon = icon;
|
|
79
79
|
this.pushConsole('formIconChanged', `taskId: ${taskId}, formId: ${formId}, icon: ${icon ? icon.slice(0, 10) + '...' : 'null'}`);
|
|
80
|
-
}
|
|
81
|
-
|
|
80
|
+
}
|
|
81
|
+
onFormStateMinChanged(taskId, formId, state) {
|
|
82
82
|
if (!this.flist[formId]) {
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
85
|
this.flist[formId].min = state;
|
|
86
86
|
this.pushConsole('formStateMinChanged', `taskId: ${taskId}, formId: ${formId}, state: ${state ? 'true' : 'false'}`);
|
|
87
|
-
}
|
|
88
|
-
|
|
87
|
+
}
|
|
88
|
+
onFormStateMaxChanged(taskId, formId, state) {
|
|
89
89
|
if (!this.flist[formId]) {
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
this.flist[formId].max = state;
|
|
93
93
|
this.pushConsole('formStateMaxChanged', `taskId: ${taskId}, formId: ${formId}, state: ${state ? 'true' : 'false'}`);
|
|
94
|
-
}
|
|
95
|
-
|
|
94
|
+
}
|
|
95
|
+
onFormShowChanged(taskId, formId, state) {
|
|
96
96
|
if (!this.flist[formId]) {
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
this.flist[formId].show = state;
|
|
100
100
|
this.pushConsole('formShowChanged', `taskId: ${taskId}, formId: ${formId}, state: ${state ? 'true' : 'false'}`);
|
|
101
|
-
}
|
|
102
|
-
|
|
101
|
+
}
|
|
102
|
+
onFormFocused(taskId, formId) {
|
|
103
103
|
if (!this.flist[formId]) {
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
this.flist[formId].focus = true;
|
|
107
107
|
this.pushConsole('formFocused', `taskId: ${taskId}, formId: ${formId}`);
|
|
108
|
-
}
|
|
109
|
-
|
|
108
|
+
}
|
|
109
|
+
onFormBlurred(taskId, formId) {
|
|
110
110
|
if (!this.flist[formId]) {
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
113
|
this.flist[formId].focus = false;
|
|
114
114
|
this.pushConsole('formBlurred', `taskId: ${taskId}, formId: ${formId}`);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
};
|
|
129
|
-
|
|
115
|
+
}
|
|
116
|
+
onFormFlash(taskId, formId) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
if (!this.flist[formId]) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (this.flist[formId].flash) {
|
|
122
|
+
clickgo.task.removeTimer(this.flist[formId].flash);
|
|
123
|
+
}
|
|
124
|
+
this.pushConsole('formFlash', `taskId: ${taskId}, formId: ${formId}`);
|
|
125
|
+
this.flist[formId].flash = true;
|
|
126
|
+
yield clickgo.tool.sleep(1000);
|
|
127
|
+
this.flist[formId].flash = false;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.default = default_1;
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<layout align-h="center" align-v="center" style="margin-top: 10px; flex: 1; height: 0;">
|
|
4
4
|
<layout gutter="10" direction="v">
|
|
5
5
|
<layout align-v="center" v-for="(form, fid) of flist" gutter="5" @click="changeFocus(fid)" class="item" :class="{'flash': form.flash, 'focus': form.focus}">
|
|
6
|
-
<img v-if="form.icon" :src="form.icon"
|
|
6
|
+
<img v-if="form.icon" :src="form.icon" style="width: 16px; height: 16px;" /><label>{{form.title}}{{form.max ? ' (max)' : ''}}{{form.min ? ' (min)' : ''}}</label>
|
|
7
7
|
</layout>
|
|
8
8
|
</layout>
|
|
9
9
|
</layout>
|
|
10
10
|
<layout gutter="10" style="margin-top: 10px; height: 80px;">
|
|
11
11
|
<list :data="['formCreated', 'formRemoved', 'formTitleChanged', 'formIconChanged', 'formStateMinChanged', 'formStateMaxChanged', 'formShowChanged', 'formFocused', 'formBlurred', 'formFlash']" style="width: 150px;"></list>
|
|
12
|
-
<
|
|
12
|
+
<vflow v-slot="data" :data="list" direction="v" style="color: #FFF; background: hsl(0, 0%, 20%); line-height: 1.5; flex: 1; width: 0; padding: 10px;" same>
|
|
13
13
|
<label>[{{data.row.time}}] {{data.row.name}}, {{data.row.text}}.</label>
|
|
14
|
-
</
|
|
14
|
+
</vflow>
|
|
15
15
|
</layout>
|
|
16
16
|
</form>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const clickgo = require("clickgo");
|
|
4
|
+
class default_1 extends clickgo.form.AbstractForm {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.list = [];
|
|
8
|
+
}
|
|
9
|
+
onLauncherFolderNameChanged(id, name) {
|
|
10
|
+
const date = new Date();
|
|
11
|
+
this.list.unshift({
|
|
12
|
+
'time': date.getHours().toString() + ':' + date.getMinutes().toString() + ':' + date.getSeconds().toString(),
|
|
13
|
+
'name': 'launcherFolderNameChanged',
|
|
14
|
+
'content': JSON.stringify({
|
|
15
|
+
'id': id,
|
|
16
|
+
'name': name
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
onHashChanged(hash) {
|
|
21
|
+
const date = new Date();
|
|
22
|
+
this.list.unshift({
|
|
23
|
+
'time': date.getHours().toString() + ':' + date.getMinutes().toString() + ':' + date.getSeconds().toString(),
|
|
24
|
+
'name': 'hashChanged',
|
|
25
|
+
'content': hash
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = default_1;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<form width="500" height="550" title="About other" padding="10">
|
|
2
|
+
<vflow v-slot="data" :data="list" direction="v" style="color: #FFF; background: hsl(0, 0%, 20%); line-height: 1.5; padding: 10px; flex: 1;">
|
|
3
|
+
<label>[{{data.row.time}}] {{data.row.name}}, {{data.row.content}}.</label>
|
|
4
|
+
</vflow>
|
|
5
|
+
</form>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mounted = exports.data = void 0;
|
|
4
3
|
const clickgo = require("clickgo");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
class default_1 extends clickgo.form.AbstractForm {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.width = 0;
|
|
8
|
+
this.height = 0;
|
|
9
|
+
this.scale = 4;
|
|
10
|
+
this.list = [];
|
|
11
|
+
}
|
|
12
|
+
onScreenResize() {
|
|
13
13
|
const area = clickgo.core.getAvailArea();
|
|
14
14
|
this.width = area.width;
|
|
15
15
|
this.height = area.height;
|
|
@@ -28,24 +28,26 @@ const mounted = function () {
|
|
|
28
28
|
'width': area.width,
|
|
29
29
|
'height': area.height
|
|
30
30
|
});
|
|
31
|
-
});
|
|
32
|
-
const area = clickgo.core.getAvailArea();
|
|
33
|
-
this.width = area.width;
|
|
34
|
-
this.height = area.height;
|
|
35
|
-
if (this.width > 1100 || this.height > 1100) {
|
|
36
|
-
this.scale = 5;
|
|
37
|
-
}
|
|
38
|
-
else if (this.width < 420 || this.height < 420) {
|
|
39
|
-
this.scale = 3;
|
|
40
31
|
}
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
onMounted() {
|
|
33
|
+
const area = clickgo.core.getAvailArea();
|
|
34
|
+
this.width = area.width;
|
|
35
|
+
this.height = area.height;
|
|
36
|
+
if (this.width > 1100 || this.height > 1100) {
|
|
37
|
+
this.scale = 5;
|
|
38
|
+
}
|
|
39
|
+
else if (this.width < 420 || this.height < 420) {
|
|
40
|
+
this.scale = 3;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.scale = 4;
|
|
44
|
+
}
|
|
45
|
+
const date = new Date();
|
|
46
|
+
this.list.unshift({
|
|
47
|
+
'time': date.getHours().toString() + ':' + date.getMinutes().toString() + ':' + date.getSeconds().toString(),
|
|
48
|
+
'width': this.width,
|
|
49
|
+
'height': this.height
|
|
50
|
+
});
|
|
43
51
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'time': date.getHours().toString() + ':' + date.getMinutes().toString() + ':' + date.getSeconds().toString(),
|
|
47
|
-
'width': this.width,
|
|
48
|
-
'height': this.height
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
exports.mounted = mounted;
|
|
52
|
+
}
|
|
53
|
+
exports.default = default_1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<layout align-h="center" align-v="center" style="margin-top: 10px; flex: 1; height: 0;">
|
|
4
4
|
<block style="border: solid 1px hsl(0, 0%, 20%); display: flex; align-items: center; justify-content: center; font-size: 20px;" :style="{'width': width / scale + 'px', 'height': height / scale + 'px'}">{{width}} x {{height}}</block>
|
|
5
5
|
</layout>
|
|
6
|
-
<
|
|
6
|
+
<vflow v-slot="data" :data="list" direction="v" style="margin-top: 10px; color: #FFF; background: hsl(0, 0%, 20%); line-height: 1.5; height: 80px; padding: 10px;">
|
|
7
7
|
<label>[{{data.row.time}}] screenResize, width: {{data.row.width}}, height: {{data.row.height}}.</label>
|
|
8
|
-
</
|
|
8
|
+
</vflow>
|
|
9
9
|
</form>
|
|
@@ -9,36 +9,36 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.mounted = exports.methods = exports.data = void 0;
|
|
13
12
|
const clickgo = require("clickgo");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
class default_1 extends clickgo.form.AbstractForm {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.tlist = [];
|
|
17
|
+
this.list = [];
|
|
18
|
+
this.tid = [];
|
|
19
|
+
}
|
|
20
|
+
pushConsole(name, text) {
|
|
21
21
|
const date = new Date();
|
|
22
22
|
this.list.unshift({
|
|
23
23
|
'time': date.getHours().toString() + ':' + date.getMinutes().toString() + ':' + date.getSeconds().toString(),
|
|
24
24
|
'name': name,
|
|
25
25
|
'text': text
|
|
26
26
|
});
|
|
27
|
-
}
|
|
28
|
-
|
|
27
|
+
}
|
|
28
|
+
run() {
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
30
|
const taskId = yield clickgo.task.run('/clickgo/app/demo/');
|
|
31
31
|
yield clickgo.form.dialog(`Successfully run, task id is: ${taskId}.`);
|
|
32
32
|
});
|
|
33
|
-
}
|
|
34
|
-
|
|
33
|
+
}
|
|
34
|
+
end() {
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
if (yield clickgo.form.confirm(`Are you sure to end Task ${this.tid}?`)) {
|
|
37
|
-
clickgo.task.end(
|
|
36
|
+
if (yield clickgo.form.confirm(`Are you sure to end Task ${this.tid[0]}?`)) {
|
|
37
|
+
clickgo.task.end(this.tid[0]);
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
}
|
|
41
|
-
|
|
40
|
+
}
|
|
41
|
+
runTask() {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
43
|
if (clickgo.task.systemTaskInfo.taskId > 0) {
|
|
44
44
|
yield clickgo.form.dialog('The Task APP is already running.');
|
|
@@ -48,23 +48,14 @@ exports.methods = {
|
|
|
48
48
|
yield clickgo.form.dialog(`Successfully run, task id is: ${taskId}.`);
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
const mounted = function () {
|
|
53
|
-
const list = clickgo.task.getList();
|
|
54
|
-
for (const tid in list) {
|
|
55
|
-
this.tlist.push({
|
|
56
|
-
'label': 'Task ' + tid,
|
|
57
|
-
'value': parseInt(tid)
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
clickgo.core.setSystemEventListener('taskStarted', (taskId) => {
|
|
51
|
+
onTaskStarted(taskId) {
|
|
61
52
|
this.tlist.push({
|
|
62
53
|
'label': 'Task ' + taskId.toString(),
|
|
63
54
|
'value': taskId
|
|
64
55
|
});
|
|
65
56
|
this.pushConsole('taskStarted', `taskId: ${taskId}`);
|
|
66
|
-
}
|
|
67
|
-
|
|
57
|
+
}
|
|
58
|
+
onTaskEnded(taskId) {
|
|
68
59
|
for (let i = 0; i < this.tlist.length; ++i) {
|
|
69
60
|
if (this.tlist[i].value !== taskId) {
|
|
70
61
|
continue;
|
|
@@ -73,6 +64,15 @@ const mounted = function () {
|
|
|
73
64
|
break;
|
|
74
65
|
}
|
|
75
66
|
this.pushConsole('taskEnded', `taskId: ${taskId}`);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
}
|
|
68
|
+
onMounted() {
|
|
69
|
+
const list = clickgo.task.getList();
|
|
70
|
+
for (const tid in list) {
|
|
71
|
+
this.tlist.push({
|
|
72
|
+
'label': 'Task ' + tid,
|
|
73
|
+
'value': parseInt(tid)
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.default = default_1;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<label>The task list:</label>
|
|
3
3
|
<layout align-h="center" align-v="center" style="margin-top: 10px; flex: 1; height: 0;">
|
|
4
4
|
<layout direction="v" gutter="10">
|
|
5
|
-
<label>Select task id: {{tid}}</label>
|
|
5
|
+
<label>Select task id: {{tid[0]}}</label>
|
|
6
6
|
<list v-model="tid" :data="tlist" style="width: 200px; height: 200px;"></list>
|
|
7
7
|
<button @click="runTask" style="height: 30px;">Run task app</button>
|
|
8
8
|
<layout gutter="10">
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
</layout>
|
|
14
14
|
<layout gutter="10" style="margin-top: 10px; height: 80px;">
|
|
15
15
|
<list :data="['taskStarted', 'taskEnded']" width="150" style="width: 150px;"></list>
|
|
16
|
-
<
|
|
16
|
+
<vflow v-slot="data" :data="list" direction="v" style="color: #FFF; background: hsl(0, 0%, 20%); line-height: 1.5; flex: 1; width: 0; padding: 10px;" same>
|
|
17
17
|
<label>[{{data.row.time}}] {{data.row.name}}, {{data.row.text}}.</label>
|
|
18
|
-
</
|
|
18
|
+
</vflow>
|
|
19
19
|
</layout>
|
|
20
20
|
</form>
|
|
@@ -10,14 +10,51 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const clickgo = require("clickgo");
|
|
13
|
-
const
|
|
13
|
+
const button_1 = require("./control/button/button");
|
|
14
|
+
const check_1 = require("./control/check/check");
|
|
14
15
|
const dialog_1 = require("./control/dialog/dialog");
|
|
15
|
-
const
|
|
16
|
+
const file_1 = require("./control/file/file");
|
|
17
|
+
const form_1 = require("./control/form/form");
|
|
18
|
+
const list_1 = require("./control/list/list");
|
|
19
|
+
const marquee_1 = require("./control/marquee/marquee");
|
|
20
|
+
const menu_1 = require("./control/menu/menu");
|
|
21
|
+
const monaco_1 = require("./control/monaco/monaco");
|
|
22
|
+
const flow_1 = require("./control/flow/flow");
|
|
23
|
+
const property_1 = require("./control/property/property");
|
|
24
|
+
const radio_1 = require("./control/radio/radio");
|
|
25
|
+
const scroll_1 = require("./control/scroll/scroll");
|
|
26
|
+
const select_1 = require("./control/select/select");
|
|
27
|
+
const tab_1 = require("./control/tab/tab");
|
|
28
|
+
const text_1 = require("./control/text/text");
|
|
29
|
+
const vflow_1 = require("./control/vflow/vflow");
|
|
30
|
+
const form_2 = require("./event/form/form");
|
|
31
|
+
const other_1 = require("./event/other/other");
|
|
32
|
+
const screen_1 = require("./event/screen/screen");
|
|
33
|
+
const task_1 = require("./event/task/task");
|
|
16
34
|
const aform_1 = require("./method/aform/aform");
|
|
35
|
+
const core_1 = require("./method/core/core");
|
|
36
|
+
const dom_1 = require("./method/dom/dom");
|
|
37
|
+
const form_3 = require("./method/form/form");
|
|
38
|
+
const fs_1 = require("./method/fs/fs");
|
|
39
|
+
const native_1 = require("./method/native/native");
|
|
40
|
+
const system_1 = require("./method/system/system");
|
|
41
|
+
const task_2 = require("./method/task/task");
|
|
42
|
+
const theme_1 = require("./method/theme/theme");
|
|
43
|
+
const tool_1 = require("./method/tool/tool");
|
|
44
|
+
const zip_1 = require("./method/zip/zip");
|
|
17
45
|
class default_1 extends clickgo.form.AbstractForm {
|
|
18
46
|
constructor() {
|
|
19
47
|
super(...arguments);
|
|
20
48
|
this.ntab = '';
|
|
49
|
+
this.test = 0;
|
|
50
|
+
}
|
|
51
|
+
onMounted() {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
while (true) {
|
|
54
|
+
yield clickgo.tool.sleep(2000);
|
|
55
|
+
this.test += 1;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
21
58
|
}
|
|
22
59
|
openForm(name) {
|
|
23
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -27,22 +64,146 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
27
64
|
frm = yield this.createForm('control/block/block');
|
|
28
65
|
break;
|
|
29
66
|
}
|
|
30
|
-
case '
|
|
31
|
-
frm = yield
|
|
67
|
+
case 'cbutton': {
|
|
68
|
+
frm = yield button_1.default.create();
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
case 'ccheck': {
|
|
72
|
+
frm = yield check_1.default.create();
|
|
32
73
|
break;
|
|
33
74
|
}
|
|
34
75
|
case 'cdialog': {
|
|
35
76
|
frm = yield dialog_1.default.create();
|
|
36
77
|
break;
|
|
37
78
|
}
|
|
38
|
-
case '
|
|
79
|
+
case 'cfile': {
|
|
80
|
+
frm = yield file_1.default.create();
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
case 'cform': {
|
|
84
|
+
frm = yield form_1.default.create();
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
case 'cvflow': {
|
|
88
|
+
frm = yield vflow_1.default.create();
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case 'cimg': {
|
|
92
|
+
frm = yield this.createForm('control/img/img');
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
case 'clabel': {
|
|
96
|
+
frm = yield this.createForm('control/label/label');
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case 'clist': {
|
|
100
|
+
frm = yield list_1.default.create();
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
case 'cloading': {
|
|
104
|
+
frm = yield this.createForm('control/loading/loading');
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
case 'cmarquee': {
|
|
108
|
+
frm = yield marquee_1.default.create();
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
case 'cmenu': {
|
|
112
|
+
frm = yield menu_1.default.create();
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
case 'cmonaco': {
|
|
116
|
+
frm = yield monaco_1.default.create();
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case 'cflow': {
|
|
120
|
+
frm = yield flow_1.default.create();
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
case 'cproperty': {
|
|
124
|
+
frm = yield property_1.default.create();
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
case 'cradio': {
|
|
128
|
+
frm = yield radio_1.default.create();
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case 'cscroll': {
|
|
132
|
+
frm = yield scroll_1.default.create();
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
case 'cselect': {
|
|
136
|
+
frm = yield select_1.default.create();
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
case 'ctab': {
|
|
140
|
+
frm = yield tab_1.default.create();
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
case 'ctext': {
|
|
144
|
+
frm = yield text_1.default.create();
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
case 'eform': {
|
|
39
148
|
frm = yield form_2.default.create();
|
|
40
149
|
break;
|
|
41
150
|
}
|
|
151
|
+
case 'eother': {
|
|
152
|
+
frm = yield other_1.default.create();
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
case 'escreen': {
|
|
156
|
+
frm = yield screen_1.default.create();
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
case 'etask': {
|
|
160
|
+
frm = yield task_1.default.create();
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
42
163
|
case 'aform': {
|
|
43
164
|
frm = yield aform_1.default.create();
|
|
44
165
|
break;
|
|
45
166
|
}
|
|
167
|
+
case 'mcore': {
|
|
168
|
+
frm = yield core_1.default.create();
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
case 'mdom': {
|
|
172
|
+
frm = yield dom_1.default.create();
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
case 'mform': {
|
|
176
|
+
frm = yield form_3.default.create();
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
case 'mfs': {
|
|
180
|
+
frm = yield fs_1.default.create();
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
case 'mnative': {
|
|
184
|
+
frm = yield native_1.default.create();
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
case 'msystem': {
|
|
188
|
+
frm = yield system_1.default.create();
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
case 'mtask': {
|
|
192
|
+
frm = yield task_2.default.create();
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
case 'mtheme': {
|
|
196
|
+
frm = yield theme_1.default.create();
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
case 'mtool': {
|
|
200
|
+
frm = yield tool_1.default.create();
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
case 'mzip': {
|
|
204
|
+
frm = yield zip_1.default.create();
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
46
207
|
}
|
|
47
208
|
if (typeof frm === 'number') {
|
|
48
209
|
return;
|