clickgo 3.16.28 → 4.0.1
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 +19 -8
- package/dist/app/{demo/res/video.mp4 → demo.cga} +0 -0
- package/dist/app/task.cga +0 -0
- package/dist/clickgo.d.ts +119 -13
- package/dist/control/arteditor.cgc +0 -0
- package/dist/control/box.cgc +0 -0
- package/dist/control/captcha.cgc +0 -0
- package/dist/control/common.cgc +0 -0
- package/dist/control/desc.cgc +0 -0
- package/dist/control/drawer.cgc +0 -0
- package/dist/control/echarts.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/iconview.cgc +0 -0
- package/dist/control/jodit.cgc +0 -0
- package/dist/control/map.cgc +0 -0
- package/dist/control/monaco.cgc +0 -0
- package/dist/control/mpegts.cgc +0 -0
- package/dist/control/nav.cgc +0 -0
- package/dist/control/novnc.cgc +0 -0
- package/dist/control/page.cgc +0 -0
- package/dist/control/pdf.cgc +0 -0
- package/dist/control/property.cgc +0 -0
- package/dist/control/qrcode.cgc +0 -0
- package/dist/control/table.cgc +0 -0
- package/dist/control/task.cgc +0 -0
- package/dist/control/tplink.cgc +0 -0
- package/dist/control/tuieditor.cgc +0 -0
- package/dist/control/tuiviewer.cgc +0 -0
- package/dist/control/tums.cgc +0 -0
- package/dist/control/xterm.cgc +0 -0
- package/dist/ext/tums-player/audio.wasm +0 -0
- package/dist/ext/tums-player/decoder.worker.js +129 -0
- package/dist/ext/tums-player/libaudio.js +1 -0
- package/dist/ext/tums-player/libaudio.wasm +0 -0
- package/dist/ext/tums-player/libffmpeg.js +1 -0
- package/dist/ext/tums-player/libffmpeg.wasm +0 -0
- package/dist/ext/tums-player/libs.worker.js +92 -0
- package/dist/ext/tums-player/tums-player.umd.min.js +35 -0
- package/dist/ext/tums-player/webgl.js +2 -0
- package/dist/ext/tums-player/webgl.worker.js +42 -0
- package/dist/global.css +1 -1
- package/dist/index.js +1 -175
- package/dist/theme/dark.cgt +0 -0
- package/dist/theme/light.cgt +0 -0
- package/package.json +16 -10
- package/dist/app/demo/app.js +0 -48
- package/dist/app/demo/config.json +0 -252
- package/dist/app/demo/form/control/alayout2/alayout2.js +0 -43
- package/dist/app/demo/form/control/alayout2/alayout2.xml +0 -16
- package/dist/app/demo/form/control/alert/alert.js +0 -43
- package/dist/app/demo/form/control/alert/alert.xml +0 -32
- package/dist/app/demo/form/control/arteditor/arteditor.js +0 -64
- package/dist/app/demo/form/control/arteditor/arteditor.xml +0 -12
- package/dist/app/demo/form/control/arteditor/img.js +0 -61
- package/dist/app/demo/form/control/arteditor/img.xml +0 -6
- package/dist/app/demo/form/control/block/block.css +0 -1
- package/dist/app/demo/form/control/block/block.scss +0 -17
- package/dist/app/demo/form/control/block/block.xml +0 -7
- package/dist/app/demo/form/control/box/box.js +0 -87
- package/dist/app/demo/form/control/box/box.xml +0 -23
- package/dist/app/demo/form/control/button/button.css +0 -1
- package/dist/app/demo/form/control/button/button.js +0 -51
- package/dist/app/demo/form/control/button/button.scss +0 -18
- package/dist/app/demo/form/control/button/button.xml +0 -133
- package/dist/app/demo/form/control/calendar/calendar.js +0 -62
- package/dist/app/demo/form/control/calendar/calendar.xml +0 -34
- package/dist/app/demo/form/control/captcha/captcha.js +0 -60
- package/dist/app/demo/form/control/captcha/captcha.xml +0 -10
- package/dist/app/demo/form/control/check/check.js +0 -54
- package/dist/app/demo/form/control/check/check.xml +0 -17
- package/dist/app/demo/form/control/circle/circle.xml +0 -36
- package/dist/app/demo/form/control/content/content.js +0 -47
- package/dist/app/demo/form/control/content/content.xml +0 -16
- package/dist/app/demo/form/control/date/date.js +0 -56
- package/dist/app/demo/form/control/date/date.xml +0 -28
- package/dist/app/demo/form/control/datepanel/datepanel.js +0 -63
- package/dist/app/demo/form/control/datepanel/datepanel.xml +0 -32
- package/dist/app/demo/form/control/daterange/daterange.js +0 -54
- package/dist/app/demo/form/control/daterange/daterange.xml +0 -22
- package/dist/app/demo/form/control/delete/delete.js +0 -47
- package/dist/app/demo/form/control/delete/delete.xml +0 -20
- package/dist/app/demo/form/control/desc/desc.js +0 -82
- package/dist/app/demo/form/control/desc/desc.xml +0 -44
- package/dist/app/demo/form/control/dialog/dialog.js +0 -49
- package/dist/app/demo/form/control/dialog/dialog.xml +0 -46
- package/dist/app/demo/form/control/drawer/drawer.js +0 -45
- package/dist/app/demo/form/control/drawer/drawer.xml +0 -34
- package/dist/app/demo/form/control/echarts/echarts.js +0 -137
- package/dist/app/demo/form/control/echarts/echarts.xml +0 -12
- package/dist/app/demo/form/control/empty/empty.js +0 -44
- package/dist/app/demo/form/control/empty/empty.xml +0 -9
- package/dist/app/demo/form/control/file/file.js +0 -60
- package/dist/app/demo/form/control/file/file.xml +0 -25
- package/dist/app/demo/form/control/flow/flow.css +0 -1
- package/dist/app/demo/form/control/flow/flow.js +0 -86
- package/dist/app/demo/form/control/flow/flow.scss +0 -18
- package/dist/app/demo/form/control/flow/flow.xml +0 -101
- package/dist/app/demo/form/control/form/form.css +0 -1
- package/dist/app/demo/form/control/form/form.js +0 -66
- package/dist/app/demo/form/control/form/form.scss +0 -5
- package/dist/app/demo/form/control/form/form.xml +0 -29
- package/dist/app/demo/form/control/grid/grid.js +0 -45
- package/dist/app/demo/form/control/grid/grid.xml +0 -27
- package/dist/app/demo/form/control/group/group.js +0 -50
- package/dist/app/demo/form/control/group/group.xml +0 -46
- package/dist/app/demo/form/control/hske/hske.js +0 -44
- package/dist/app/demo/form/control/hske/hske.xml +0 -19
- package/dist/app/demo/form/control/html/html.js +0 -70
- package/dist/app/demo/form/control/html/html.xml +0 -18
- package/dist/app/demo/form/control/icon/icon.xml +0 -49
- package/dist/app/demo/form/control/iconview/iconview.js +0 -174
- package/dist/app/demo/form/control/iconview/iconview.xml +0 -45
- package/dist/app/demo/form/control/img/img.xml +0 -26
- package/dist/app/demo/form/control/imgviewer/imgviewer.js +0 -46
- package/dist/app/demo/form/control/imgviewer/imgviewer.xml +0 -9
- package/dist/app/demo/form/control/jodit/jodit.js +0 -64
- package/dist/app/demo/form/control/jodit/jodit.xml +0 -24
- package/dist/app/demo/form/control/label/label.js +0 -51
- package/dist/app/demo/form/control/label/label.xml +0 -34
- package/dist/app/demo/form/control/layout/layout.js +0 -45
- package/dist/app/demo/form/control/layout/layout.xml +0 -18
- package/dist/app/demo/form/control/link/link.js +0 -42
- package/dist/app/demo/form/control/link/link.xml +0 -30
- package/dist/app/demo/form/control/list/list.css +0 -1
- package/dist/app/demo/form/control/list/list.js +0 -375
- package/dist/app/demo/form/control/list/list.scss +0 -7
- package/dist/app/demo/form/control/list/list.xml +0 -150
- package/dist/app/demo/form/control/loading/loading.xml +0 -8
- package/dist/app/demo/form/control/map/map.js +0 -206
- package/dist/app/demo/form/control/map/map.xml +0 -44
- package/dist/app/demo/form/control/marquee/marquee.js +0 -64
- package/dist/app/demo/form/control/marquee/marquee.xml +0 -33
- package/dist/app/demo/form/control/menu/menu.js +0 -56
- package/dist/app/demo/form/control/menu/menu.xml +0 -125
- package/dist/app/demo/form/control/monaco/monaco.js +0 -136
- package/dist/app/demo/form/control/monaco/monaco.xml +0 -28
- package/dist/app/demo/form/control/mpegts/mpegts.js +0 -70
- package/dist/app/demo/form/control/mpegts/mpegts.xml +0 -11
- package/dist/app/demo/form/control/nav/nav.js +0 -60
- package/dist/app/demo/form/control/nav/nav.xml +0 -106
- package/dist/app/demo/form/control/novnc/novnc.js +0 -75
- package/dist/app/demo/form/control/novnc/novnc.xml +0 -13
- package/dist/app/demo/form/control/page/page.js +0 -51
- package/dist/app/demo/form/control/page/page.xml +0 -22
- package/dist/app/demo/form/control/palette/palette.js +0 -46
- package/dist/app/demo/form/control/palette/palette.xml +0 -16
- package/dist/app/demo/form/control/panel/panel.js +0 -106
- package/dist/app/demo/form/control/panel/panel.xml +0 -16
- package/dist/app/demo/form/control/panel/test1.js +0 -84
- package/dist/app/demo/form/control/panel/test1.xml +0 -22
- package/dist/app/demo/form/control/panel/test2.xml +0 -4
- package/dist/app/demo/form/control/pdf/pdf.js +0 -65
- package/dist/app/demo/form/control/pdf/pdf.xml +0 -12
- package/dist/app/demo/form/control/pdf/test.pdf +0 -0
- package/dist/app/demo/form/control/progress/progress.js +0 -54
- package/dist/app/demo/form/control/progress/progress.xml +0 -9
- package/dist/app/demo/form/control/property/property.js +0 -166
- package/dist/app/demo/form/control/property/property.xml +0 -6
- package/dist/app/demo/form/control/qrcode/qrcode.js +0 -45
- package/dist/app/demo/form/control/qrcode/qrcode.xml +0 -13
- package/dist/app/demo/form/control/radio/radio.js +0 -51
- package/dist/app/demo/form/control/radio/radio.xml +0 -15
- package/dist/app/demo/form/control/scroll/scroll.js +0 -52
- package/dist/app/demo/form/control/scroll/scroll.xml +0 -38
- package/dist/app/demo/form/control/select/select.js +0 -273
- package/dist/app/demo/form/control/select/select.xml +0 -141
- package/dist/app/demo/form/control/setting/setting.xml +0 -11
- package/dist/app/demo/form/control/sgroup/sgroup.xml +0 -28
- package/dist/app/demo/form/control/step/step.js +0 -61
- package/dist/app/demo/form/control/step/step.xml +0 -16
- package/dist/app/demo/form/control/svg/svg.js +0 -61
- package/dist/app/demo/form/control/svg/svg.xml +0 -24
- package/dist/app/demo/form/control/switch/switch.js +0 -53
- package/dist/app/demo/form/control/switch/switch.xml +0 -29
- package/dist/app/demo/form/control/tab/tab.js +0 -102
- package/dist/app/demo/form/control/tab/tab.xml +0 -22
- package/dist/app/demo/form/control/table/table.js +0 -218
- package/dist/app/demo/form/control/table/table.xml +0 -97
- package/dist/app/demo/form/control/tag/tag.js +0 -44
- package/dist/app/demo/form/control/tag/tag.xml +0 -52
- package/dist/app/demo/form/control/text/text.js +0 -116
- package/dist/app/demo/form/control/text/text.xml +0 -70
- package/dist/app/demo/form/control/timeline/timeline.js +0 -43
- package/dist/app/demo/form/control/timeline/timeline.xml +0 -19
- package/dist/app/demo/form/control/tip/tip.js +0 -43
- package/dist/app/demo/form/control/tip/tip.xml +0 -42
- package/dist/app/demo/form/control/tplink/tplink.js +0 -74
- package/dist/app/demo/form/control/tplink/tplink.xml +0 -13
- package/dist/app/demo/form/control/tuieditor/tuieditor.js +0 -62
- package/dist/app/demo/form/control/tuieditor/tuieditor.xml +0 -22
- package/dist/app/demo/form/control/tuiviewer/tuiviewer.js +0 -45
- package/dist/app/demo/form/control/tuiviewer/tuiviewer.xml +0 -14
- package/dist/app/demo/form/control/uploader/uploader.js +0 -80
- package/dist/app/demo/form/control/uploader/uploader.xml +0 -15
- package/dist/app/demo/form/control/vflow/vflow.css +0 -1
- package/dist/app/demo/form/control/vflow/vflow.js +0 -101
- package/dist/app/demo/form/control/vflow/vflow.scss +0 -22
- package/dist/app/demo/form/control/vflow/vflow.xml +0 -89
- package/dist/app/demo/form/control/video/video.js +0 -47
- package/dist/app/demo/form/control/video/video.xml +0 -14
- package/dist/app/demo/form/control/web/web.js +0 -43
- package/dist/app/demo/form/control/web/web.xml +0 -4
- package/dist/app/demo/form/control/xterm/xterm.js +0 -100
- package/dist/app/demo/form/control/xterm/xterm.xml +0 -6
- package/dist/app/demo/form/event/form/form.css +0 -1
- package/dist/app/demo/form/event/form/form.js +0 -169
- package/dist/app/demo/form/event/form/form.scss +0 -24
- package/dist/app/demo/form/event/form/form.xml +0 -16
- package/dist/app/demo/form/event/other/other.js +0 -78
- package/dist/app/demo/form/event/other/other.xml +0 -5
- package/dist/app/demo/form/event/screen/screen.js +0 -86
- package/dist/app/demo/form/event/screen/screen.xml +0 -9
- package/dist/app/demo/form/event/task/task.js +0 -96
- package/dist/app/demo/form/event/task/task.xml +0 -20
- package/dist/app/demo/form/main.css +0 -1
- package/dist/app/demo/form/main.js +0 -515
- package/dist/app/demo/form/main.scss +0 -9
- package/dist/app/demo/form/main.xml +0 -163
- package/dist/app/demo/form/method/acontrol/acontrol.js +0 -42
- package/dist/app/demo/form/method/acontrol/acontrol.xml +0 -5
- package/dist/app/demo/form/method/aform/aform.js +0 -104
- package/dist/app/demo/form/method/aform/aform.xml +0 -60
- package/dist/app/demo/form/method/aform/sd.js +0 -47
- package/dist/app/demo/form/method/aform/sd.xml +0 -7
- package/dist/app/demo/form/method/core/core.js +0 -86
- package/dist/app/demo/form/method/core/core.xml +0 -23
- package/dist/app/demo/form/method/dom/dom.css +0 -1
- package/dist/app/demo/form/method/dom/dom.js +0 -228
- package/dist/app/demo/form/method/dom/dom.scss +0 -10
- package/dist/app/demo/form/method/dom/dom.xml +0 -76
- package/dist/app/demo/form/method/form/form.js +0 -244
- package/dist/app/demo/form/method/form/form.xml +0 -74
- package/dist/app/demo/form/method/form/test.xml +0 -5
- package/dist/app/demo/form/method/fs/fs.js +0 -209
- package/dist/app/demo/form/method/fs/fs.xml +0 -18
- package/dist/app/demo/form/method/fs/text.js +0 -48
- package/dist/app/demo/form/method/fs/text.xml +0 -3
- package/dist/app/demo/form/method/native/native.js +0 -100
- package/dist/app/demo/form/method/native/native.xml +0 -22
- package/dist/app/demo/form/method/storage/storage.js +0 -77
- package/dist/app/demo/form/method/storage/storage.xml +0 -18
- package/dist/app/demo/form/method/system/system.js +0 -63
- package/dist/app/demo/form/method/system/system.xml +0 -14
- package/dist/app/demo/form/method/task/locale1.json +0 -3
- package/dist/app/demo/form/method/task/locale2.json +0 -3
- package/dist/app/demo/form/method/task/task.js +0 -177
- package/dist/app/demo/form/method/task/task.xml +0 -61
- package/dist/app/demo/form/method/theme/theme.js +0 -92
- package/dist/app/demo/form/method/theme/theme.xml +0 -12
- package/dist/app/demo/form/method/tool/tool.js +0 -122
- package/dist/app/demo/form/method/tool/tool.xml +0 -40
- package/dist/app/demo/form/method/zip/zip.js +0 -126
- package/dist/app/demo/form/method/zip/zip.xml +0 -12
- package/dist/app/demo/form/solution/backpanel/backpanel.js +0 -76
- package/dist/app/demo/form/solution/backpanel/backpanel.xml +0 -31
- package/dist/app/demo/global.css +0 -3
- package/dist/app/demo/res/custombtn.cgc +0 -0
- package/dist/app/demo/res/icon.svg +0 -5
- package/dist/app/demo/res/img.jpg +0 -0
- package/dist/app/demo/res/marker.svg +0 -5
- package/dist/app/demo/res/r-1.svg +0 -32
- package/dist/app/demo/res/r-2.svg +0 -38
- package/dist/app/demo/res/sql.svg +0 -25
- package/dist/app/demo/res/txt.svg +0 -21
- package/dist/app/demo/res/zip.svg +0 -21
- package/dist/app/task/app.js +0 -46
- package/dist/app/task/config.json +0 -29
- package/dist/app/task/form/bar/bar.js +0 -406
- package/dist/app/task/form/bar/bar.xml +0 -46
- package/dist/app/task/form/desktop/desktop.xml +0 -1
- package/dist/app/task/locale/en.json +0 -11
- package/dist/app/task/locale/ja.json +0 -11
- package/dist/app/task/locale/sc.json +0 -11
- package/dist/app/task/locale/tc.json +0 -11
- package/dist/clickgo.js +0 -109
- package/dist/index.d.ts +0 -55
- package/dist/lib/control.d.ts +0 -53
- package/dist/lib/control.js +0 -584
- package/dist/lib/core.d.ts +0 -47
- package/dist/lib/core.js +0 -1005
- package/dist/lib/dom.d.ts +0 -75
- package/dist/lib/dom.js +0 -2147
- package/dist/lib/form.d.ts +0 -222
- package/dist/lib/form.js +0 -2961
- package/dist/lib/fs.d.ts +0 -35
- package/dist/lib/fs.js +0 -1183
- package/dist/lib/native.d.ts +0 -43
- package/dist/lib/native.js +0 -197
- package/dist/lib/storage.d.ts +0 -6
- package/dist/lib/storage.js +0 -215
- package/dist/lib/task.d.ts +0 -32
- package/dist/lib/task.js +0 -1831
- package/dist/lib/theme.d.ts +0 -8
- package/dist/lib/theme.js +0 -176
- package/dist/lib/tool.d.ts +0 -122
- package/dist/lib/tool.js +0 -1021
- package/dist/lib/zip.d.ts +0 -40
- package/dist/lib/zip.js +0 -382
- package/dist/theme/blue.cgt +0 -0
- package/dist/theme/byterun.cgt +0 -0
- package/types/index.d.ts +0 -1374
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const clickgo = __importStar(require("clickgo"));
|
|
37
|
-
class default_1 extends clickgo.form.AbstractForm {
|
|
38
|
-
constructor() {
|
|
39
|
-
super(...arguments);
|
|
40
|
-
this.watchSizeText = false;
|
|
41
|
-
this.watchSizeHeight = true;
|
|
42
|
-
this.watchText = false;
|
|
43
|
-
this.watchInner = true;
|
|
44
|
-
this.watchStyleChange = true;
|
|
45
|
-
this.bindGestureText = '';
|
|
46
|
-
this.bindGestureWheelText = '';
|
|
47
|
-
this.bindLongText = false;
|
|
48
|
-
this.moveLeft = 0;
|
|
49
|
-
this.moveTop = 0;
|
|
50
|
-
this.moveWidth = 25;
|
|
51
|
-
this.moveHeight = 25;
|
|
52
|
-
this.watchPositionText = false;
|
|
53
|
-
this.getWatchInfoDisabled = false;
|
|
54
|
-
this.getWatchInfoText = '{}';
|
|
55
|
-
this.scaleX = 0;
|
|
56
|
-
this.scaleY = 0;
|
|
57
|
-
this.scaleS = 1;
|
|
58
|
-
}
|
|
59
|
-
get isMove() {
|
|
60
|
-
return clickgo.dom.is.move;
|
|
61
|
-
}
|
|
62
|
-
get isShift() {
|
|
63
|
-
return clickgo.dom.is.shift;
|
|
64
|
-
}
|
|
65
|
-
get isCtrl() {
|
|
66
|
-
return clickgo.dom.is.ctrl;
|
|
67
|
-
}
|
|
68
|
-
get isMeta() {
|
|
69
|
-
return clickgo.dom.is.meta;
|
|
70
|
-
}
|
|
71
|
-
get isFull() {
|
|
72
|
-
return clickgo.dom.is.full;
|
|
73
|
-
}
|
|
74
|
-
get isDark() {
|
|
75
|
-
return clickgo.dom.is.dark;
|
|
76
|
-
}
|
|
77
|
-
setGlobalCursor(type) {
|
|
78
|
-
clickgo.dom.setGlobalCursor(type);
|
|
79
|
-
}
|
|
80
|
-
hasTouchButMouse(e) {
|
|
81
|
-
clickgo.form.dialog(clickgo.dom.hasTouchButMouse(e) ? 'true' : 'false').catch((e) => { throw e; });
|
|
82
|
-
}
|
|
83
|
-
getStyleCount() {
|
|
84
|
-
clickgo.form.dialog(clickgo.dom.getStyleCount(this.taskId, 'form').toString()).catch((e) => { throw e; });
|
|
85
|
-
}
|
|
86
|
-
async getWatchSizeCount(taskId) {
|
|
87
|
-
await clickgo.form.dialog(clickgo.dom.getWatchSizeCount(taskId).toString());
|
|
88
|
-
}
|
|
89
|
-
watchSize() {
|
|
90
|
-
this.watchSizeText = !this.watchSizeText;
|
|
91
|
-
if (this.watchSizeText) {
|
|
92
|
-
clickgo.dom.watchSize(this.refs.watchSize.$el, () => {
|
|
93
|
-
clickgo.form.dialog(JSON.stringify({
|
|
94
|
-
'width': this.refs.watchSize.$el.offsetWidth,
|
|
95
|
-
'height': this.refs.watchSize.$el.offsetHeight
|
|
96
|
-
})).catch((e) => { throw e; });
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
clickgo.dom.unwatchSize(this.refs.watchSize.$el);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
watchPosition() {
|
|
104
|
-
this.watchPositionText = !this.watchPositionText;
|
|
105
|
-
if (this.watchPositionText) {
|
|
106
|
-
clickgo.dom.watchPosition(this.refs.watchPosition.$el, (state) => {
|
|
107
|
-
console.log('watchPosition', state);
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
clickgo.dom.unwatchPosition(this.refs.watchPosition.$el);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
wwatch() {
|
|
115
|
-
this.watchText = !this.watchText;
|
|
116
|
-
if (this.watchText) {
|
|
117
|
-
clickgo.dom.watch(this.refs.watch.$el, () => {
|
|
118
|
-
clickgo.form.dialog('Changed.').catch((e) => { throw e; });
|
|
119
|
-
}, 'text');
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
clickgo.dom.unwatch(this.refs.watch.$el);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
async getWatchCount(taskId) {
|
|
126
|
-
await clickgo.form.dialog(clickgo.dom.getWatchCount(taskId).toString());
|
|
127
|
-
}
|
|
128
|
-
isWatchStyle() {
|
|
129
|
-
clickgo.form.dialog(clickgo.dom.isWatchStyle(this.refs.watchStyle.$el) ? 'true' : 'false').catch((e) => { throw e; });
|
|
130
|
-
}
|
|
131
|
-
async getWatchInfo() {
|
|
132
|
-
this.getWatchInfoDisabled = true;
|
|
133
|
-
for (let i = 0; i < 40; ++i) {
|
|
134
|
-
const rtn = clickgo.dom.getWatchInfo();
|
|
135
|
-
this.getWatchInfoText = JSON.stringify(rtn, undefined, 4);
|
|
136
|
-
await clickgo.tool.sleep(500);
|
|
137
|
-
}
|
|
138
|
-
this.getWatchInfoDisabled = false;
|
|
139
|
-
}
|
|
140
|
-
bindGesture(e) {
|
|
141
|
-
clickgo.dom.bindGesture(e, (ne, dir) => {
|
|
142
|
-
if (['top', 'bottom'].includes(dir)) {
|
|
143
|
-
return 1;
|
|
144
|
-
}
|
|
145
|
-
return 0;
|
|
146
|
-
}, async (dir) => {
|
|
147
|
-
this.bindGestureText = dir.slice(0, 1).toUpperCase() + dir.slice(1);
|
|
148
|
-
await clickgo.tool.sleep(500);
|
|
149
|
-
this.bindGestureText = '';
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
bindGestureWheel(e) {
|
|
153
|
-
clickgo.dom.bindGesture(e, (ne, dir) => {
|
|
154
|
-
if (['top', 'bottom', 'left', 'right'].includes(dir)) {
|
|
155
|
-
return 1;
|
|
156
|
-
}
|
|
157
|
-
return 0;
|
|
158
|
-
}, async (dir) => {
|
|
159
|
-
this.bindGestureWheelText = dir.slice(0, 1).toUpperCase() + dir.slice(1);
|
|
160
|
-
await clickgo.tool.sleep(500);
|
|
161
|
-
this.bindGestureWheelText = '';
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
bindLong() {
|
|
165
|
-
clickgo.form.dialog('Press and hold this button.').catch((e) => { throw e; });
|
|
166
|
-
}
|
|
167
|
-
bindLongDown(e) {
|
|
168
|
-
clickgo.dom.bindLong(e, async () => {
|
|
169
|
-
this.bindLongText = true;
|
|
170
|
-
await clickgo.tool.sleep(500);
|
|
171
|
-
this.bindLongText = false;
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
bindDragDown(e) {
|
|
175
|
-
clickgo.dom.bindDrag(e, {
|
|
176
|
-
'el': this.refs.bindDrag,
|
|
177
|
-
'data': 'bindDragDownTest'
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
async dragEnter(e) {
|
|
181
|
-
e.target.innerText = 'enter';
|
|
182
|
-
await clickgo.tool.sleep(200);
|
|
183
|
-
e.target.innerText = '';
|
|
184
|
-
}
|
|
185
|
-
async dragLeave(e) {
|
|
186
|
-
e.target.innerText = 'leave';
|
|
187
|
-
await clickgo.tool.sleep(200);
|
|
188
|
-
e.target.innerText = '';
|
|
189
|
-
}
|
|
190
|
-
async drop(e) {
|
|
191
|
-
e.target.innerText = 'drop';
|
|
192
|
-
await clickgo.tool.sleep(500);
|
|
193
|
-
e.target.innerText = '';
|
|
194
|
-
}
|
|
195
|
-
bindMoveDown(e) {
|
|
196
|
-
clickgo.dom.bindMove(e, {
|
|
197
|
-
'areaObject': e.currentTarget,
|
|
198
|
-
'object': this.refs.move,
|
|
199
|
-
move: (e, o) => {
|
|
200
|
-
this.moveLeft += o.ox;
|
|
201
|
-
this.moveTop += o.oy;
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
moveDown(e) {
|
|
206
|
-
clickgo.dom.bindDblClick(e, () => {
|
|
207
|
-
this.moveWidth = this.moveWidth === 25 ? 50 : 25;
|
|
208
|
-
this.moveHeight = this.moveHeight === 25 ? 50 : 25;
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
bindScaleDown(e) {
|
|
212
|
-
clickgo.dom.bindScale(e, (e, scale, cpos) => {
|
|
213
|
-
e.preventDefault();
|
|
214
|
-
this.scaleX += cpos.x;
|
|
215
|
-
this.scaleY += cpos.y;
|
|
216
|
-
this.scaleS *= scale;
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
async fullscreen() {
|
|
220
|
-
await clickgo.dom.fullscreen();
|
|
221
|
-
}
|
|
222
|
-
onMounted() {
|
|
223
|
-
clickgo.dom.watchStyle(this.refs.watchStyle.$el, 'font-size', (n, v) => {
|
|
224
|
-
clickgo.form.dialog('name: ' + n + ', value: ' + v).catch((e) => { throw e; });
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
exports.default = default_1;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
.dropLine {
|
|
2
|
-
display: flex; flex: 1; margin-bottom: 5px;
|
|
3
|
-
|
|
4
|
-
> block {
|
|
5
|
-
border: solid 1px var(--g-plain-border-color); flex: 1; margin-right: 5px; display: flex; justify-content: center; align-items: center;
|
|
6
|
-
&[data-cg-hover] {
|
|
7
|
-
background-color: var(--g-color); color: var(--face);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<form width="400" height="450" title="Library dom">
|
|
2
|
-
<flow direction="v" style="flex: 1; padding: 10px;">
|
|
3
|
-
<layout gutter="10" direction="v" style="flex: 1;">
|
|
4
|
-
<button @click="setGlobalCursor('wait')" >setGlobalCursor('wait')</button>
|
|
5
|
-
<button @click="setGlobalCursor" >setGlobalCursor()</button>
|
|
6
|
-
<button @click="hasTouchButMouse" >hasTouchButMouse()</button>
|
|
7
|
-
<button @click="getStyleCount" >getStyleCount({{taskId}}, 'form')</button>
|
|
8
|
-
<layout gutter="10">
|
|
9
|
-
<button @click="watchSize" ref="watchSize" :style="{'height': (watchSizeHeight ? 30 : 50) + 'px'}" style="flex: 1;">{{watchSizeText ? '' : '!'}}watchSize</button>
|
|
10
|
-
<button @click="watchSizeHeight = !watchSizeHeight" style="flex: 1;">Change</button>
|
|
11
|
-
</layout>
|
|
12
|
-
<layout gutter="10" align-v="center">
|
|
13
|
-
<button @click="watchPosition" ref="watchPosition" style="flex: 1;">{{watchPositionText ? '' : '!'}}watchPosition</button>
|
|
14
|
-
<label>watch and scroll</label>
|
|
15
|
-
</layout>
|
|
16
|
-
<layout gutter="10">
|
|
17
|
-
<button style="flex: 1;" @click="getWatchSizeCount()">getWatchSizeCount()</button>
|
|
18
|
-
<button style="flex: 1;" @click="getWatchSizeCount(taskId)">getWatchSizeCount({{taskId}})</button>
|
|
19
|
-
</layout>
|
|
20
|
-
<layout gutter="10">
|
|
21
|
-
<layout ref="watch" align-v="center" align-h="center" style="flex: 1; background: var(--g-plain-background); border: solid 1px var(--g-plain-border-color);">{{watchInner ? 'inner' : 'Inner'}}</layout>
|
|
22
|
-
<button @click="wwatch">{{watchText ? '' : '!'}}watch</button>
|
|
23
|
-
<button @click="watchInner = !watchInner">Change</button>
|
|
24
|
-
</layout>
|
|
25
|
-
<layout gutter="10">
|
|
26
|
-
<button style="flex: 1;" @click="getWatchCount()">getWatchCount()</button>
|
|
27
|
-
<button style="flex: 1;" @click="getWatchCount(taskId)">getWatchCount({{taskId}})</button>
|
|
28
|
-
</layout>
|
|
29
|
-
<button @click="watchStyleChange = !watchStyleChange" ref="watchStyle" :style="{'font-size': watchStyleChange ? 'inherit' : '16px'}">watchStyle(this.refs.watchStyle.$el, 'font-size', (n, v) => { ... })</button>
|
|
30
|
-
<button @click="isWatchStyle" >isWatchStyle(this.refs.watchStyle.$el)</button>
|
|
31
|
-
<!-- getWatchInfo -->
|
|
32
|
-
<text :model-value="getWatchInfoText" readonly type="multi" style="height: 300px;"></text>
|
|
33
|
-
<button @click="getWatchInfo" :disabled="getWatchInfoDisabled">getWatchInfo 20s</button>
|
|
34
|
-
<block @mousedown="bindGesture" @touchstart="bindGesture" style="height: 50px; display: flex; justify-content: center; align-items: center; font-size: 14px; background: var(--g-plain-background); border: solid 1px var(--g-plain-border-color);">{{bindGestureText ? bindGestureText : 'bindGesture(e: Touch | Mouse, { ... })'}}</block>
|
|
35
|
-
<block @wheel="bindGestureWheel" style="height: 50px; display: flex; justify-content: center; align-items: center; font-size: 14px; background: var(--g-plain-background); border: solid 1px var(--g-plain-border-color);">{{bindGestureWheelText ? bindGestureWheelText : 'bindGesture(e: Wheel, { ... })'}}</block>
|
|
36
|
-
<button @click="bindLong" ref="bindLong" @mousedown="bindLongDown" @touchstart="bindLongDown" >{{bindLongText ? 'Yeah!' : 'bindLong(e, () => { ... })'}}</button>
|
|
37
|
-
<block style="height: 100px; display: flex; background: var(--g-plain-background); border: solid 1px var(--g-plain-border-color);">
|
|
38
|
-
<block style="flex: 1; display: flex; justify-content: center; align-items: center;">
|
|
39
|
-
<block @mousedown="bindDragDown" @touchstart="bindDragDown" ref="bindDrag" style="width: 50px; height: 50px; display: flex; justify-content: center; align-items: center; border: solid 1px var(--g-plain-border-color);">Drag</block>
|
|
40
|
-
</block>
|
|
41
|
-
<block style="margin-left: 10px; flex: 1; display: flex; flex-direction: column; padding: 5px 0 0 5px;">
|
|
42
|
-
<block class="dropLine">
|
|
43
|
-
<block data-cg-drop @dragenter="dragEnter" @dragleave="dragLeave" @drop="drop"></block>
|
|
44
|
-
<block data-cg-drop @dragenter="dragEnter" @dragleave="dragLeave" @drop="drop"></block>
|
|
45
|
-
<block data-cg-drop @dragenter="dragEnter" @dragleave="dragLeave" @drop="drop"></block>
|
|
46
|
-
</block>
|
|
47
|
-
<block class="dropLine">
|
|
48
|
-
<block data-cg-drop @dragenter="dragEnter" @dragleave="dragLeave" @drop="drop"></block>
|
|
49
|
-
<block data-cg-drop @dragenter="dragEnter" @dragleave="dragLeave" @drop="drop"></block>
|
|
50
|
-
<block data-cg-drop @dragenter="dragEnter" @dragleave="dragLeave" @drop="drop"></block>
|
|
51
|
-
</block>
|
|
52
|
-
<block class="dropLine">
|
|
53
|
-
<block data-cg-drop @dragenter="dragEnter" @dragleave="dragLeave" @drop="drop"></block>
|
|
54
|
-
<block data-cg-drop @dragenter="dragEnter" @dragleave="dragLeave" @drop="drop"></block>
|
|
55
|
-
<block data-cg-drop @dragenter="dragEnter" @dragleave="dragLeave" @drop="drop"></block>
|
|
56
|
-
</block>
|
|
57
|
-
</block>
|
|
58
|
-
</block>
|
|
59
|
-
<block @mousedown="bindMoveDown" @touchstart="bindMoveDown" style="height: 50px; display: flex; justify-content: center; align-items: center; font-size: 14px; position: relative; background: var(--g-plain-background); border: solid 1px var(--g-plain-border-color);">
|
|
60
|
-
<label>bindMove(e, { ... })</label>
|
|
61
|
-
<block ref="move" style="background: #07c160; position: absolute;" :style="{'left': moveLeft + 'px', 'top': moveTop + 'px', 'width': moveWidth + 'px', 'height': moveHeight + 'px'}" @touchstart="moveDown" @mousedown="moveDown"></block>
|
|
62
|
-
</block>
|
|
63
|
-
<!-- 双指缩放 -->
|
|
64
|
-
<block @mousedown="bindScaleDown" @touchstart="bindScaleDown" @touchmove="bindScaleDown" @touchend="bindScaleDown" @wheel="bindScaleDown" style="height: 200px; display: flex; justify-content: center; align-items: center; background: var(--g-plain-background); border: solid 1px var(--g-plain-border-color); overflow: hidden;">
|
|
65
|
-
<block style="background: #07c160; width: 25px; height: 25px; pointer-events: none;" :style="{'transform': 'translate3d(' + scaleX + 'px, ' + scaleY + 'px, 0) scale(' + scaleS + ')'}"></block>
|
|
66
|
-
</block>
|
|
67
|
-
<button @click="fullscreen" >fullscreen()</button>
|
|
68
|
-
<label>clickgo.dom.is.move: {{isMove ? 'true' : 'false'}}</label>
|
|
69
|
-
<label>clickgo.dom.is.shift: {{isShift ? 'true' : 'false'}}</label>
|
|
70
|
-
<label>clickgo.dom.is.ctrl: {{isCtrl ? 'true' : 'false'}}</label>
|
|
71
|
-
<label>clickgo.dom.is.meta: {{isMeta ? 'true' : 'false'}}</label>
|
|
72
|
-
<label>clickgo.dom.is.full: {{isFull ? 'true' : 'false'}}</label>
|
|
73
|
-
<label>clickgo.dom.is.dark: {{isDark ? 'true' : 'false'}}</label>
|
|
74
|
-
</layout>
|
|
75
|
-
</flow>
|
|
76
|
-
</form>
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const clickgo = __importStar(require("clickgo"));
|
|
37
|
-
class default_1 extends clickgo.form.AbstractForm {
|
|
38
|
-
constructor() {
|
|
39
|
-
super(...arguments);
|
|
40
|
-
this.fid = '0';
|
|
41
|
-
this.tid = '0';
|
|
42
|
-
this.type = ['primary'];
|
|
43
|
-
this.atype = ['default'];
|
|
44
|
-
this.progress = ['noraml'];
|
|
45
|
-
this.dr = '';
|
|
46
|
-
this.hash = 'hash' + clickgo.tool.rand(0, 100).toString();
|
|
47
|
-
}
|
|
48
|
-
min() {
|
|
49
|
-
clickgo.form.min(this.formId);
|
|
50
|
-
}
|
|
51
|
-
max() {
|
|
52
|
-
clickgo.form.max(this.formId);
|
|
53
|
-
}
|
|
54
|
-
close() {
|
|
55
|
-
clickgo.form.close(this.formId);
|
|
56
|
-
}
|
|
57
|
-
bindResize(e) {
|
|
58
|
-
clickgo.form.bindResize(e, 'rb');
|
|
59
|
-
}
|
|
60
|
-
bindDrag(e) {
|
|
61
|
-
clickgo.form.bindDrag(e);
|
|
62
|
-
}
|
|
63
|
-
getTaskId() {
|
|
64
|
-
clickgo.form.dialog(clickgo.form.getTaskId(parseInt(this.fid)).toString()).catch((e) => { throw e; });
|
|
65
|
-
}
|
|
66
|
-
get() {
|
|
67
|
-
clickgo.form.dialog(JSON.stringify(clickgo.form.get(parseInt(this.fid)))).catch((e) => { throw e; });
|
|
68
|
-
}
|
|
69
|
-
async getHash() {
|
|
70
|
-
await clickgo.form.dialog(JSON.stringify(clickgo.form.getHash(parseInt(this.fid))));
|
|
71
|
-
}
|
|
72
|
-
async hashBack() {
|
|
73
|
-
await clickgo.form.dialog(JSON.stringify(await clickgo.form.hashBack(parseInt(this.fid))));
|
|
74
|
-
}
|
|
75
|
-
async tohash() {
|
|
76
|
-
await clickgo.form.dialog(JSON.stringify(clickgo.form.hash(this.hash, parseInt(this.fid))));
|
|
77
|
-
}
|
|
78
|
-
async getActivePanel() {
|
|
79
|
-
await clickgo.form.dialog(JSON.stringify(clickgo.form.getActivePanel(parseInt(this.fid))));
|
|
80
|
-
}
|
|
81
|
-
async getFocus() {
|
|
82
|
-
const f = clickgo.form.getFocus();
|
|
83
|
-
await clickgo.form.dialog(f ? f.toString() : 'null');
|
|
84
|
-
}
|
|
85
|
-
changeFocus() {
|
|
86
|
-
clickgo.form.changeFocus(parseInt(this.fid));
|
|
87
|
-
}
|
|
88
|
-
getList() {
|
|
89
|
-
let str = JSON.stringify(clickgo.form.getList(parseInt(this.tid)));
|
|
90
|
-
str = str.replace(/"icon":"(.*?)"/g, function (t, t1) {
|
|
91
|
-
return `"icon":"${t1 ? (t1.slice(0, 10) + '...') : t1}"`;
|
|
92
|
-
});
|
|
93
|
-
clickgo.form.dialog(`<flow direction="v" style="width: 200px; height: 80px;">${str}</flow>`).catch((e) => { throw e; });
|
|
94
|
-
}
|
|
95
|
-
getMaxZIndexID() {
|
|
96
|
-
const fid = clickgo.form.getMaxZIndexID();
|
|
97
|
-
clickgo.form.dialog(JSON.stringify(fid)).catch((e) => { throw e; });
|
|
98
|
-
}
|
|
99
|
-
getRectByBorder() {
|
|
100
|
-
const size = clickgo.form.getRectByBorder('rb');
|
|
101
|
-
clickgo.form.dialog(JSON.stringify(size)).catch((e) => { throw e; });
|
|
102
|
-
}
|
|
103
|
-
showCircular(e) {
|
|
104
|
-
clickgo.form.showCircular(e.clientX, e.clientY);
|
|
105
|
-
}
|
|
106
|
-
async showRectangle(e) {
|
|
107
|
-
clickgo.form.showRectangle(e.clientX, e.clientY, 'rb');
|
|
108
|
-
await clickgo.tool.sleep(1000);
|
|
109
|
-
clickgo.form.hideRectangle();
|
|
110
|
-
}
|
|
111
|
-
async showDrag() {
|
|
112
|
-
clickgo.form.showDrag();
|
|
113
|
-
const rect = this.refs.showDrag.$el.getBoundingClientRect();
|
|
114
|
-
clickgo.form.moveDrag({
|
|
115
|
-
'left': rect.left,
|
|
116
|
-
'top': rect.top,
|
|
117
|
-
'width': rect.width,
|
|
118
|
-
'height': rect.height
|
|
119
|
-
});
|
|
120
|
-
await clickgo.tool.sleep(1000);
|
|
121
|
-
clickgo.form.hideDrag();
|
|
122
|
-
}
|
|
123
|
-
async notify() {
|
|
124
|
-
let icon = null;
|
|
125
|
-
if (this.progress[0] === 'progress + icon') {
|
|
126
|
-
icon = await clickgo.fs.getContent('/package/res/icon.svg');
|
|
127
|
-
}
|
|
128
|
-
if (icon instanceof Blob) {
|
|
129
|
-
icon = await clickgo.tool.blob2DataUrl(icon);
|
|
130
|
-
}
|
|
131
|
-
const nid = clickgo.form.notify({
|
|
132
|
-
'title': this.progress[0] === 'only content' ? undefined : 'Notify',
|
|
133
|
-
'content': this.progress[0] === 'only title' ? undefined : 'Content',
|
|
134
|
-
'type': this.type[0],
|
|
135
|
-
'progress': (this.progress[0] === 'progress + icon') ? true : false,
|
|
136
|
-
'icon': icon
|
|
137
|
-
});
|
|
138
|
-
if (this.progress[0] === 'progress + icon') {
|
|
139
|
-
clickgo.form.notifyProgress(nid, 12);
|
|
140
|
-
await clickgo.tool.sleep(1000);
|
|
141
|
-
clickgo.form.notifyProgress(nid, 30);
|
|
142
|
-
await clickgo.tool.sleep(300);
|
|
143
|
-
clickgo.form.notifyProgress(nid, 50);
|
|
144
|
-
clickgo.form.notifyContent(nid, {
|
|
145
|
-
'content': 'loading... (3/4)'
|
|
146
|
-
});
|
|
147
|
-
await clickgo.tool.sleep(700);
|
|
148
|
-
clickgo.form.notifyProgress(nid, 75);
|
|
149
|
-
clickgo.form.notifyContent(nid, {
|
|
150
|
-
'content': 'loading... (4/4)'
|
|
151
|
-
});
|
|
152
|
-
await clickgo.tool.sleep(1000);
|
|
153
|
-
clickgo.form.notifyProgress(nid, 100);
|
|
154
|
-
clickgo.form.notifyContent(nid, {
|
|
155
|
-
'title': 'Done',
|
|
156
|
-
'content': 'loaded'
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
alert() {
|
|
161
|
-
const aid = clickgo.form.alert(this.atype[0], this.atype[0]);
|
|
162
|
-
console.log('aid', aid);
|
|
163
|
-
}
|
|
164
|
-
showPop(e) {
|
|
165
|
-
if (!e.currentTarget) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
clickgo.form.showPop(e.currentTarget, this.refs.pop, 'v');
|
|
169
|
-
}
|
|
170
|
-
async create() {
|
|
171
|
-
const frm = await clickgo.form.create('test', undefined, {
|
|
172
|
-
'path': this.filename
|
|
173
|
-
});
|
|
174
|
-
frm.show();
|
|
175
|
-
}
|
|
176
|
-
async dialog() {
|
|
177
|
-
this.dr = await clickgo.form.dialog('Hello world!');
|
|
178
|
-
}
|
|
179
|
-
async dialogLong() {
|
|
180
|
-
this.dr = await clickgo.form.dialog('longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong');
|
|
181
|
-
}
|
|
182
|
-
async dialogTitle() {
|
|
183
|
-
this.dr = await clickgo.form.dialog({
|
|
184
|
-
'title': 'Title',
|
|
185
|
-
'content': 'Hello world!'
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
async dialogButtons() {
|
|
189
|
-
this.dr = await clickgo.form.dialog({
|
|
190
|
-
'content': 'Hello world!',
|
|
191
|
-
'buttons': ['A', 'B', 'C']
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
async dialogCannot() {
|
|
195
|
-
this.dr = await clickgo.form.dialog({
|
|
196
|
-
'content': 'Hello world!',
|
|
197
|
-
'buttons': ['Do not close', 'Close'],
|
|
198
|
-
'select': (e, button) => {
|
|
199
|
-
if (button === 'Do not close') {
|
|
200
|
-
e.preventDefault();
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
async dialogData() {
|
|
206
|
-
this.dr = await clickgo.form.dialog({
|
|
207
|
-
'direction': 'v',
|
|
208
|
-
'gutter': 10,
|
|
209
|
-
'content': '<block>Hello text!</block><text :modelValue="data.txt" />',
|
|
210
|
-
'data': {
|
|
211
|
-
'txt': 'Text\nLine 2.'
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
async confirm(cancel) {
|
|
216
|
-
this.dr = await clickgo.form.confirm({
|
|
217
|
-
'content': 'Hello world?',
|
|
218
|
-
'cancel': cancel
|
|
219
|
-
});
|
|
220
|
-
if (typeof this.dr === 'boolean') {
|
|
221
|
-
this.dr = this.dr ? 'true (boolean)' : 'false (boolean)';
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
this.dr = this.dr.toString() + ' (number)';
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
async prompt() {
|
|
228
|
-
this.dr = await clickgo.form.prompt('test');
|
|
229
|
-
}
|
|
230
|
-
flash() {
|
|
231
|
-
clickgo.form.flash(this.formId);
|
|
232
|
-
}
|
|
233
|
-
showLauncher() {
|
|
234
|
-
clickgo.form.showLauncher();
|
|
235
|
-
}
|
|
236
|
-
onReceive(obj) {
|
|
237
|
-
clickgo.form.dialog(JSON.stringify(obj)).catch((e) => { throw e; });
|
|
238
|
-
}
|
|
239
|
-
onMounted() {
|
|
240
|
-
this.fid = this.formId.toString();
|
|
241
|
-
this.tid = this.taskId.toString();
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
exports.default = default_1;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
<form width="350" height="500" title="Library form">
|
|
2
|
-
<flow direction="v" style="flex: 1; padding: 10px;">
|
|
3
|
-
<layout gutter="10" direction="v" style="flex: 1;">
|
|
4
|
-
<label>This form id: {{formId}}</label>
|
|
5
|
-
<button @click="min">min({{formId}})</button>
|
|
6
|
-
<button @click="max">max({{formId}})</button>
|
|
7
|
-
<button @click="close">close({{formId}})</button>
|
|
8
|
-
<label @mousedown="bindResize" @touchstart="bindResize" style="padding: 20px; background: rgba(0, 0, 0, .1); cursor: se-resize;">bindResize(e, 'rb')</label>
|
|
9
|
-
<label @mousedown="bindDrag" @touchstart="bindDrag" style="padding: 20px; background: rgba(0, 0, 0, .1); cursor: move;">bindDrag(e)</label>
|
|
10
|
-
<layout gutter="10" align-v="center">
|
|
11
|
-
<label>Form ID:</label>
|
|
12
|
-
<text v-model="fid" style="flex: 1; width: 0;"></text>
|
|
13
|
-
</layout>
|
|
14
|
-
<button @click="getTaskId">getTaskId({{fid}})</button>
|
|
15
|
-
<button @click="get">get({{fid}})</button>
|
|
16
|
-
<layout gutter="10">
|
|
17
|
-
<label>Now Form Hash:</label>
|
|
18
|
-
<label>{{formHash}}</label>
|
|
19
|
-
</layout>
|
|
20
|
-
<button @click="getHash">getHash({{fid}})</button>
|
|
21
|
-
<button @click="hashBack">hashBack({{fid}})</button>
|
|
22
|
-
<layout gutter="10" align-v="center">
|
|
23
|
-
<label>Form Hash:</label>
|
|
24
|
-
<text v-model="hash" style="flex: 1; width: 0;"></text>
|
|
25
|
-
</layout>
|
|
26
|
-
<button @click="tohash">hash('{{hash}}', {{fid}})</button>
|
|
27
|
-
<button @click="getActivePanel">getActivePanel({{fid}})</button>
|
|
28
|
-
<layout gutter="10" align-v="center">
|
|
29
|
-
<label>Task ID:</label>
|
|
30
|
-
<text v-model="tid" style="flex: 1; width: 0;"></text>
|
|
31
|
-
<button @click="getList">getList({{tid}})</button>
|
|
32
|
-
</layout>
|
|
33
|
-
<button @click="getFocus">getFocus()</button>
|
|
34
|
-
<button @click="changeFocus">changeFocus({{fid}})</button>
|
|
35
|
-
<button @click="getMaxZIndexID">getMaxZIndexID()</button>
|
|
36
|
-
<button @click="getRectByBorder">getRectByBorder('rb')</button>
|
|
37
|
-
<button @click="showCircular">showCircular(x, y)</button>
|
|
38
|
-
<button @click="showRectangle">showRectangle(x, y, 'rb')</button>
|
|
39
|
-
<button @click="showDrag" ref="showDrag">showDrag()</button>
|
|
40
|
-
<layout gutter="10">
|
|
41
|
-
<select v-model="type" :data="['primary', 'info', 'warning', 'danger']"></select>
|
|
42
|
-
<select v-model="progress" :data="['normal', 'progress + icon', 'only title', 'only content']" style="flex: 1; width: 0;"></select>
|
|
43
|
-
<button @click="notify">notify({ ... })</button>
|
|
44
|
-
</layout>
|
|
45
|
-
<layout gutter="10">
|
|
46
|
-
<select v-model="atype" :data="['default', 'primary', 'info', 'warning', 'danger']" style="flex: 1;"></select>
|
|
47
|
-
<button @click="alert">alert({ ... })</button>
|
|
48
|
-
</layout>
|
|
49
|
-
<button @click="showPop">showPop(e.currentTarget, this.refs.pop)</button>
|
|
50
|
-
<teleport to="system">
|
|
51
|
-
<layout ref="pop" gutter="10" direction="v" align-v="center" align-h="center" style="border: solid 1px #000; background: #FFF; width: 200px; height: 100px;">
|
|
52
|
-
<label>refs.pop</label>
|
|
53
|
-
<layout gutter="10">
|
|
54
|
-
<select :data="[1,2,3]"></select>
|
|
55
|
-
<select :data="[4,5,6]"></select>
|
|
56
|
-
</layout>
|
|
57
|
-
</layout>
|
|
58
|
-
</teleport>
|
|
59
|
-
<button @click="create">create('test', undefined, { 'path': this.filename })</button>
|
|
60
|
-
<label>Dialog result: {{dr}}.</label>
|
|
61
|
-
<button @click="dialog">dialog('Hello world!')</button>
|
|
62
|
-
<button @click="dialogLong">dialog('long...')</button>
|
|
63
|
-
<button @click="dialogTitle">dialog({'title':'Title','content':'Hello world!'})</button>
|
|
64
|
-
<button @click="dialogButtons">dialog({'content':'Hello world!','buttons':['A','B','C']})</button>
|
|
65
|
-
<button @click="dialogCannot">Dialog can not be close</button>
|
|
66
|
-
<button @click="dialogData">Dialog data</button>
|
|
67
|
-
<button @click="confirm(false)">confirm('confirm')</button>
|
|
68
|
-
<button @click="confirm(true)">confirm({'content':'confirm','cancel':true})</button>
|
|
69
|
-
<button @click="prompt">prompt('test')</button>
|
|
70
|
-
<button @click="flash">flash({{formId}})</button>
|
|
71
|
-
<button @click="showLauncher">showLauncher()</button>
|
|
72
|
-
</layout>
|
|
73
|
-
</flow>
|
|
74
|
-
</form>
|