clickgo 3.1.1-dev10 → 3.1.3-dev12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/demo/app.js +0 -72
- package/dist/app/demo/config.json +109 -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/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 +57 -0
- package/dist/app/demo/form/method/aform/aform.xml +35 -0
- package/dist/app/demo/form/method/aform/test.xml +6 -0
- package/dist/app/demo/form/method/core/core.js +11 -8
- package/dist/app/demo/form/method/core/core.xml +2 -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 +10 -28
- package/dist/app/demo/form/method/form/form.xml +8 -15
- 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 +59 -61
- package/dist/app/demo/form/method/task/task.xml +4 -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 +2 -2
- package/dist/app/task/form/bar/bar.xml +1 -1
- package/dist/clickgo.js +17 -5
- package/dist/clickgo.ts +22 -3
- 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 +28 -8
- package/dist/index.ts +33 -7
- package/dist/lib/control.js +75 -105
- package/dist/lib/control.ts +102 -124
- package/dist/lib/core.js +108 -252
- package/dist/lib/core.ts +122 -268
- package/dist/lib/dom.js +564 -483
- package/dist/lib/dom.ts +703 -546
- package/dist/lib/form.js +170 -153
- package/dist/lib/form.ts +132 -99
- package/dist/lib/fs.js +1 -1
- package/dist/lib/fs.ts +1 -1
- package/dist/lib/native.js +135 -8
- package/dist/lib/native.ts +176 -12
- package/dist/lib/task.js +301 -175
- package/dist/lib/task.ts +330 -207
- 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 +1 -1
- package/types/index.d.ts +26 -29
- 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
- package/dist/app/demo/form/method/form/test.xml +0 -5
package/dist/app/demo/app.js
CHANGED
|
@@ -14,78 +14,6 @@ const main_1 = require("./form/main");
|
|
|
14
14
|
class default_1 extends clickgo.core.AbstractApp {
|
|
15
15
|
main() {
|
|
16
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
17
|
this.run(yield main_1.default.create());
|
|
90
18
|
});
|
|
91
19
|
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Clickgo Demo",
|
|
3
|
+
"ver": 1,
|
|
4
|
+
"version": "0.1",
|
|
5
|
+
"author": "clickgo",
|
|
6
|
+
|
|
7
|
+
"controls": [
|
|
8
|
+
"/clickgo/control/common",
|
|
9
|
+
"/clickgo/control/form",
|
|
10
|
+
"/clickgo/control/monaco",
|
|
11
|
+
"/clickgo/control/property"
|
|
12
|
+
],
|
|
13
|
+
"style": "/package/global",
|
|
14
|
+
|
|
15
|
+
"files": [
|
|
16
|
+
"/form/control/block/block.css",
|
|
17
|
+
"/form/control/block/block.xml",
|
|
18
|
+
"/form/control/button/button.css",
|
|
19
|
+
"/form/control/button/button.js",
|
|
20
|
+
"/form/control/button/button.xml",
|
|
21
|
+
"/form/control/check/check.js",
|
|
22
|
+
"/form/control/check/check.xml",
|
|
23
|
+
"/form/control/dialog/dialog.js",
|
|
24
|
+
"/form/control/dialog/dialog.xml",
|
|
25
|
+
"/form/control/file/file.js",
|
|
26
|
+
"/form/control/file/file.xml",
|
|
27
|
+
"/form/control/flow/flow.css",
|
|
28
|
+
"/form/control/flow/flow.js",
|
|
29
|
+
"/form/control/flow/flow.xml",
|
|
30
|
+
"/form/control/form/form.css",
|
|
31
|
+
"/form/control/form/form.js",
|
|
32
|
+
"/form/control/form/form.xml",
|
|
33
|
+
"/form/control/img/img.xml",
|
|
34
|
+
"/form/control/label/label.xml",
|
|
35
|
+
"/form/control/list/list.css",
|
|
36
|
+
"/form/control/list/list.js",
|
|
37
|
+
"/form/control/list/list.xml",
|
|
38
|
+
"/form/control/loading/loading.xml",
|
|
39
|
+
"/form/control/marquee/marquee.js",
|
|
40
|
+
"/form/control/marquee/marquee.xml",
|
|
41
|
+
"/form/control/menu/menu.js",
|
|
42
|
+
"/form/control/menu/menu.xml",
|
|
43
|
+
"/form/control/monaco/monaco.js",
|
|
44
|
+
"/form/control/monaco/monaco.xml",
|
|
45
|
+
"/form/control/property/property.js",
|
|
46
|
+
"/form/control/property/property.xml",
|
|
47
|
+
"/form/control/radio/radio.js",
|
|
48
|
+
"/form/control/radio/radio.xml",
|
|
49
|
+
"/form/control/scroll/scroll.js",
|
|
50
|
+
"/form/control/scroll/scroll.xml",
|
|
51
|
+
"/form/control/select/select.js",
|
|
52
|
+
"/form/control/select/select.xml",
|
|
53
|
+
"/form/control/tab/tab.js",
|
|
54
|
+
"/form/control/tab/tab.xml",
|
|
55
|
+
"/form/control/text/text.js",
|
|
56
|
+
"/form/control/text/text.xml",
|
|
57
|
+
"/form/control/vflow/vflow.css",
|
|
58
|
+
"/form/control/vflow/vflow.js",
|
|
59
|
+
"/form/control/vflow/vflow.xml",
|
|
60
|
+
"/form/event/form/form.css",
|
|
61
|
+
"/form/event/form/form.js",
|
|
62
|
+
"/form/event/form/form.xml",
|
|
63
|
+
"/form/event/screen/screen.js",
|
|
64
|
+
"/form/event/screen/screen.xml",
|
|
65
|
+
"/form/event/task/task.js",
|
|
66
|
+
"/form/event/task/task.xml",
|
|
67
|
+
"/form/method/aform/aform.js",
|
|
68
|
+
"/form/method/aform/aform.xml",
|
|
69
|
+
"/form/method/aform/test.xml",
|
|
70
|
+
"/form/method/core/core.js",
|
|
71
|
+
"/form/method/core/core.xml",
|
|
72
|
+
"/form/method/dom/dom.css",
|
|
73
|
+
"/form/method/dom/dom.js",
|
|
74
|
+
"/form/method/dom/dom.xml",
|
|
75
|
+
"/form/method/form/form.css",
|
|
76
|
+
"/form/method/form/form.js",
|
|
77
|
+
"/form/method/form/form.xml",
|
|
78
|
+
"/form/method/fs/fs.js",
|
|
79
|
+
"/form/method/fs/fs.xml",
|
|
80
|
+
"/form/method/fs/text.js",
|
|
81
|
+
"/form/method/fs/text.xml",
|
|
82
|
+
"/form/method/native/native.js",
|
|
83
|
+
"/form/method/native/native.xml",
|
|
84
|
+
"/form/method/system/system.js",
|
|
85
|
+
"/form/method/system/system.xml",
|
|
86
|
+
"/form/method/task/locale1.json",
|
|
87
|
+
"/form/method/task/locale2.json",
|
|
88
|
+
"/form/method/task/task.js",
|
|
89
|
+
"/form/method/task/task.xml",
|
|
90
|
+
"/form/method/theme/theme.js",
|
|
91
|
+
"/form/method/theme/theme.xml",
|
|
92
|
+
"/form/method/tool/tool.js",
|
|
93
|
+
"/form/method/tool/tool.xml",
|
|
94
|
+
"/form/method/zip/zip.js",
|
|
95
|
+
"/form/method/zip/zip.xml",
|
|
96
|
+
"/form/main.css",
|
|
97
|
+
"/form/main.js",
|
|
98
|
+
"/form/main.xml",
|
|
99
|
+
"/res/icon.svg",
|
|
100
|
+
"/res/img.jpg",
|
|
101
|
+
"/res/r-1.svg",
|
|
102
|
+
"/res/r-2.svg",
|
|
103
|
+
"/res/sql.svg",
|
|
104
|
+
"/res/txt.svg",
|
|
105
|
+
"/res/zip.svg",
|
|
106
|
+
"/app.js",
|
|
107
|
+
"/global.css"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
@@ -9,19 +9,20 @@ 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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
class default_1 extends clickgo.form.AbstractForm {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.btnChecked = false;
|
|
17
|
+
this.btnRadio = '0';
|
|
18
|
+
this.type = ['default'];
|
|
19
|
+
this.area = ['all'];
|
|
20
|
+
this.plain = ['not'];
|
|
21
|
+
}
|
|
22
|
+
dialog(text) {
|
|
23
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
24
|
yield clickgo.form.dialog(text);
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = default_1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<form width="450" height="300" title="Button">
|
|
2
|
-
<
|
|
2
|
+
<flow direction="v" style="flex: 1; width: 0;">
|
|
3
3
|
<layout direction="v" gutter="10" style="padding: 10px;">
|
|
4
4
|
<label>Type:</label>
|
|
5
5
|
<layout gutter="10" class="buttons">
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
</layout>
|
|
61
61
|
<label>Menu:</label>
|
|
62
62
|
<layout gutter="10" class="buttons">
|
|
63
|
-
<button :type="type" :area="area" :plain="plain === 'plain' ? 'plain' : undefined" @click="dialog('Click!')">
|
|
63
|
+
<button :type="type[0]" :area="area[0]" :plain="plain[0] === 'plain' ? 'plain' : undefined" @click="dialog('Click!')">
|
|
64
64
|
<template v-slot>Area all</template>
|
|
65
65
|
<template v-slot:pop>
|
|
66
66
|
<menulist>
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
</template>
|
|
71
71
|
</button>
|
|
72
72
|
<select v-model="type" :data="['default', 'primary', 'info', 'warning', 'danger', 'tool']"></select>
|
|
73
|
-
<select v-model="area" :data="['all', '
|
|
73
|
+
<select v-model="area" :data="['all', 'split', 'mark']"></select>
|
|
74
74
|
<select v-model="plain" :data="['plain', 'not']"></select>
|
|
75
75
|
</layout>
|
|
76
76
|
<label>Tool buttons:</label>
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
</menulist>
|
|
100
100
|
</template>
|
|
101
101
|
</button>
|
|
102
|
-
<button type="tool" area="
|
|
102
|
+
<button type="tool" area="split" style="width: initial;">
|
|
103
103
|
<img src="../../../res/icon.svg" style="margin: 0 5px;" />
|
|
104
104
|
<template v-slot:pop>
|
|
105
105
|
<menulist>
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
<label>Other:</label>
|
|
113
113
|
<layout gutter="10" align-v="center">
|
|
114
114
|
<button style="padding: 30px;">Padding 30px</button>
|
|
115
|
-
<button style="padding: 15px 30px;" area="
|
|
115
|
+
<button style="padding: 15px 30px;" area="split">
|
|
116
116
|
Padding 10px 20px with pop
|
|
117
117
|
<template v-slot:pop>
|
|
118
118
|
<menulist>
|
|
@@ -122,5 +122,5 @@
|
|
|
122
122
|
</button>
|
|
123
123
|
</layout>
|
|
124
124
|
</layout>
|
|
125
|
-
</
|
|
125
|
+
</flow>
|
|
126
126
|
</form>
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
const clickgo = require("clickgo");
|
|
4
|
+
class default_1 extends clickgo.form.AbstractForm {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.checked1 = false;
|
|
8
|
+
this.checked2 = false;
|
|
9
|
+
this.checked3 = false;
|
|
10
|
+
this.indeterminate1 = false;
|
|
11
|
+
this.indeterminate2 = false;
|
|
12
|
+
this.indeterminate3 = false;
|
|
13
|
+
this.disabled = false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.default = default_1;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
const clickgo = require("clickgo");
|
|
4
|
+
class default_1 extends clickgo.form.AbstractForm {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.accept = 'txt';
|
|
8
|
+
this.multi = 'false';
|
|
9
|
+
this.dir = 'false';
|
|
10
|
+
this.list = [];
|
|
11
|
+
}
|
|
12
|
+
select() {
|
|
13
|
+
this.refs.file.select();
|
|
14
|
+
}
|
|
15
|
+
change(files) {
|
|
15
16
|
this.list = [];
|
|
16
17
|
if (!files) {
|
|
17
18
|
return;
|
|
@@ -20,4 +21,5 @@ exports.methods = {
|
|
|
20
21
|
this.list.push((file.webkitRelativePath || file.name) + ' (' + file.size.toString() + ')');
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = default_1;
|
|
File without changes
|
|
@@ -0,0 +1,64 @@
|
|
|
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 default_1 extends clickgo.form.AbstractForm {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.ntab = '';
|
|
17
|
+
this.lineValue = [10];
|
|
18
|
+
this.lineCount = 2;
|
|
19
|
+
this.sLeft1 = 0;
|
|
20
|
+
this.sTop1 = 0;
|
|
21
|
+
this.sWidth1 = 0;
|
|
22
|
+
this.sHeight1 = 0;
|
|
23
|
+
this.cWidth1 = 0;
|
|
24
|
+
this.cHeight1 = 0;
|
|
25
|
+
this.sLeft2 = 0;
|
|
26
|
+
this.sTop2 = 0;
|
|
27
|
+
this.sWidth2 = 0;
|
|
28
|
+
this.sHeight2 = 0;
|
|
29
|
+
this.cWidth2 = 0;
|
|
30
|
+
this.cHeight2 = 0;
|
|
31
|
+
this.sLeft3 = 0;
|
|
32
|
+
this.sTop3 = 0;
|
|
33
|
+
this.sWidth3 = 0;
|
|
34
|
+
this.sHeight3 = 0;
|
|
35
|
+
this.cWidth3 = 0;
|
|
36
|
+
this.cHeight3 = 0;
|
|
37
|
+
this.sLeft4 = 0;
|
|
38
|
+
this.sTop4 = 0;
|
|
39
|
+
this.sWidth4 = 0;
|
|
40
|
+
this.sHeight4 = 0;
|
|
41
|
+
this.cWidth4 = 0;
|
|
42
|
+
this.cHeight4 = 0;
|
|
43
|
+
this.direction = false;
|
|
44
|
+
this.dir5 = 'v';
|
|
45
|
+
this.sLeft5 = 0;
|
|
46
|
+
this.sTop5 = 0;
|
|
47
|
+
this.sWidth5 = 0;
|
|
48
|
+
this.sHeight5 = 0;
|
|
49
|
+
this.cWidth5 = 0;
|
|
50
|
+
this.cHeight5 = 0;
|
|
51
|
+
this.line5 = 10;
|
|
52
|
+
this.gesture = false;
|
|
53
|
+
this.style = false;
|
|
54
|
+
this.selection = false;
|
|
55
|
+
this.sub = false;
|
|
56
|
+
this.area = {};
|
|
57
|
+
}
|
|
58
|
+
onGesture(dir) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
yield clickgo.form.dialog('onGesture: ' + dir);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.default = default_1;
|
|
File without changes
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<form title="Flow" width="450" height="450" min-width="300" min-height="400" padding="10">
|
|
2
|
+
<tab v-model="ntab" :tabs="['normal', 'adaptation', 'beyond', 'nest']" style="flex: 1; width: 0;">
|
|
3
|
+
<!-- 默认 -->
|
|
4
|
+
<layout v-if="ntab === 'normal'" gutter="10" direction="v" style="flex: 1; width: 0; padding: 10px;">
|
|
5
|
+
<!-- v -->
|
|
6
|
+
<layout gutter="10" style="flex: 1; height: 0;">
|
|
7
|
+
<flow v-model:scroll-left="sLeft1" v-model:scroll-top="sTop1" direction="v" :selection="selection" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" @select="area = $event" @clientwidth="cWidth1 = $event" @clientheight="cHeight1 = $event" @scrollwidth="sWidth1 = $event" @scrollheight="sHeight1 = $event" :style="{'line-height': style ? '1.5' : undefined}" class="border" style="flex: 1;">
|
|
8
|
+
<block :style="{'padding': style ? '10px' : undefined}">
|
|
9
|
+
<block v-for="(line, index) of lineCount">
|
|
10
|
+
<button v-if="index > 0 && index % 10 === 0" style="height: 30px;">test</button>
|
|
11
|
+
<block v-else :style="{'height': sub && (index === 1) ? '50px' : undefined}">Line {{line}}, index: {{index}}.</block>
|
|
12
|
+
</block>
|
|
13
|
+
</block>
|
|
14
|
+
</flow>
|
|
15
|
+
<layout class="border" style="flex: 1;">
|
|
16
|
+
<flow v-model:scroll-left="sLeft2" v-model:scroll-top="sTop2" direction="v" :selection="selection" :gesture="gesture ? ['top', 'bottom'] : []" @gesture="onGesture" @select="area = $event" @clientwidth="cWidth2 = $event" @clientheight="cHeight2 = $event" @scrollwidth="sWidth2 = $event" @scrollheight="sHeight2 = $event" :style="{'line-height': style ? '1.5' : undefined}" style="flex: 1;">
|
|
17
|
+
<block :style="{'padding': style ? '10px' : undefined}">
|
|
18
|
+
<block v-for="(line, index) of lineCount">
|
|
19
|
+
<block v-if="index > 0 && index % 10 === 0" class="custom">Custom</block>
|
|
20
|
+
<block v-else :style="{'height': sub && (index === 1) ? '50px' : undefined}">Line {{line}}, index: {{index}}.</block>
|
|
21
|
+
</block>
|
|
22
|
+
</block>
|
|
23
|
+
</flow>
|
|
24
|
+
<scroll :length="sHeight2" :client="cHeight2" v-model:offset="sTop2" style="width: 20px;"></scroll>
|
|
25
|
+
</layout>
|
|
26
|
+
</layout>
|
|
27
|
+
<label>Scroll Left / Top: {{sLeft1}} / {{sTop1}}, Client Width / Height: {{cWidth1}} / {{cHeight1}}, Scroll Width / Height: {{sWidth1}} / {{sHeight1}}.</label>
|
|
28
|
+
<label>Scroll Left / Top: {{sLeft2}} / {{sTop2}}, Client Width / Height: {{cWidth2}} / {{cHeight2}}, Scroll Width / Height: {{sWidth2}} / {{sHeight2}}.</label>
|
|
29
|
+
<!-- h -->
|
|
30
|
+
<flow v-model:scroll-left="sLeft3" v-model:scroll-top="sTop3" :selection="selection" :gesture="gesture ? ['left', 'right'] : []" @gesture="onGesture" @select="area = $event" @clientwidth="cWidth3 = $event" @clientheight="cHeight3 = $event" @scrollwidth="sWidth3 = $event" @scrollheight="sHeight3 = $event" :style="{'line-height': style ? '1.5' : undefined}" class="border" style="flex: 1; height: 0;">
|
|
31
|
+
<layout :style="{'padding': style ? '10px' : undefined}" style="flex: 1;">
|
|
32
|
+
<layout v-for="(line, index) of lineCount" align-v="center" align-h="center" direction="v" class="rightborder" style="width: 80px;">
|
|
33
|
+
<label>Col {{line}}.</label>
|
|
34
|
+
<label>index: {{index}}.</label>
|
|
35
|
+
</layout>
|
|
36
|
+
</layout>
|
|
37
|
+
</flow>
|
|
38
|
+
<label>Scroll Left / Top: {{sLeft3}} / {{sTop3}}, Client Width / Height: {{cWidth3}} / {{cHeight3}}, Scroll Width / Height: {{sWidth3}} / {{sHeight3}}.</label>
|
|
39
|
+
<label>Selection area: {{area}}</label>
|
|
40
|
+
<!-- button list -->
|
|
41
|
+
<layout gutter="10">
|
|
42
|
+
<select v-model="lineValue" :data="[10, 50, 500, 5000]" style="flex: 1; width: 0;"></select>
|
|
43
|
+
<button @click="lineCount += lineValue[0]" style="height: 30px;padding: 0 10px;">Add lines</button>
|
|
44
|
+
<button @click="lineCount -= lineValue[0];if(lineCount < 0) {lineCount = 0;}" style="height: 30px; padding: 0 10px;">Remove lines</button>
|
|
45
|
+
</layout>
|
|
46
|
+
<layout gutter="10">
|
|
47
|
+
<button @click="gesture = !gesture" style="flex: 1; width: 0; height: 30px;">{{gesture ? '' : '!'}}gesture</button>
|
|
48
|
+
<button @click="selection = !selection" style="flex: 1; width: 0; height: 30px;">{{selection ? '' : '!'}}selection</button>
|
|
49
|
+
<button @click="style = !style" style="flex: 1; width: 0; height: 30px;">{{style ? '' : '!'}}style</button>
|
|
50
|
+
<button @click="sub = !sub" style="flex: 1; width: 0; height: 30px;">{{sub ? '' : '!'}}sub</button>
|
|
51
|
+
</layout>
|
|
52
|
+
</layout>
|
|
53
|
+
<!-- 自适应 -->
|
|
54
|
+
<layout v-else-if="ntab === 'adaptation'" gutter="10" direction="v" style="flex: 1; width: 0; padding: 10px;">
|
|
55
|
+
<layout :direction="direction ? 'h' : 'v'" style="flex: 1; height: 0;">
|
|
56
|
+
<flow class="border" v-model:scroll-left="sLeft4" v-model:scroll-top="sTop4" :selection="selection" :gesture="gesture ? (direction ? ['left', 'right'] : ['top', 'bottom']) : []" @gesture="onGesture" :direction="direction ? 'h' : 'v'" @clientwidth="cWidth4 = $event" @clientheight="cHeight4 = $event" @scrollwidth="sWidth4 = $event" @scrollheight="sHeight4 = $event">
|
|
57
|
+
<layout v-for="(line, index) of lineCount" align-v="center" direction="v" :class="[direction && 'rightborder']">
|
|
58
|
+
<button v-if="index > 0 && index % 10 === 0" style="height: 30px;" :style="{'width': direction ? '30px' : undefined}">test</button>
|
|
59
|
+
<block v-else :style="{'width': direction ? '80px' : undefined, 'text-align': direction ? 'center' : undefined}">Line {{line}}</block>
|
|
60
|
+
</layout>
|
|
61
|
+
</flow>
|
|
62
|
+
</layout>
|
|
63
|
+
<label>Scroll Left / Top: {{sLeft4}} / {{sTop4}}, Client Width / Height: {{cWidth4}} / {{cHeight4}}, Scroll Width / Height: {{sWidth4}} / {{sHeight4}}.</label>
|
|
64
|
+
<layout gutter="10">
|
|
65
|
+
<button @click="lineCount += 10" style="flex: 1; height: 30px;">Add 10 lines</button>
|
|
66
|
+
<button @click="lineCount -= 10;if(lineCount < 0) {lineCount = 0;}" style="flex: 1; height: 30px;">Remove 10 lines</button>
|
|
67
|
+
<button @click="direction = !direction" style="flex: 1; height: 30px;">Direction</button>
|
|
68
|
+
</layout>
|
|
69
|
+
</layout>
|
|
70
|
+
<!-- 内容超出 -->
|
|
71
|
+
<layout v-else-if="ntab === 'beyond'" gutter="10" direction="v" style="flex: 1; width: 0; padding: 10px;">
|
|
72
|
+
<layout gutter="10" align-v="center">
|
|
73
|
+
<button @click="dir5 = (dir5 === 'h' ? 'v' : 'h')" style="flex: 1; height: 30px;">Change direction</button>
|
|
74
|
+
<button @click="line5 = (line5 === 10 ? 1 : 10)" style="flex: 1; height: 30px;">Change data</button>
|
|
75
|
+
<label>Direction: {{dir5}}</label>
|
|
76
|
+
</layout>
|
|
77
|
+
<flow v-model:scroll-left="sLeft5" v-model:scroll-top="sTop5" :selection="selection" :gesture="gesture ? ['left', 'right', 'top', 'bottom'] : []" @gesture="onGesture" :direction="dir5" @clientwidth="cWidth5 = $event" @clientheight="cHeight5 = $event" @scrollwidth="sWidth5 = $event" @scrollheight="sHeight5 = $event" class="border" style="flex: 1; height: 0; padding: 10px 0 0 10px;">
|
|
78
|
+
<layout v-for="i of line5" :direction="dir5 === 'h' ? 'v' : 'h'">
|
|
79
|
+
<layout v-for="j of 10" class="block">
|
|
80
|
+
<block>{{i}}-{{j}}</block>
|
|
81
|
+
</layout>
|
|
82
|
+
</layout>
|
|
83
|
+
</flow>
|
|
84
|
+
<label>Scroll Left / Top: {{sLeft5}} / {{sTop5}}, Client Width / Height: {{cWidth5}} / {{cHeight5}}, Scroll Width / Height: {{sWidth5}} / {{sHeight5}}.</label>
|
|
85
|
+
</layout>
|
|
86
|
+
<!-- 嵌套 -->
|
|
87
|
+
<layout v-else style="flex: 1; width: 0; padding: 10px;">
|
|
88
|
+
<flow class="border" direction="v" style="flex: 1; width: 0;">
|
|
89
|
+
<template v-for="i of 100">
|
|
90
|
+
<flow v-if="i === 30" class="border" direction="v" style="height: 50px;">
|
|
91
|
+
<label v-for="k of 50">Line {{k}}</label>
|
|
92
|
+
</flow>
|
|
93
|
+
<flow v-else-if="i === 40" class="border" style="height: 50px;">
|
|
94
|
+
<label v-for="k of 50" class="rightborder" style="width: 80px;">Line {{k}}</label>
|
|
95
|
+
</flow>
|
|
96
|
+
<label v-else>Line {{i}}</label>
|
|
97
|
+
</template>
|
|
98
|
+
</flow>
|
|
99
|
+
</layout>
|
|
100
|
+
</tab>
|
|
101
|
+
</form>
|
|
@@ -1,12 +1,12 @@
|
|
|
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
|
+
<flow direction="v">
|
|
3
3
|
<layout direction="v" gutter="10" style="padding: 10px;">
|
|
4
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>
|
|
8
8
|
<button @click="max = max ? false : true">{{max ? 'Hide' : 'Show'}} max button</button>
|
|
9
|
-
<button @click="
|
|
9
|
+
<button @click="cclose = cclose ? false : true">{{cclose ? 'Hide' : 'Show'}} close button</button>
|
|
10
10
|
<button @click="stateMax = true">To max</button>
|
|
11
11
|
<button @click="stateMin = true">To min</button>
|
|
12
12
|
<button @click="minWidth = (minWidth === 200) ? 300 : 200">Set min-width to {{minWidth === 200 ? '300' : '200'}}</button>
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
<button @click="border = 'none'">None</button>
|
|
25
25
|
</layout>
|
|
26
26
|
</layout>
|
|
27
|
-
</
|
|
27
|
+
</flow>
|
|
28
28
|
</form>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<form width="300" height="500" title="Img">
|
|
2
|
-
<
|
|
2
|
+
<flow direction="v" style="flex: 1; width: 0;">
|
|
3
3
|
<layout direction="v" gutter="10" style="padding: 10px;">
|
|
4
4
|
<label>Load "../../../res/img.jpg":</label>
|
|
5
5
|
<img src="../../../res/img.jpg" style="width: 200px; height: 200px;" />
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
<label>You can also use http://, https:// and data: url, load "https://nodejs.org/static/images/logo.svg":</label>
|
|
13
13
|
<img src="https://nodejs.org/static/images/logo.svg" style="background-color: #333; width: 122px; height: 75px;" />
|
|
14
14
|
</layout>
|
|
15
|
-
</
|
|
15
|
+
</flow>
|
|
16
16
|
</form>
|