clickgo 3.0.6-dev7 → 3.1.0-dev9

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.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/dist/app/demo/app.js +93 -0
  3. package/dist/app/demo/form/control/form/form.js +21 -20
  4. package/dist/app/demo/form/control/form/form.xml +3 -3
  5. package/dist/app/demo/form/main.js +20 -10
  6. package/dist/app/demo/form/main.xml +1 -1
  7. package/dist/app/task/app.js +46 -0
  8. package/dist/app/task/form/bar/bar.js +85 -86
  9. package/dist/app/task/form/bar/bar.xml +5 -6
  10. package/dist/clickgo.js +1 -10
  11. package/dist/clickgo.ts +0 -8
  12. package/dist/control/common.cgc +0 -0
  13. package/dist/control/form.cgc +0 -0
  14. package/dist/control/monaco.cgc +0 -0
  15. package/dist/control/property.cgc +0 -0
  16. package/dist/control/task.cgc +0 -0
  17. package/dist/global.css +1 -1
  18. package/dist/index.js +105 -56
  19. package/dist/index.ts +164 -59
  20. package/dist/lib/control.js +363 -240
  21. package/dist/lib/control.ts +497 -284
  22. package/dist/lib/core.js +331 -217
  23. package/dist/lib/core.ts +418 -244
  24. package/dist/lib/dom.js +6 -3
  25. package/dist/lib/dom.ts +7 -6
  26. package/dist/lib/form.js +635 -980
  27. package/dist/lib/form.ts +817 -1072
  28. package/dist/lib/fs.js +42 -39
  29. package/dist/lib/fs.ts +45 -41
  30. package/dist/lib/native.js +8 -148
  31. package/dist/lib/native.ts +9 -211
  32. package/dist/lib/task.js +707 -191
  33. package/dist/lib/task.ts +778 -210
  34. package/dist/lib/theme.ts +2 -2
  35. package/dist/lib/tool.js +58 -48
  36. package/dist/lib/tool.ts +79 -64
  37. package/dist/theme/familiar.cgt +0 -0
  38. package/package.json +5 -7
  39. package/types/index.d.ts +286 -324
  40. package/dist/app/demo/config.json +0 -106
  41. package/dist/app/task/config.json +0 -32
package/README.md CHANGED
@@ -19,7 +19,7 @@ Load the module loader first, and then load it using the module loader.
19
19
  **index.html**
20
20
 
21
21
  ```html
22
- <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.3.0/dist/loader.min.js?path=index&npm={'clickgo':'3.0.6-dev7'}"></script>
22
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.4.1/dist/loader.min.js?path=index&npm={'clickgo':'3.0.7-dev8'}"></script>
23
23
  ```
24
24
 
25
25
  **index.js**
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const clickgo = require("clickgo");
13
+ const main_1 = require("./form/main");
14
+ class default_1 extends clickgo.core.AbstractApp {
15
+ main() {
16
+ return __awaiter(this, void 0, void 0, function* () {
17
+ yield this.config({
18
+ 'name': 'Clickgo Demo',
19
+ 'ver': 1,
20
+ 'version': '0.1',
21
+ 'author': 'clickgo',
22
+ 'controls': [
23
+ '/clickgo/control/common',
24
+ '/clickgo/control/form',
25
+ '/clickgo/control/monaco',
26
+ '/clickgo/control/property'
27
+ ],
28
+ 'style': '/package/global',
29
+ 'files': [
30
+ '/form/control/block/block.css',
31
+ '/form/control/block/block.xml',
32
+ '/form/control/button/button.css',
33
+ '/form/control/button/button.xml',
34
+ '/form/control/check/check.xml',
35
+ '/form/control/dialog/dialog.xml',
36
+ '/form/control/file/file.xml',
37
+ '/form/control/form/form.css',
38
+ '/form/control/form/form.xml',
39
+ '/form/control/greatview/greatview.css',
40
+ '/form/control/greatview/greatview.xml',
41
+ '/form/control/img/img.xml',
42
+ '/form/control/label/label.xml',
43
+ '/form/control/list/list.css',
44
+ '/form/control/list/list.xml',
45
+ '/form/control/loading/loading.xml',
46
+ '/form/control/marquee/marquee.xml',
47
+ '/form/control/menu/menu.xml',
48
+ '/form/control/monaco/monaco.xml',
49
+ '/form/control/overflow/overflow.css',
50
+ '/form/control/overflow/overflow.xml',
51
+ '/form/control/property/property.xml',
52
+ '/form/control/radio/radio.xml',
53
+ '/form/control/scroll/scroll.xml',
54
+ '/form/control/select/select.xml',
55
+ '/form/control/tab/tab.xml',
56
+ '/form/control/text/text.xml',
57
+ '/form/control/view/view.css',
58
+ '/form/control/view/view.xml',
59
+ '/form/event/form/form.css',
60
+ '/form/event/form/form.xml',
61
+ '/form/event/screen/screen.xml',
62
+ '/form/event/task/task.xml',
63
+ '/form/method/core/core.xml',
64
+ '/form/method/dom/dom.css',
65
+ '/form/method/dom/dom.xml',
66
+ '/form/method/form/form.css',
67
+ '/form/method/form/form.xml',
68
+ '/form/method/form/test.xml',
69
+ '/form/method/fs/fs.xml',
70
+ '/form/method/fs/text.xml',
71
+ '/form/method/task/locale1.json',
72
+ '/form/method/task/locale2.json',
73
+ '/form/method/task/task.xml',
74
+ '/form/method/theme/theme.xml',
75
+ '/form/method/tool/tool.xml',
76
+ '/form/method/zip/zip.xml',
77
+ '/form/main.css',
78
+ '/form/main.xml',
79
+ '/res/icon.svg',
80
+ '/res/img.jpg',
81
+ '/res/r-1.svg',
82
+ '/res/r-2.svg',
83
+ '/res/sql.svg',
84
+ '/res/txt.svg',
85
+ '/res/zip.svg',
86
+ '/global.css'
87
+ ]
88
+ });
89
+ this.run(yield main_1.default.create());
90
+ });
91
+ }
92
+ }
93
+ exports.default = default_1;
@@ -9,30 +9,31 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.methods = exports.data = void 0;
13
12
  const clickgo = require("clickgo");
14
- exports.data = {
15
- 'width': 300,
16
- 'height': 520,
17
- 'icon': '',
18
- 'title': 'Form',
19
- 'min': true,
20
- 'max': true,
21
- 'close': true,
22
- 'stateMax': false,
23
- 'stateMin': false,
24
- 'minWidth': 200,
25
- 'minHeight': 100,
26
- 'resize': true,
27
- 'loading': false,
28
- 'border': 'normal'
29
- };
30
- exports.methods = {
31
- showLoading: function () {
13
+ class default_1 extends clickgo.form.AbstractForm {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.width = 300;
17
+ this.height = 520;
18
+ this.icon = '';
19
+ this.title = 'Form';
20
+ this.min = true;
21
+ this.max = true;
22
+ this.close = true;
23
+ this.stateMax = false;
24
+ this.stateMin = false;
25
+ this.minWidth = 200;
26
+ this.minHeight = 100;
27
+ this.resize = true;
28
+ this.loading = false;
29
+ this.border = 'normal';
30
+ }
31
+ showLoading() {
32
32
  return __awaiter(this, void 0, void 0, function* () {
33
33
  this.loading = true;
34
34
  yield clickgo.tool.sleep(1000);
35
35
  this.loading = false;
36
36
  });
37
37
  }
38
- };
38
+ }
39
+ exports.default = default_1;
@@ -1,7 +1,7 @@
1
1
  <form v-model:width="width" v-model:height="height" :icon="icon" :title="title" :min="min" :max="max" :close="close" v-model:state-max="stateMax" v-model:state-min="stateMin" :min-width="minWidth" :min-height="minHeight" :resize="resize" :loading="loading" :border="border" direction="v">
2
2
  <overflow direction="v">
3
3
  <layout direction="v" gutter="10" style="padding: 10px;">
4
- <label>focus: {{cgFocus}}, width: {{width}}, height: {{height}}, state-max: {{stateMax}}, state-min: {{stateMin}}.</label>
4
+ <label>focus: {{formFocus}}, width: {{width}}, height: {{height}}, state-max: {{stateMax}}, state-min: {{stateMin}}.</label>
5
5
  <button @click="icon = icon ? '' : '/package/res/icon.svg'">Set icon</button>
6
6
  <button @click="title = (title === 'Form') ? 'Changed' : 'Form'">Set title</button>
7
7
  <button @click="min = min ? false : true">{{min ? 'Hide' : 'Show'}} min button</button>
@@ -13,8 +13,8 @@
13
13
  <button @click="minHeight = (minHeight === 100) ? 200 : 100">Set min-height to {{minHeight === 100 ? '200' : '100'}}</button>
14
14
  <button @click="width = 350">Set width to 350</button>
15
15
  <button @click="height = 400">Set height to 400</button>
16
- <button @click="width = 'auto'">Set width to "auto"</button>
17
- <button @click="height = 'auto'">Set height to "auto"</button>
16
+ <button @click="width = 0">Set width auto</button>
17
+ <button @click="height = 0">Set height auto</button>
18
18
  <button @click="resize = resize ? false : true">{{resize ? 'Disabled' : 'Enabled'}} resize</button>
19
19
  <button @click="showLoading">Show loading</button>
20
20
  <layout class="bottom" gutter="10">
@@ -9,17 +9,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.methods = exports.data = void 0;
13
12
  const clickgo = require("clickgo");
14
- exports.data = {
15
- 'ntab': ''
16
- };
17
- exports.methods = {
18
- openForm: function (type, name) {
13
+ const form_1 = require("./control/form/form");
14
+ class default_1 extends clickgo.form.AbstractForm {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.ntab = '';
18
+ }
19
+ openForm(name) {
19
20
  return __awaiter(this, void 0, void 0, function* () {
20
- yield clickgo.form.create({
21
- 'file': `${type}/${name}/${name}`
22
- });
21
+ let frm = 0;
22
+ switch (name) {
23
+ case 'cform': {
24
+ frm = yield form_1.default.create();
25
+ break;
26
+ }
27
+ }
28
+ if (typeof frm === 'number') {
29
+ return;
30
+ }
31
+ frm.show();
23
32
  });
24
33
  }
25
- };
34
+ }
35
+ exports.default = default_1;
@@ -2,7 +2,7 @@
2
2
  <tab v-model="ntab" :tabs="['control', 'method', 'event']" style="margin: 10px; flex: 1;">
3
3
  <overflow v-if="ntab === 'control'" class="inner" direction="v">
4
4
  <layout class="buttons" gutter="10" direction="v">
5
- <button @click="openForm('control', 'form')">Form</button>
5
+ <button @click="openForm('cform')">Form</button>
6
6
  <button @click="openForm('control', 'img')">Img</button>
7
7
  <button @click="openForm('control', 'button')">Button</button>
8
8
  <button @click="openForm('control', 'check')">Check</button>
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const clickgo = require("clickgo");
13
+ const bar_1 = require("./form/bar/bar");
14
+ class default_1 extends clickgo.core.AbstractApp {
15
+ main() {
16
+ return __awaiter(this, void 0, void 0, function* () {
17
+ yield this.config({
18
+ 'name': 'Clickgo Task',
19
+ 'ver': 1,
20
+ 'version': '0.1',
21
+ 'author': 'clickgo',
22
+ 'controls': [
23
+ '/clickgo/control/common',
24
+ '/clickgo/control/form',
25
+ '/clickgo/control/task'
26
+ ],
27
+ 'locales': {
28
+ '/package/locale/sc': 'sc',
29
+ '/package/locale/tc': 'tc',
30
+ '/package/locale/en': 'en',
31
+ '/package/locale/ja': 'ja'
32
+ },
33
+ 'files': [
34
+ '/form/bar/bar.xml',
35
+ '/form/desktop/desktop.xml',
36
+ '/locale/en.json',
37
+ '/locale/ja.json',
38
+ '/locale/sc.json',
39
+ '/locale/tc.json'
40
+ ]
41
+ });
42
+ this.run(yield bar_1.default.create());
43
+ });
44
+ }
45
+ }
46
+ exports.default = default_1;
@@ -9,22 +9,19 @@ 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.computed = exports.data = void 0;
13
12
  const clickgo = require("clickgo");
14
- exports.data = {
15
- 'left': 0,
16
- 'top': 0,
17
- 'width': undefined,
18
- 'height': undefined,
19
- 'apps': []
20
- };
21
- exports.computed = {
22
- 'position': function () {
13
+ class default_1 extends clickgo.form.AbstractForm {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.apps = [];
17
+ }
18
+ get position() {
23
19
  return clickgo.core.config['task.position'];
24
20
  }
25
- };
26
- exports.methods = {
27
- itemClick: function (appIndex) {
21
+ showLauncher() {
22
+ clickgo.form.showLauncher();
23
+ }
24
+ itemClick(appIndex) {
28
25
  return __awaiter(this, void 0, void 0, function* () {
29
26
  if (this.apps[appIndex].formCount === 0) {
30
27
  try {
@@ -51,8 +48,8 @@ exports.methods = {
51
48
  else {
52
49
  }
53
50
  });
54
- },
55
- run: function (path) {
51
+ }
52
+ run(path) {
56
53
  return __awaiter(this, void 0, void 0, function* () {
57
54
  try {
58
55
  yield clickgo.task.run(path);
@@ -61,8 +58,8 @@ exports.methods = {
61
58
  return;
62
59
  }
63
60
  });
64
- },
65
- pin: function (index) {
61
+ }
62
+ pin(index) {
66
63
  const app = this.apps[index];
67
64
  if (!app) {
68
65
  return;
@@ -77,8 +74,8 @@ exports.methods = {
77
74
  'icon': app.icon
78
75
  };
79
76
  }
80
- },
81
- close: function (index) {
77
+ }
78
+ close(index) {
82
79
  const app = this.apps[index];
83
80
  if (!app) {
84
81
  return;
@@ -86,14 +83,14 @@ exports.methods = {
86
83
  for (const formId in app.forms) {
87
84
  clickgo.form.remove(parseInt(formId));
88
85
  }
89
- },
90
- changeFocus: function (formId) {
86
+ }
87
+ changeFocus(formId) {
91
88
  clickgo.form.changeFocus(parseInt(formId));
92
- },
93
- updatePosition: function (position) {
89
+ }
90
+ updatePosition(position) {
94
91
  clickgo.core.config['task.position'] = position;
95
- },
96
- getAppIndexByPath: function (path) {
92
+ }
93
+ getAppIndexByPath(path) {
97
94
  for (let i = 0; i < this.apps.length; ++i) {
98
95
  const app = this.apps[i];
99
96
  if (app.path !== path) {
@@ -103,56 +100,56 @@ exports.methods = {
103
100
  }
104
101
  return -1;
105
102
  }
106
- };
107
- const mounted = function () {
108
- clickgo.form.setTopMost(true);
109
- clickgo.task.setSystem();
110
- for (const path in clickgo.core.config['task.pin']) {
111
- this.apps.push({
112
- 'name': clickgo.core.config['task.pin'][path].name,
113
- 'path': path,
114
- 'icon': clickgo.core.config['task.pin'][path].icon,
115
- 'selected': false,
116
- 'opened': false,
117
- 'forms': {},
118
- 'formCount': 0,
119
- 'pin': true
120
- });
121
- }
122
- const tasks = clickgo.task.getList();
123
- for (const taskId in tasks) {
124
- if (parseInt(taskId) === this.taskId) {
125
- continue;
126
- }
127
- const task = tasks[taskId];
128
- let appIndex = this.getAppIndexByPath(task.path);
129
- if (appIndex >= 0) {
130
- this.apps[appIndex].opened = true;
131
- }
132
- else {
103
+ onMounted() {
104
+ this.topMost = true;
105
+ clickgo.task.setSystem(this.formId);
106
+ for (const path in clickgo.core.config['task.pin']) {
133
107
  this.apps.push({
134
- 'name': task.name,
135
- 'path': task.path,
136
- 'icon': task.icon,
108
+ 'name': clickgo.core.config['task.pin'][path].name,
109
+ 'path': path,
110
+ 'icon': clickgo.core.config['task.pin'][path].icon,
137
111
  'selected': false,
138
- 'opened': true,
112
+ 'opened': false,
139
113
  'forms': {},
140
114
  'formCount': 0,
141
- 'pin': false
115
+ 'pin': true
142
116
  });
143
- appIndex = this.apps.length - 1;
144
117
  }
145
- const forms = clickgo.form.getList(parseInt(taskId));
146
- for (const formId in forms) {
147
- const form = forms[formId];
148
- this.apps[appIndex].forms[formId] = {
149
- 'title': form.title,
150
- 'icon': form.icon || this.apps[appIndex].icon
151
- };
118
+ const tasks = clickgo.task.getList();
119
+ for (const taskId in tasks) {
120
+ if (parseInt(taskId) === this.taskId) {
121
+ continue;
122
+ }
123
+ const task = tasks[taskId];
124
+ let appIndex = this.getAppIndexByPath(task.path);
125
+ if (appIndex >= 0) {
126
+ this.apps[appIndex].opened = true;
127
+ }
128
+ else {
129
+ this.apps.push({
130
+ 'name': task.name,
131
+ 'path': task.path,
132
+ 'icon': task.icon,
133
+ 'selected': false,
134
+ 'opened': true,
135
+ 'forms': {},
136
+ 'formCount': 0,
137
+ 'pin': false
138
+ });
139
+ appIndex = this.apps.length - 1;
140
+ }
141
+ const forms = clickgo.form.getList(parseInt(taskId));
142
+ for (const formId in forms) {
143
+ const form = forms[formId];
144
+ this.apps[appIndex].forms[formId] = {
145
+ 'title': form.title,
146
+ 'icon': form.icon || this.apps[appIndex].icon
147
+ };
148
+ }
149
+ this.apps[appIndex].formCount = Object.keys(this.apps[appIndex].forms).length;
152
150
  }
153
- this.apps[appIndex].formCount = Object.keys(this.apps[appIndex].forms).length;
154
151
  }
155
- clickgo.core.setSystemEventListener('formCreated', (taskId, formId, title, icon) => {
152
+ onFormCreated(taskId, formId, title, icon) {
156
153
  if (taskId === this.taskId) {
157
154
  return;
158
155
  }
@@ -182,8 +179,8 @@ const mounted = function () {
182
179
  'icon': icon || this.apps[appIndex].icon
183
180
  };
184
181
  ++this.apps[appIndex].formCount;
185
- });
186
- clickgo.core.setSystemEventListener('formRemoved', (taskId, formId) => {
182
+ }
183
+ onFormRemoved(taskId, formId) {
187
184
  const task = clickgo.task.get(taskId);
188
185
  if (!task) {
189
186
  return;
@@ -204,8 +201,8 @@ const mounted = function () {
204
201
  else {
205
202
  this.apps.splice(appIndex, 1);
206
203
  }
207
- });
208
- clickgo.core.setSystemEventListener('formFocused', (taskId) => {
204
+ }
205
+ onFormFocused(taskId) {
209
206
  const task = clickgo.task.get(taskId);
210
207
  if (!task) {
211
208
  return;
@@ -215,8 +212,8 @@ const mounted = function () {
215
212
  return;
216
213
  }
217
214
  this.apps[appIndex].selected = true;
218
- });
219
- clickgo.core.setSystemEventListener('formBlurred', (taskId) => {
215
+ }
216
+ onFormBlurred(taskId) {
220
217
  const task = clickgo.task.get(taskId);
221
218
  if (!task) {
222
219
  return;
@@ -226,8 +223,8 @@ const mounted = function () {
226
223
  return;
227
224
  }
228
225
  this.apps[appIndex].selected = false;
229
- });
230
- clickgo.core.setSystemEventListener('formTitleChanged', (taskId, formId, title) => {
226
+ }
227
+ onFormTitleChanged(taskId, formId, title) {
231
228
  const task = clickgo.task.get(taskId);
232
229
  if (!task) {
233
230
  return;
@@ -240,8 +237,8 @@ const mounted = function () {
240
237
  return;
241
238
  }
242
239
  this.apps[appIndex].forms[formId].title = title;
243
- });
244
- clickgo.core.setSystemEventListener('formIconChanged', (taskId, formId, icon) => {
240
+ }
241
+ onFormIconChanged(taskId, formId, icon) {
245
242
  const task = clickgo.task.get(taskId);
246
243
  if (!task) {
247
244
  return;
@@ -254,18 +251,20 @@ const mounted = function () {
254
251
  return;
255
252
  }
256
253
  this.apps[appIndex].forms[formId].icon = icon || this.apps[appIndex].icon;
257
- });
258
- clickgo.core.setSystemEventListener('configChanged', (n, v) => {
254
+ }
255
+ onConfigChanged(n, v) {
259
256
  if (n !== 'task.pin') {
260
257
  return;
261
258
  }
262
- for (const path in v) {
259
+ const val = v;
260
+ for (const path in val) {
261
+ const item = val[path];
263
262
  const appIndex = this.getAppIndexByPath(path);
264
263
  if (appIndex < 0) {
265
264
  this.apps.unshift({
266
- 'name': v[path].name,
265
+ 'name': item.name,
267
266
  'path': path,
268
- 'icon': v[path].icon,
267
+ 'icon': item.icon,
269
268
  'selected': false,
270
269
  'opened': false,
271
270
  'forms': {},
@@ -284,7 +283,7 @@ const mounted = function () {
284
283
  if (!app.pin) {
285
284
  continue;
286
285
  }
287
- if (v[app.path]) {
286
+ if (val[app.path]) {
288
287
  continue;
289
288
  }
290
289
  if (app.formCount === 0) {
@@ -294,6 +293,6 @@ const mounted = function () {
294
293
  app.pin = false;
295
294
  }
296
295
  }
297
- });
298
- };
299
- exports.mounted = mounted;
296
+ }
297
+ }
298
+ exports.default = default_1;
@@ -1,22 +1,21 @@
1
-
2
- <form v-model:width="width" v-model:height="height" v-model:left="left" v-model:top="top" title="Bar" border="none" :resize="false" background="transparent">
1
+ <form title="Bar" border="none" :resize="false" background="transparent">
3
2
  <task :position="position">
4
- <task-item>
3
+ <task-item @click="showLauncher">
5
4
  <img src="/clickgo/icon.png" style="width: 16px; height: 16px;" />
6
5
  </task-item>
7
6
  <task-item v-for="(app, appIndex) of apps" :selected="app.selected" :opened="app.opened" :multi="app.formCount > 1" @click="itemClick(appIndex)" @mousedown="$event.stopPropagation()" @touchstart="$event.stopPropagation()">
8
- <img :src="app.icon" style="width: 16px; height: 16px;" />
7
+ <img :src="app.icon || '/clickgo/icon.png'" style="width: 16px; height: 16px;" />
9
8
  <template v-if="app.formCount > 1" v-slot:pop>
10
9
  <menulist>
11
10
  <menulist-item v-for="(form, formId) of app.forms" @click="changeFocus(formId)">
12
- <img :src="form.icon" style="width: 16px; height: 16px;" /><label style="margin-left: 10px;">{{form.title}}</label>
11
+ <img :src="form.icon || app.icon" style="width: 16px; height: 16px;" /><label style="margin-left: 10px;">{{form.title}}</label>
13
12
  </menulist-item>
14
13
  </menulist>
15
14
  </template>
16
15
  <template v-slot:contextmenu>
17
16
  <menulist>
18
17
  <menulist-item @click="run(app.path)">
19
- <img :src="app.icon" style="width: 16px; height: 16px;" /><label style="margin-left: 10px;">{{app.name}}</label>
18
+ <img :src="app.icon || '/clickgo/icon.png'" style="width: 16px; height: 16px;" /><label style="margin-left: 10px;">{{app.name}}</label>
20
19
  </menulist-item>
21
20
  <menulist-split v-if="app.formCount > 0"></menulist-split>
22
21
  <menulist-item @click="pin(appIndex)">
package/dist/clickgo.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zip = exports.tool = exports.theme = exports.task = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.vue = exports.getSafe = exports.setSafe = exports.getPlatform = exports.getNative = exports.getVersion = void 0;
3
+ exports.zip = exports.tool = exports.theme = exports.task = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.vue = exports.getPlatform = exports.getNative = exports.getVersion = void 0;
4
4
  const version = '3.0.0';
5
5
  function getVersion() {
6
6
  return version;
@@ -22,15 +22,6 @@ function getPlatform() {
22
22
  return platform;
23
23
  }
24
24
  exports.getPlatform = getPlatform;
25
- let safe = true;
26
- function setSafe(val) {
27
- safe = val;
28
- }
29
- exports.setSafe = setSafe;
30
- function getSafe() {
31
- return safe;
32
- }
33
- exports.getSafe = getSafe;
34
25
  exports.vue = window.Vue;
35
26
  exports.control = require("./lib/control");
36
27
  exports.core = require("./lib/core");
package/dist/clickgo.ts CHANGED
@@ -34,14 +34,6 @@ export function getPlatform(): NodeJS.Platform | 'web' {
34
34
  return platform;
35
35
  }
36
36
 
37
- let safe = true;
38
- export function setSafe(val: boolean): void {
39
- safe = val;
40
- }
41
- export function getSafe(): boolean {
42
- return safe;
43
- }
44
-
45
37
  export const vue: import('../types/index').IVueObject = (window as any).Vue;
46
38
 
47
39
  export * as control from './lib/control';
Binary file
Binary file
Binary file
Binary file
Binary file