clickgo 3.0.7-dev8 → 3.1.1-dev10

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/dialog/dialog.js +10 -6
  4. package/dist/app/demo/form/control/form/form.js +21 -20
  5. package/dist/app/demo/form/control/form/form.xml +3 -3
  6. package/dist/app/demo/form/main.js +34 -10
  7. package/dist/app/demo/form/main.xml +4 -4
  8. package/dist/app/demo/form/method/form/form.js +103 -101
  9. package/dist/app/demo/form/method/form/form.xml +9 -10
  10. package/dist/app/task/app.js +46 -0
  11. package/dist/app/task/form/bar/bar.js +84 -88
  12. package/dist/app/task/form/bar/bar.xml +4 -5
  13. package/dist/clickgo.js +1 -10
  14. package/dist/clickgo.ts +0 -8
  15. package/dist/control/common.cgc +0 -0
  16. package/dist/control/form.cgc +0 -0
  17. package/dist/control/monaco.cgc +0 -0
  18. package/dist/control/property.cgc +0 -0
  19. package/dist/control/task.cgc +0 -0
  20. package/dist/index.js +105 -56
  21. package/dist/index.ts +164 -59
  22. package/dist/lib/control.js +363 -240
  23. package/dist/lib/control.ts +497 -284
  24. package/dist/lib/core.js +313 -228
  25. package/dist/lib/core.ts +400 -255
  26. package/dist/lib/dom.ts +1 -3
  27. package/dist/lib/form.js +447 -951
  28. package/dist/lib/form.ts +686 -1097
  29. package/dist/lib/fs.js +42 -39
  30. package/dist/lib/fs.ts +45 -41
  31. package/dist/lib/native.ts +3 -0
  32. package/dist/lib/task.js +708 -182
  33. package/dist/lib/task.ts +778 -200
  34. package/dist/lib/theme.ts +2 -2
  35. package/dist/lib/tool.js +58 -48
  36. package/dist/lib/tool.ts +80 -64
  37. package/dist/theme/familiar.cgt +0 -0
  38. package/package.json +5 -7
  39. package/types/index.d.ts +284 -335
  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.7-dev8'}"></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;
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.data = void 0;
4
- exports.data = {
5
- 'message': 'message',
6
- 'buttons': ['OK'],
7
- 'btn': 'none'
8
- };
3
+ const clickgo = require("clickgo");
4
+ class default_1 extends clickgo.form.AbstractForm {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.message = 'message';
8
+ this.buttons = ['OK'];
9
+ this.btn = 'none';
10
+ }
11
+ }
12
+ 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,41 @@ 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
+ const dialog_1 = require("./control/dialog/dialog");
15
+ const form_2 = require("./method/form/form");
16
+ class default_1 extends clickgo.form.AbstractForm {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.ntab = '';
20
+ }
21
+ openForm(name) {
19
22
  return __awaiter(this, void 0, void 0, function* () {
20
- yield clickgo.form.create({
21
- 'file': `${type}/${name}/${name}`
22
- });
23
+ let frm = 0;
24
+ switch (name) {
25
+ case 'cblock': {
26
+ frm = yield this.createForm('control/block/block');
27
+ break;
28
+ }
29
+ case 'cform': {
30
+ frm = yield form_1.default.create();
31
+ break;
32
+ }
33
+ case 'cdialog': {
34
+ frm = yield dialog_1.default.create();
35
+ break;
36
+ }
37
+ case 'mform': {
38
+ frm = yield form_2.default.create();
39
+ break;
40
+ }
41
+ }
42
+ if (typeof frm === 'number') {
43
+ return;
44
+ }
45
+ frm.show();
23
46
  });
24
47
  }
25
- };
48
+ }
49
+ 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>
@@ -11,9 +11,9 @@
11
11
  <button @click="openForm('control', 'tab')">Tab</button>
12
12
  <button @click="openForm('control', 'label')">Label</button>
13
13
  <button @click="openForm('control', 'loading')">Loading</button>
14
- <button @click="openForm('control', 'dialog')">Dialog</button>
14
+ <button @click="openForm('cdialog')">Dialog</button>
15
15
  <button @click="openForm('control', 'file')">File</button>
16
- <button @click="openForm('control', 'block')">Block</button>
16
+ <button @click="openForm('cblock')">Block</button>
17
17
  <button @click="openForm('control', 'overflow')">Overflow</button>
18
18
  <button @click="openForm('control', 'view')">View</button>
19
19
  <button @click="openForm('control', 'greatview')">Greatview</button>
@@ -30,7 +30,7 @@
30
30
  <layout class="buttons" gutter="10" direction="v">
31
31
  <button @click="openForm('method', 'core')">Library core</button>
32
32
  <button @click="openForm('method', 'dom')">Library dom</button>
33
- <button @click="openForm('method', 'form')">Library form</button>
33
+ <button @click="openForm('mform')">Library form</button>
34
34
  <button @click="openForm('method', 'fs')">Library fs</button>
35
35
  <button @click="openForm('method', 'task')">Library task</button>
36
36
  <button @click="openForm('method', 'theme')">Library theme</button>
@@ -9,76 +9,76 @@ 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.receive = exports.methods = exports.data = void 0;
13
12
  const clickgo = require("clickgo");
14
- exports.data = {
15
- 'fid': '0',
16
- 'sendValue': 'sendValue',
17
- 'tid': '0',
18
- 'type': 'primary',
19
- 'progress': 'noraml',
20
- 'dialogResult': '',
21
- 'setTopMostValue': false
22
- };
23
- exports.methods = {
24
- min: function () {
25
- clickgo.form.min();
26
- },
27
- max: function () {
28
- clickgo.form.max();
29
- },
30
- close: function () {
31
- clickgo.form.close();
32
- },
33
- bindResize: function (e) {
13
+ class default_1 extends clickgo.form.AbstractForm {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.fid = '0';
17
+ this.sendValue = 'sendValue';
18
+ this.tid = '0';
19
+ this.type = 'primary';
20
+ this.progress = 'noraml';
21
+ this.dr = '';
22
+ this.setTopMostValue = false;
23
+ }
24
+ min() {
25
+ clickgo.form.min(this.formId);
26
+ }
27
+ max() {
28
+ clickgo.form.max(this.formId);
29
+ }
30
+ close() {
31
+ clickgo.form.close(this.formId);
32
+ }
33
+ bindResize(e) {
34
34
  clickgo.form.bindResize(e, 'rb');
35
- },
36
- bindDrag: function (e) {
35
+ }
36
+ bindDrag(e) {
37
37
  clickgo.form.bindDrag(e);
38
- },
39
- getTaskId: function () {
38
+ }
39
+ getTaskId() {
40
40
  clickgo.form.dialog(clickgo.form.getTaskId(parseInt(this.fid)).toString()).catch((e) => { throw e; });
41
- },
42
- get: function () {
41
+ }
42
+ get() {
43
43
  clickgo.form.dialog(JSON.stringify(clickgo.form.get(parseInt(this.fid)))).catch((e) => { throw e; });
44
- },
45
- send: function () {
44
+ }
45
+ send() {
46
46
  clickgo.form.send(parseInt(this.fid), {
47
47
  'key': this.sendValue
48
48
  });
49
- },
50
- changeFocus: function () {
49
+ }
50
+ changeFocus() {
51
51
  clickgo.form.changeFocus(parseInt(this.fid));
52
- },
53
- getList: function () {
52
+ }
53
+ getList() {
54
54
  let str = JSON.stringify(clickgo.form.getList(this.taskId));
55
55
  str = str.replace(/"icon":"(.*?)"/g, function (t, t1) {
56
56
  return `"icon":"${t1 ? (t1.slice(0, 10) + '...') : t1}"`;
57
57
  });
58
58
  clickgo.form.dialog(`<overflow direction="v" style="width: 200px; height: 80px;">${str}</overflow>`).catch((e) => { throw e; });
59
- },
60
- getMaxZIndexID: function () {
59
+ }
60
+ getMaxZIndexID() {
61
61
  const fid = clickgo.form.getMaxZIndexID();
62
62
  clickgo.form.dialog(JSON.stringify(fid)).catch((e) => { throw e; });
63
- },
64
- getRectByBorder: function () {
63
+ }
64
+ getRectByBorder() {
65
65
  const size = clickgo.form.getRectByBorder('rb');
66
66
  clickgo.form.dialog(JSON.stringify(size)).catch((e) => { throw e; });
67
- },
68
- showCircular: function (e) {
67
+ }
68
+ showCircular(e) {
69
69
  clickgo.form.showCircular(e.clientX, e.clientY);
70
- },
71
- showRectangle: function (e) {
70
+ }
71
+ showRectangle(e) {
72
72
  return __awaiter(this, void 0, void 0, function* () {
73
73
  clickgo.form.showRectangle(e.clientX, e.clientY, 'rb');
74
74
  yield clickgo.tool.sleep(1000);
75
75
  clickgo.form.hideRectangle();
76
76
  });
77
- },
78
- showDrag: function () {
77
+ }
78
+ showDrag() {
79
79
  return __awaiter(this, void 0, void 0, function* () {
80
80
  clickgo.form.showDrag();
81
- const rect = this.$refs.showDrag.$el.getBoundingClientRect();
81
+ const rect = this.refs.showDrag.$el.getBoundingClientRect();
82
82
  clickgo.form.moveDrag({
83
83
  'left': rect.left,
84
84
  'top': rect.top,
@@ -88,8 +88,8 @@ exports.methods = {
88
88
  yield clickgo.tool.sleep(1000);
89
89
  clickgo.form.hideDrag();
90
90
  });
91
- },
92
- notify: function () {
91
+ }
92
+ notify() {
93
93
  return __awaiter(this, void 0, void 0, function* () {
94
94
  let icon = null;
95
95
  if (this.progress === 'progress + icon') {
@@ -117,56 +117,59 @@ exports.methods = {
117
117
  clickgo.form.notifyProgress(nid, 100);
118
118
  }
119
119
  });
120
- },
121
- showPop: function (e) {
120
+ }
121
+ showPop(e) {
122
122
  if (!e.currentTarget) {
123
123
  return;
124
124
  }
125
- clickgo.form.showPop(e.currentTarget, this.$refs.pop, 'v');
126
- },
127
- createParam: function () {
125
+ clickgo.form.showPop(e.currentTarget, this.refs.pop, 'v');
126
+ }
127
+ createParam() {
128
128
  clickgo.form.create({
129
129
  'layout': '<form width=\'300\' height=\'300\' title=\'normal\'></form>'
130
130
  }).catch((e) => { throw e; });
131
- },
132
- createPath: function () {
133
- clickgo.form.create('test').then((e) => { console.log(e); }).catch((e) => { throw e; });
134
- },
135
- createTop: function () {
136
- clickgo.form.create({
137
- 'layout': '<form width=\'300\' height=\'300\' title=\'normal\'></form>',
138
- 'topMost': true
139
- }).catch((e) => { throw e; });
140
- },
141
- dialog: function () {
131
+ }
132
+ createPath() {
133
+ this.createForm('test').then((e) => { console.log(e); }).catch((e) => { throw e; });
134
+ }
135
+ createTop() {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ const frm = yield this.createForm('test');
138
+ if (typeof frm === 'number') {
139
+ return;
140
+ }
141
+ frm.topMost = true;
142
+ });
143
+ }
144
+ dialog() {
142
145
  return __awaiter(this, void 0, void 0, function* () {
143
- this.dialogResult = yield clickgo.form.dialog('Hello world!');
146
+ this.dr = yield clickgo.form.dialog('Hello world!');
144
147
  });
145
- },
146
- dialogLong: function () {
148
+ }
149
+ dialogLong() {
147
150
  return __awaiter(this, void 0, void 0, function* () {
148
- this.dialogResult = yield clickgo.form.dialog('longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong');
151
+ this.dr = yield clickgo.form.dialog('longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong');
149
152
  });
150
- },
151
- dialogTitle: function () {
153
+ }
154
+ dialogTitle() {
152
155
  return __awaiter(this, void 0, void 0, function* () {
153
- this.dialogResult = yield clickgo.form.dialog({
156
+ this.dr = yield clickgo.form.dialog({
154
157
  'title': 'Title',
155
158
  'content': 'Hello world!'
156
159
  });
157
160
  });
158
- },
159
- dialogButtons: function () {
161
+ }
162
+ dialogButtons() {
160
163
  return __awaiter(this, void 0, void 0, function* () {
161
- this.dialogResult = yield clickgo.form.dialog({
164
+ this.dr = yield clickgo.form.dialog({
162
165
  'content': 'Hello world!',
163
166
  'buttons': ['A', 'B', 'C']
164
167
  });
165
168
  });
166
- },
167
- dialogCannot: function () {
169
+ }
170
+ dialogCannot() {
168
171
  return __awaiter(this, void 0, void 0, function* () {
169
- this.dialogResult = yield clickgo.form.dialog({
172
+ this.dr = yield clickgo.form.dialog({
170
173
  'content': 'Hello world!',
171
174
  'buttons': ['Do not close', 'Close'],
172
175
  'select': (e, button) => {
@@ -176,42 +179,41 @@ exports.methods = {
176
179
  }
177
180
  });
178
181
  });
179
- },
180
- confirm: function (cancel) {
182
+ }
183
+ confirm(cancel) {
181
184
  return __awaiter(this, void 0, void 0, function* () {
182
- this.dialogResult = yield clickgo.form.confirm({
185
+ this.dr = yield clickgo.form.confirm({
183
186
  'content': 'Hello world?',
184
187
  'cancel': cancel
185
188
  });
186
- if (typeof this.dialogResult === 'boolean') {
187
- this.dialogResult = this.dialogResult ? 'true (boolean)' : 'false (boolean)';
189
+ if (typeof this.dr === 'boolean') {
190
+ this.dr = this.dr ? 'true (boolean)' : 'false (boolean)';
188
191
  }
189
192
  else {
190
- this.dialogResult = this.dialogResult.toString() + ' (number)';
193
+ this.dr = this.dr.toString() + ' (number)';
191
194
  }
192
195
  });
193
- },
194
- setTopMost: function () {
196
+ }
197
+ setTopMost() {
195
198
  this.setTopMostValue = !this.setTopMostValue;
196
- clickgo.form.setTopMost(this.setTopMostValue);
197
- },
198
- flash: function () {
199
- clickgo.form.flash();
200
- },
201
- hide: function () {
199
+ this.topMost = this.setTopMostValue;
200
+ }
201
+ flash() {
202
+ clickgo.form.flash(this.formId);
203
+ }
204
+ hhide() {
202
205
  return __awaiter(this, void 0, void 0, function* () {
203
- clickgo.form.hide();
206
+ this.hide();
204
207
  yield clickgo.tool.sleep(1000);
205
- clickgo.form.show();
208
+ this.show();
206
209
  });
207
210
  }
208
- };
209
- const receive = function (obj) {
210
- clickgo.form.dialog(JSON.stringify(obj)).catch((e) => { throw e; });
211
- };
212
- exports.receive = receive;
213
- const mounted = function () {
214
- this.fid = this.formId;
215
- this.tid = this.taskId;
216
- };
217
- exports.mounted = mounted;
211
+ onReceive(obj) {
212
+ clickgo.form.dialog(JSON.stringify(obj)).catch((e) => { throw e; });
213
+ }
214
+ onMounted() {
215
+ this.fid = this.formId.toString();
216
+ this.tid = this.taskId.toString();
217
+ }
218
+ }
219
+ exports.default = default_1;
@@ -1,11 +1,11 @@
1
- <form width="350" height="400" title="Library form" padding="10">
2
- <overflow direction="v" style="flex: 1;">
1
+ <form width="350" height="400" title="Library form">
2
+ <overflow direction="v" style="flex: 1; padding: 10px;">
3
3
  <layout gutter="10" direction="v" style="flex: 1;">
4
- <button @click="min" style="height: 30px;">min()</button>
5
- <button @click="max" style="height: 30px;">max()</button>
6
- <button @click="close" style="height: 30px;">close()</button>
4
+ <button @click="min" style="height: 30px;">min({{formId}})</button>
5
+ <button @click="max" style="height: 30px;">max({{formId}})</button>
6
+ <button @click="close" style="height: 30px;">close({{formId}})</button>
7
7
  <label @mousedown="bindResize" @touchstart="bindResize" style="padding: 20px; background: rgba(0, 0, 0, .1); cursor: se-resize;">bindResize(e, 'rb')</label>
8
- <label @mousedown="bindDrag" @touchstart="bindDrag" style="padding: 20px; background: rgba(0, 0, 0, .1);">bindDrag(e)</label>
8
+ <label @mousedown="bindDrag" @touchstart="bindDrag" style="padding: 20px; background: rgba(0, 0, 0, .1); cursor: move;">bindDrag(e)</label>
9
9
  <layout gutter="10" align-v="center">
10
10
  <label>Form ID:</label>
11
11
  <text v-model="fid" style="flex: 1; width: 0; height: 30px;"></text>
@@ -37,10 +37,9 @@
37
37
  <teleport to="#cg-pop-list">
38
38
  <block ref="pop" data-cg-pop style="border: solid 1px #000; background: #FFF; width: 200px; height: 100px; display: flex; justify-content: center; align-items: center;">$refs.pop</block>
39
39
  </teleport>
40
- <button @click="createParam" style="height: 30px;">create({'layout':'xxx'})</button>
41
40
  <button @click="createPath" style="height: 30px;">create('test')</button>
42
41
  <button @click="createTop" style="height: 30px;">create({'layout':'xxx','topMost':true})</button>
43
- <label>Dialog result: {{dialogResult}}.</label>
42
+ <label>Dialog result: {{dr}}.</label>
44
43
  <button @click="dialog" style="height: 30px;">dialog('Hello world!')</button>
45
44
  <button @click="dialogLong">dialog('long...')</button>
46
45
  <button @click="dialogTitle" style="height: 30px;">dialog({'title':'Title','content':'Hello world!'})</button>
@@ -49,8 +48,8 @@
49
48
  <button @click="confirm(false)" style="height: 30px;">confirm('confirm')</button>
50
49
  <button @click="confirm(true)" style="height: 30px;">confirm({'content':'confirm','cancel':true})</button>
51
50
  <button @click="setTopMost" style="height: 30px;">setTopMost({{setTopMostValue ? 'false' : 'true'}})</button>
52
- <button @click="flash" style="height: 30px;">flash()</button>
53
- <button @click="hide" style="height: 30px;">hide() and show()</button>
51
+ <button @click="flash" style="height: 30px;">flash({{formId}})</button>
52
+ <button @click="hhide" style="height: 30px;">hide({{formId}}) and show({{formId}})</button>
54
53
  </layout>
55
54
  </overflow>
56
55
  </form>