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
|
@@ -1,50 +1,52 @@
|
|
|
1
1
|
<form width="400" height="550" title="ClickGo demo" icon="/package/res/icon.svg">
|
|
2
2
|
<tab v-model="ntab" :tabs="['control', 'method', 'event']" style="margin: 10px; flex: 1;">
|
|
3
|
-
<
|
|
3
|
+
<flow v-if="ntab === 'control'" class="inner" direction="v">
|
|
4
4
|
<layout class="buttons" gutter="10" direction="v">
|
|
5
5
|
<button @click="openForm('cform')">Form</button>
|
|
6
|
-
<button @click="openForm('
|
|
7
|
-
<button @click="openForm('
|
|
8
|
-
<button @click="openForm('
|
|
9
|
-
<button @click="openForm('
|
|
10
|
-
<button @click="openForm('
|
|
11
|
-
<button @click="openForm('
|
|
12
|
-
<button @click="openForm('
|
|
13
|
-
<button @click="openForm('
|
|
6
|
+
<button @click="openForm('cimg')">Img</button>
|
|
7
|
+
<button @click="openForm('cbutton')">Button</button>
|
|
8
|
+
<button @click="openForm('ccheck')">Check</button>
|
|
9
|
+
<button @click="openForm('cradio')">Radio</button>
|
|
10
|
+
<button @click="openForm('ctext')">Text</button>
|
|
11
|
+
<button @click="openForm('ctab')">Tab</button>
|
|
12
|
+
<button @click="openForm('clabel')">Label</button>
|
|
13
|
+
<button @click="openForm('cloading')">Loading</button>
|
|
14
14
|
<button @click="openForm('cdialog')">Dialog</button>
|
|
15
|
-
<button @click="openForm('
|
|
15
|
+
<button @click="openForm('cfile')">File</button>
|
|
16
16
|
<button @click="openForm('cblock')">Block</button>
|
|
17
|
-
<button @click="openForm('
|
|
18
|
-
<button @click="openForm('
|
|
19
|
-
<button @click="openForm('
|
|
20
|
-
<button @click="openForm('
|
|
21
|
-
<button @click="openForm('
|
|
22
|
-
<button @click="openForm('
|
|
23
|
-
<button @click="openForm('
|
|
24
|
-
<button @click="openForm('
|
|
25
|
-
<button @click="openForm('
|
|
26
|
-
<button @click="openForm('control', 'monaco')">Monaco</button>
|
|
17
|
+
<button @click="openForm('cflow')">Flow</button>
|
|
18
|
+
<button @click="openForm('cvflow')">Vflow</button>
|
|
19
|
+
<button @click="openForm('cmarquee')">Marquee</button>
|
|
20
|
+
<button @click="openForm('cscroll')">Scroll</button>
|
|
21
|
+
<button @click="openForm('cmenu')">Menu</button>
|
|
22
|
+
<button @click="openForm('clist')">List</button>
|
|
23
|
+
<button @click="openForm('cselect')">Select</button>
|
|
24
|
+
<button @click="openForm('cproperty')">Property</button>
|
|
25
|
+
<button @click="openForm('cmonaco')">Monaco</button>
|
|
27
26
|
</layout>
|
|
28
|
-
</
|
|
29
|
-
<
|
|
27
|
+
</flow>
|
|
28
|
+
<flow v-else-if="ntab === 'method'" class="inner" direction="v">
|
|
30
29
|
<layout class="buttons" gutter="10" direction="v">
|
|
31
|
-
<button @click="openForm('
|
|
32
|
-
<button @click="openForm('
|
|
30
|
+
<button @click="openForm('mcore')">Library core</button>
|
|
31
|
+
<button @click="openForm('mdom')">Library dom</button>
|
|
33
32
|
<button @click="openForm('mform')">Library form</button>
|
|
34
|
-
<button @click="openForm('
|
|
35
|
-
<button @click="openForm('
|
|
36
|
-
<button @click="openForm('
|
|
37
|
-
<button @click="openForm('
|
|
38
|
-
<button @click="openForm('
|
|
33
|
+
<button @click="openForm('mfs')">Library fs</button>
|
|
34
|
+
<button @click="openForm('mnative')">Library native</button>
|
|
35
|
+
<button @click="openForm('mtask')">Library task</button>
|
|
36
|
+
<button @click="openForm('mtheme')">Library theme</button>
|
|
37
|
+
<button @click="openForm('mtool')">Library tool</button>
|
|
38
|
+
<button @click="openForm('mzip')">Library zip</button>
|
|
39
39
|
<button @click="openForm('aform')">Abstract Form</button>
|
|
40
|
+
<button @click="openForm('msystem')">System</button>
|
|
40
41
|
</layout>
|
|
41
|
-
</
|
|
42
|
-
<
|
|
42
|
+
</flow>
|
|
43
|
+
<flow v-else class="inner" direction="v">
|
|
43
44
|
<layout class="buttons" gutter="10" direction="v">
|
|
44
|
-
<button @click="openForm('
|
|
45
|
-
<button @click="openForm('
|
|
46
|
-
<button @click="openForm('
|
|
45
|
+
<button @click="openForm('escreen')">About screen</button>
|
|
46
|
+
<button @click="openForm('eform')">About form</button>
|
|
47
|
+
<button @click="openForm('etask')">About task</button>
|
|
48
|
+
<button @click="openForm('eother')">About other</button>
|
|
47
49
|
</layout>
|
|
48
|
-
</
|
|
50
|
+
</flow>
|
|
49
51
|
</tab>
|
|
50
52
|
</form>
|
|
@@ -10,6 +10,7 @@ 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 sd_1 = require("./sd");
|
|
13
14
|
class default_1 extends clickgo.form.AbstractForm {
|
|
14
15
|
constructor() {
|
|
15
16
|
super(...arguments);
|
|
@@ -41,7 +42,7 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
41
42
|
}
|
|
42
43
|
sshowDialog() {
|
|
43
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
-
const frm = yield
|
|
45
|
+
const frm = yield sd_1.default.create();
|
|
45
46
|
if (typeof frm === 'number') {
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<form width="350" height="400" title="Abstract Form">
|
|
2
|
-
<
|
|
2
|
+
<flow direction="v" style="flex: 1; padding: 10px;">
|
|
3
3
|
<layout gutter="10" direction="v" style="flex: 1;">
|
|
4
4
|
<label>filename: {{filename}}</label>
|
|
5
5
|
<label>controlName: {{controlName}}</label>
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
<button @click="sshowDialog" style="height: 30px; flex: 1;">showDialog()</button>
|
|
30
30
|
<label>result: {{dr}}</label>
|
|
31
31
|
</layout>
|
|
32
|
+
<button @click="close" style="height: 30px;">close()</button>
|
|
32
33
|
</layout>
|
|
33
|
-
</
|
|
34
|
+
</flow>
|
|
34
35
|
</form>
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
class Sd extends clickgo.form.AbstractForm {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.dr = '';
|
|
17
|
+
}
|
|
18
|
+
newDialog() {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
const frm = yield Sd.create();
|
|
21
|
+
if (typeof frm === 'number') {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
this.dr = yield frm.showDialog();
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = Sd;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<form width="200" height="200" title="dialog">
|
|
2
|
+
<layout align-v="center" align-h="center" direction="v" gutter="10" style="flex: 1; width: 0;">
|
|
3
|
+
<label>Haha! Result: {{dr}}</label>
|
|
4
|
+
<button @click="dialogResult = dialogResult ? '' : 'Done'" style="padding: 10px;">{{dialogResult ? 'Remove' : 'Set'}} dialogResult</button>
|
|
5
|
+
<button @click="newDialog"style="padding: 10px;">showDialog()</button>
|
|
6
|
+
</layout>
|
|
7
|
+
</form>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
<form width="200" height="200" title="From path">
|
|
2
|
-
<layout align-v="center" align-h="center"
|
|
3
|
-
<label>
|
|
4
|
-
|
|
5
|
-
</layout>
|
|
1
|
+
<form width="200" height="200" title="From path">
|
|
2
|
+
<layout align-v="center" align-h="center" style="flex: 1; width: 0;">
|
|
3
|
+
<label>Create form path</label>
|
|
4
|
+
</layout>
|
|
6
5
|
</form>
|
|
@@ -9,17 +9,32 @@ 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.computed = void 0;
|
|
13
12
|
const clickgo = require("clickgo");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
class default_1 extends clickgo.form.AbstractForm {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.hash = 'test';
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
get config() {
|
|
19
|
+
return JSON.stringify(clickgo.core.config, null, 4).replace(/"icon": "([\s\S]+?)"/g, '"icon": "data:image/..."');
|
|
20
|
+
}
|
|
21
|
+
getCdn() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
yield clickgo.form.dialog(clickgo.core.getCdn());
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
getAvailArea() {
|
|
21
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
28
|
yield clickgo.form.dialog(JSON.stringify(clickgo.core.getAvailArea()));
|
|
23
29
|
});
|
|
24
30
|
}
|
|
25
|
-
|
|
31
|
+
hashe() {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
if (clickgo.core.hash(this.hash)) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
yield clickgo.form.dialog('No permission.');
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = default_1;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
<form width="350" height="400" title="Library task" padding="10">
|
|
2
2
|
<layout direction="v" gutter="10" style="flex: 1;">
|
|
3
|
-
<button @click="getAvailArea" style="height: 30px;">getAvailArea()</button>
|
|
4
3
|
<label>config:</label>
|
|
5
4
|
<text v-model="config" readonly multi style="flex: 1;"></text>
|
|
5
|
+
<button @click="getCdn" style="height: 30px;">getCdn()</button>
|
|
6
|
+
<button @click="getAvailArea" style="height: 30px;">getAvailArea()</button>
|
|
7
|
+
<layout gutter="10" align-v="center">
|
|
8
|
+
<text v-model="hash" style="flex: 1;" />
|
|
9
|
+
<button @click="hashe" style="height: 30px; padding: 0 10px;">hash('{{hash}}')</button>
|
|
10
|
+
</layout>
|
|
6
11
|
</layout>
|
|
7
12
|
</form>
|
|
@@ -9,155 +9,147 @@ 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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
class default_1 extends clickgo.form.AbstractForm {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.watchSizeText = false;
|
|
17
|
+
this.watchSizeHeight = true;
|
|
18
|
+
this.watchText = false;
|
|
19
|
+
this.watchInner = true;
|
|
20
|
+
this.watchStyleChange = true;
|
|
21
|
+
this.bindGestureText = '';
|
|
22
|
+
this.bindGestureWheelText = '';
|
|
23
|
+
this.bindLongText = false;
|
|
24
|
+
this.moveLeft = 0;
|
|
25
|
+
this.moveTop = 0;
|
|
26
|
+
this.moveWidth = 25;
|
|
27
|
+
this.moveHeight = 25;
|
|
28
|
+
}
|
|
29
|
+
get isMove() {
|
|
30
30
|
return clickgo.dom.is.move;
|
|
31
|
-
}
|
|
32
|
-
|
|
31
|
+
}
|
|
32
|
+
get isShift() {
|
|
33
33
|
return clickgo.dom.is.shift;
|
|
34
|
-
}
|
|
35
|
-
|
|
34
|
+
}
|
|
35
|
+
get isCtrl() {
|
|
36
36
|
return clickgo.dom.is.ctrl;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
exports.methods = {
|
|
40
|
-
setGlobalCursor: function (type) {
|
|
38
|
+
setGlobalCursor(type) {
|
|
41
39
|
clickgo.dom.setGlobalCursor(type);
|
|
42
|
-
}
|
|
43
|
-
hasTouchButMouse
|
|
40
|
+
}
|
|
41
|
+
hasTouchButMouse(e) {
|
|
44
42
|
clickgo.form.dialog(clickgo.dom.hasTouchButMouse(e) ? 'true' : 'false').catch((e) => { throw e; });
|
|
45
|
-
}
|
|
46
|
-
getStyleCount
|
|
43
|
+
}
|
|
44
|
+
getStyleCount() {
|
|
47
45
|
clickgo.form.dialog(clickgo.dom.getStyleCount(this.taskId, 'form').toString()).catch((e) => { throw e; });
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
clickgo.form.dialog(JSON.stringify(clickgo.dom.getSize(this.$refs.getSize.$el))).catch((e) => { throw e; });
|
|
51
|
-
},
|
|
52
|
-
watchSize: function () {
|
|
46
|
+
}
|
|
47
|
+
watchSize() {
|
|
53
48
|
this.watchSizeText = !this.watchSizeText;
|
|
54
49
|
if (this.watchSizeText) {
|
|
55
|
-
clickgo.dom.watchSize(this
|
|
56
|
-
clickgo.form.dialog(JSON.stringify(
|
|
50
|
+
clickgo.dom.watchSize(this.refs.watchSize.$el, () => {
|
|
51
|
+
clickgo.form.dialog(JSON.stringify({
|
|
52
|
+
'width': this.refs.watchSize.$el.offsetWidth,
|
|
53
|
+
'height': this.refs.watchSize.$el.offsetHeight
|
|
54
|
+
})).catch((e) => { throw e; });
|
|
57
55
|
});
|
|
58
56
|
}
|
|
59
57
|
else {
|
|
60
|
-
clickgo.dom.unwatchSize(this
|
|
58
|
+
clickgo.dom.unwatchSize(this.refs.watchSize.$el);
|
|
61
59
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
60
|
+
}
|
|
61
|
+
wwatch() {
|
|
64
62
|
this.watchText = !this.watchText;
|
|
65
63
|
if (this.watchText) {
|
|
66
|
-
clickgo.dom.watch(this
|
|
64
|
+
clickgo.dom.watch(this.refs.watch.$el, () => {
|
|
67
65
|
clickgo.form.dialog('Changed.').catch((e) => { throw e; });
|
|
68
66
|
});
|
|
69
67
|
}
|
|
70
68
|
else {
|
|
71
|
-
clickgo.dom.unwatch(this
|
|
69
|
+
clickgo.dom.unwatch(this.refs.watch.$el);
|
|
72
70
|
}
|
|
73
|
-
}
|
|
74
|
-
isWatchStyle
|
|
75
|
-
clickgo.form.dialog(clickgo.dom.isWatchStyle(this
|
|
76
|
-
}
|
|
77
|
-
bindGesture
|
|
78
|
-
clickgo.dom.bindGesture(e, {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
this.bindGestureText = dir.slice(0, 1).toUpperCase() + dir.slice(1);
|
|
82
|
-
const handler = () => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
-
yield clickgo.tool.sleep(500);
|
|
84
|
-
this.bindGestureText = '';
|
|
85
|
-
});
|
|
86
|
-
handler().catch((e) => {
|
|
87
|
-
console.log(e);
|
|
88
|
-
});
|
|
71
|
+
}
|
|
72
|
+
isWatchStyle() {
|
|
73
|
+
clickgo.form.dialog(clickgo.dom.isWatchStyle(this.refs.watchStyle.$el) ? 'true' : 'false').catch((e) => { throw e; });
|
|
74
|
+
}
|
|
75
|
+
bindGesture(e) {
|
|
76
|
+
clickgo.dom.bindGesture(e, (ne, dir) => {
|
|
77
|
+
if (['top', 'bottom'].includes(dir)) {
|
|
78
|
+
return true;
|
|
89
79
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
handler().catch((e) => {
|
|
102
|
-
console.log(e);
|
|
103
|
-
});
|
|
80
|
+
return false;
|
|
81
|
+
}, (dir) => __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
this.bindGestureText = dir.slice(0, 1).toUpperCase() + dir.slice(1);
|
|
83
|
+
yield clickgo.tool.sleep(500);
|
|
84
|
+
this.bindGestureText = '';
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
bindGestureWheel(e) {
|
|
88
|
+
clickgo.dom.bindGesture(e, (ne, dir) => {
|
|
89
|
+
if (['top', 'bottom', 'left', 'right'].includes(dir)) {
|
|
90
|
+
return true;
|
|
104
91
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
92
|
+
return false;
|
|
93
|
+
}, (dir) => __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
this.bindGestureWheelText = dir.slice(0, 1).toUpperCase() + dir.slice(1);
|
|
95
|
+
yield clickgo.tool.sleep(500);
|
|
96
|
+
this.bindGestureWheelText = '';
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
bindLong() {
|
|
108
100
|
clickgo.form.dialog('Press and hold this button.').catch((e) => { throw e; });
|
|
109
|
-
}
|
|
110
|
-
bindLongDown
|
|
101
|
+
}
|
|
102
|
+
bindLongDown(e) {
|
|
111
103
|
clickgo.dom.bindLong(e, () => __awaiter(this, void 0, void 0, function* () {
|
|
112
104
|
this.bindLongText = true;
|
|
113
105
|
yield clickgo.tool.sleep(500);
|
|
114
106
|
this.bindLongText = false;
|
|
115
107
|
}));
|
|
116
|
-
}
|
|
117
|
-
bindDragDown
|
|
108
|
+
}
|
|
109
|
+
bindDragDown(e) {
|
|
118
110
|
clickgo.dom.bindDrag(e, {
|
|
119
|
-
'el': this
|
|
111
|
+
'el': this.refs.bindDrag,
|
|
120
112
|
'data': 'bindDragDownTest'
|
|
121
113
|
});
|
|
122
|
-
}
|
|
123
|
-
dragEnter
|
|
114
|
+
}
|
|
115
|
+
dragEnter(e) {
|
|
124
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
117
|
e.target.innerText = 'enter';
|
|
126
118
|
yield clickgo.tool.sleep(200);
|
|
127
119
|
e.target.innerText = '';
|
|
128
120
|
});
|
|
129
|
-
}
|
|
130
|
-
dragLeave
|
|
121
|
+
}
|
|
122
|
+
dragLeave(e) {
|
|
131
123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
124
|
e.target.innerText = 'leave';
|
|
133
125
|
yield clickgo.tool.sleep(200);
|
|
134
126
|
e.target.innerText = '';
|
|
135
127
|
});
|
|
136
|
-
}
|
|
137
|
-
drop
|
|
128
|
+
}
|
|
129
|
+
drop(e) {
|
|
138
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
139
131
|
e.target.innerText = 'drop';
|
|
140
132
|
yield clickgo.tool.sleep(500);
|
|
141
133
|
e.target.innerText = '';
|
|
142
134
|
});
|
|
143
|
-
}
|
|
144
|
-
bindMoveDown
|
|
135
|
+
}
|
|
136
|
+
bindMoveDown(e) {
|
|
145
137
|
clickgo.dom.bindMove(e, {
|
|
146
138
|
'areaObject': e.currentTarget,
|
|
147
|
-
'object': this
|
|
148
|
-
move: (
|
|
149
|
-
this.moveLeft += ox;
|
|
150
|
-
this.moveTop += oy;
|
|
139
|
+
'object': this.refs.move,
|
|
140
|
+
move: (e, o) => {
|
|
141
|
+
this.moveLeft += o.ox;
|
|
142
|
+
this.moveTop += o.oy;
|
|
151
143
|
}
|
|
152
144
|
});
|
|
153
|
-
}
|
|
154
|
-
fullscreen
|
|
145
|
+
}
|
|
146
|
+
fullscreen() {
|
|
155
147
|
clickgo.dom.fullscreen();
|
|
156
148
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
exports.
|
|
149
|
+
onMounted() {
|
|
150
|
+
clickgo.dom.watchStyle(this.refs.watchStyle.$el, 'font-size', (n, v) => {
|
|
151
|
+
clickgo.form.dialog('name: ' + n + ', value: ' + v).catch((e) => { throw e; });
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
exports.default = default_1;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
<form width="400" height="450" title="Library dom"
|
|
2
|
-
<
|
|
1
|
+
<form width="400" height="450" title="Library dom">
|
|
2
|
+
<flow direction="v" style="flex: 1; padding: 10px;">
|
|
3
3
|
<layout gutter="10" direction="v" style="flex: 1;">
|
|
4
4
|
<button @click="setGlobalCursor('wait')" style="height: 30px;">setGlobalCursor('wait')</button>
|
|
5
5
|
<button @click="setGlobalCursor" style="height: 30px;">setGlobalCursor()</button>
|
|
6
6
|
<button @click="hasTouchButMouse" style="height: 30px;">hasTouchButMouse()</button>
|
|
7
7
|
<button @click="getStyleCount" style="height: 30px;">getStyleCount({{taskId}}, 'form')</button>
|
|
8
|
-
<button @click="getSize" ref="getSize" style="height: 30px;">getSize(this.$refs.getSize)</button>
|
|
9
8
|
<layout gutter="10">
|
|
10
9
|
<button @click="watchSize" ref="watchSize" :style="{'height': (watchSizeHeight ? 30 : 50) + 'px'}" style="padding: 0 5px; flex: 1;">{{watchSizeText ? '' : '!'}}watchSize</button>
|
|
11
10
|
<button @click="watchSizeHeight = !watchSizeHeight" style="padding: 0 5px; flex: 1;">Change</button>
|
|
12
11
|
</layout>
|
|
13
12
|
<layout gutter="10">
|
|
14
13
|
<layout ref="watch" align-v="center" align-h="center" style="flex: 1; background: #FFF;">{{watchInner ? 'inner' : 'Inner'}}</layout>
|
|
15
|
-
<button @click="
|
|
14
|
+
<button @click="wwatch" style="height: 30px; padding: 0 5px;">{{watchText ? '' : '!'}}watch</button>
|
|
16
15
|
<button @click="watchInner = !watchInner" style="padding: 0 5px;">Change</button>
|
|
17
16
|
</layout>
|
|
18
|
-
<button @click="watchStyleChange = !watchStyleChange" ref="watchStyle" style="height: 30px;" :style="{'font-size': watchStyleChange ? 'inherit' : '16px'}">watchStyle(this
|
|
19
|
-
<button @click="isWatchStyle" style="height: 30px;">isWatchStyle(this
|
|
17
|
+
<button @click="watchStyleChange = !watchStyleChange" ref="watchStyle" style="height: 30px;" :style="{'font-size': watchStyleChange ? 'inherit' : '16px'}">watchStyle(this.refs.watchStyle.$el, 'font-size', (n, v) => { ... })</button>
|
|
18
|
+
<button @click="isWatchStyle" style="height: 30px;">isWatchStyle(this.refs.watchStyle.$el)</button>
|
|
20
19
|
<block @mousedown="bindGesture" @touchstart="bindGesture" style="height: 50px; background: #FFF; display: flex; justify-content: center; align-items: center; color: rgba(0, 0, 0, .5); font-size: 14px;">{{bindGestureText ? bindGestureText : 'bindGesture(e: Touch | Mouse, { ... })'}}</block>
|
|
21
20
|
<block @wheel="bindGestureWheel" style="height: 50px; background: #FFF; display: flex; justify-content: center; align-items: center; color: rgba(0, 0, 0, .5); font-size: 14px;">{{bindGestureWheelText ? bindGestureWheelText : 'bindGesture(e: Wheel, { ... })'}}</block>
|
|
22
21
|
<button @click="bindLong" ref="bindLong" @mousedown="bindLongDown" @touchstart="bindLongDown" style="height: 30px;">{{bindLongText ? 'Yeah!' : 'bindLong(e, () => { ... })'}}</button>
|
|
@@ -51,5 +50,5 @@
|
|
|
51
50
|
<label>clickgo.form.is.shift: {{isShift ? 'true' : 'false'}}</label>
|
|
52
51
|
<label>clickgo.form.is.ctrl: {{isCtrl ? 'true' : 'false'}}</label>
|
|
53
52
|
</layout>
|
|
54
|
-
</
|
|
53
|
+
</flow>
|
|
55
54
|
</form>
|
|
@@ -15,8 +15,8 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.fid = '0';
|
|
17
17
|
this.tid = '0';
|
|
18
|
-
this.type = 'primary';
|
|
19
|
-
this.progress = 'noraml';
|
|
18
|
+
this.type = ['primary'];
|
|
19
|
+
this.progress = ['noraml'];
|
|
20
20
|
this.dr = '';
|
|
21
21
|
this.setTopMostValue = false;
|
|
22
22
|
}
|
|
@@ -45,11 +45,11 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
45
45
|
clickgo.form.changeFocus(parseInt(this.fid));
|
|
46
46
|
}
|
|
47
47
|
getList() {
|
|
48
|
-
let str = JSON.stringify(clickgo.form.getList(this.
|
|
48
|
+
let str = JSON.stringify(clickgo.form.getList(parseInt(this.tid)));
|
|
49
49
|
str = str.replace(/"icon":"(.*?)"/g, function (t, t1) {
|
|
50
50
|
return `"icon":"${t1 ? (t1.slice(0, 10) + '...') : t1}"`;
|
|
51
51
|
});
|
|
52
|
-
clickgo.form.dialog(`<
|
|
52
|
+
clickgo.form.dialog(`<flow direction="v" style="width: 200px; height: 80px;">${str}</flow>`).catch((e) => { throw e; });
|
|
53
53
|
}
|
|
54
54
|
getMaxZIndexID() {
|
|
55
55
|
const fid = clickgo.form.getMaxZIndexID();
|
|
@@ -86,7 +86,7 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
86
86
|
notify() {
|
|
87
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
88
|
let icon = null;
|
|
89
|
-
if (this.progress === 'progress + icon') {
|
|
89
|
+
if (this.progress[0] === 'progress + icon') {
|
|
90
90
|
icon = yield clickgo.fs.getContent('/package/res/icon.svg');
|
|
91
91
|
}
|
|
92
92
|
if (icon instanceof Blob) {
|
|
@@ -95,11 +95,11 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
95
95
|
const nid = clickgo.form.notify({
|
|
96
96
|
'title': 'Notify',
|
|
97
97
|
'content': 'Content',
|
|
98
|
-
'type': this.type,
|
|
99
|
-
'progress': (this.progress === 'progress + icon') ? true : false,
|
|
98
|
+
'type': this.type[0],
|
|
99
|
+
'progress': (this.progress[0] === 'progress + icon') ? true : false,
|
|
100
100
|
'icon': icon
|
|
101
101
|
});
|
|
102
|
-
if (this.progress === 'progress + icon') {
|
|
102
|
+
if (this.progress[0] === 'progress + icon') {
|
|
103
103
|
clickgo.form.notifyProgress(nid, 12);
|
|
104
104
|
yield clickgo.tool.sleep(1000);
|
|
105
105
|
clickgo.form.notifyProgress(nid, 30);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<form width="350" height="400" title="Library form">
|
|
2
|
-
<
|
|
2
|
+
<flow direction="v" style="flex: 1; padding: 10px;">
|
|
3
3
|
<layout gutter="10" direction="v" style="flex: 1;">
|
|
4
4
|
<label>This form id: {{formId}}</label>
|
|
5
5
|
<button @click="min" style="height: 30px;">min({{formId}})</button>
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
<button @click="notify" style="padding: 0 10px;">notify({ ... })</button>
|
|
31
31
|
</layout>
|
|
32
32
|
<button @click="showPop" style="height: 30px;">showPop(e.currentTarget, this.refs.pop)</button>
|
|
33
|
-
<teleport to="
|
|
34
|
-
<block ref="pop"
|
|
33
|
+
<teleport to="system">
|
|
34
|
+
<block ref="pop" style="border: solid 1px #000; background: #FFF; width: 200px; height: 100px; display: flex; justify-content: center; align-items: center;">refs.pop</block>
|
|
35
35
|
</teleport>
|
|
36
36
|
<label>Dialog result: {{dr}}.</label>
|
|
37
37
|
<button @click="dialog" style="height: 30px;">dialog('Hello world!')</button>
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
<button @click="flash" style="height: 30px;">flash({{formId}})</button>
|
|
45
45
|
<button @click="showLauncher" style="height: 30px;">showLauncher()</button>
|
|
46
46
|
</layout>
|
|
47
|
-
</
|
|
47
|
+
</flow>
|
|
48
48
|
</form>
|