clickgo 3.16.21 → 3.16.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +24 -12
  3. package/dist/app/demo/app.js +1 -1
  4. package/dist/app/demo/form/control/flow/flow.xml +13 -13
  5. package/dist/app/demo/form/control/icon/icon.xml +12 -0
  6. package/dist/app/demo/form/control/list/list.js +22 -1
  7. package/dist/app/demo/form/control/list/list.xml +3 -3
  8. package/dist/app/demo/form/control/marquee/marquee.xml +6 -6
  9. package/dist/app/demo/form/control/menu/menu.xml +14 -14
  10. package/dist/app/demo/form/control/monaco/monaco.xml +2 -2
  11. package/dist/app/demo/form/control/panel/test1.xml +1 -1
  12. package/dist/app/demo/form/control/progress/progress.js +1 -0
  13. package/dist/app/demo/form/control/progress/progress.xml +4 -3
  14. package/dist/app/demo/form/control/radio/radio.xml +2 -2
  15. package/dist/app/demo/form/control/scroll/scroll.xml +6 -6
  16. package/dist/app/demo/form/control/select/select.js +1 -0
  17. package/dist/app/demo/form/control/select/select.xml +7 -1
  18. package/dist/app/demo/form/control/switch/switch.js +1 -0
  19. package/dist/app/demo/form/control/switch/switch.xml +9 -6
  20. package/dist/app/demo/form/control/vflow/vflow.xml +13 -13
  21. package/dist/app/demo/form/method/dom/dom.js +3 -0
  22. package/dist/app/demo/form/method/dom/dom.xml +1 -0
  23. package/dist/app/demo/form/method/system/system.js +5 -0
  24. package/dist/app/demo/form/method/system/system.xml +1 -0
  25. package/dist/app/demo/form/method/theme/theme.xml +1 -0
  26. package/dist/app/task/form/bar/bar.xml +1 -1
  27. package/dist/clickgo.d.ts +5 -0
  28. package/dist/clickgo.js +29 -1
  29. package/dist/control/arteditor.cgc +0 -0
  30. package/dist/control/box.cgc +0 -0
  31. package/dist/control/captcha.cgc +0 -0
  32. package/dist/control/common.cgc +0 -0
  33. package/dist/control/desc.cgc +0 -0
  34. package/dist/control/drawer.cgc +0 -0
  35. package/dist/control/echarts.cgc +0 -0
  36. package/dist/control/form.cgc +0 -0
  37. package/dist/control/iconview.cgc +0 -0
  38. package/dist/control/jodit.cgc +0 -0
  39. package/dist/control/map.cgc +0 -0
  40. package/dist/control/monaco.cgc +0 -0
  41. package/dist/control/mpegts.cgc +0 -0
  42. package/dist/control/nav.cgc +0 -0
  43. package/dist/control/page.cgc +0 -0
  44. package/dist/control/pdf.cgc +0 -0
  45. package/dist/control/property.cgc +0 -0
  46. package/dist/control/qrcode.cgc +0 -0
  47. package/dist/control/table.cgc +0 -0
  48. package/dist/control/task.cgc +0 -0
  49. package/dist/control/tplink.cgc +0 -0
  50. package/dist/control/tuieditor.cgc +0 -0
  51. package/dist/control/tuiviewer.cgc +0 -0
  52. package/dist/control/xterm.cgc +0 -0
  53. package/dist/global.css +1 -1
  54. package/dist/index.d.ts +4 -0
  55. package/dist/index.js +4 -0
  56. package/dist/lib/dom.d.ts +1 -0
  57. package/dist/lib/dom.js +5 -1
  58. package/dist/lib/form.js +8 -16
  59. package/dist/lib/fs.js +1 -1
  60. package/dist/lib/task.js +23 -22
  61. package/dist/lib/tool.d.ts +1 -1
  62. package/dist/lib/tool.js +22 -23
  63. package/dist/theme/blue.cgt +0 -0
  64. package/dist/theme/byterun.cgt +0 -0
  65. package/dist/theme/dark.cgt +0 -0
  66. package/dist/theme/light.cgt +0 -0
  67. package/package.json +1 -1
  68. package/types/index.d.ts +4 -0
package/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2024 MAIYUN.NET
189
+ Copyright 2007 - 2025 MAIYUN.NET
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ClickGo
2
2
 
3
- <p align="center"><img src="dist/icon.png" width="68" height="68" alt="ClickGo"></p>
3
+ <p align="center"><img src="./dist/icon.png" width="68" height="68" alt="ClickGo"></p>
4
4
  <p align="center">
5
5
  <a href="https://github.com/maiyun/clickgo/blob/master/LICENSE">
6
6
  <img alt="License" src="https://img.shields.io/github/license/maiyun/clickgo?color=blue" />
@@ -16,16 +16,26 @@
16
16
  </a>
17
17
  </p>
18
18
 
19
- Quickly and easily create a beautiful console interface.
19
+ [简体中文](./doc/README.sc.md)
20
20
 
21
- ## Installation
21
+ Build web and native apps using HTML + CSS.
22
22
 
23
- Load the module loader first, and then load it using the module loader.
23
+ Apps compile into a single `.cga` file run it in the browser or locally via `ClickGo Native`. Great for image editors, DB tools, file managers, admin panels, and more.
24
+
25
+ <p align="center">
26
+ <img src="./doc/pic3.jpg" alt="ClickGo">
27
+ <img src="./doc/pic.jpg" alt="ClickGo">
28
+ <img src="./doc/pic2.jpg" alt="ClickGo">
29
+ </p>
30
+
31
+ ## Usage
32
+
33
+ First, load the module loader, then load your app with it.
24
34
 
25
35
  **index.html**
26
36
 
27
37
  ```html
28
- <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.8/dist/loader.min.js?path=index&npm={'clickgo':'3.16.21'}"></script>
38
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.8/dist/loader.min.js?path=index&npm={'clickgo':'3.16.23'}"></script>
29
39
  ```
30
40
 
31
41
  **index.js**
@@ -42,15 +52,18 @@ clickgo.launcher(new Boot());
42
52
 
43
53
  ### NPM
44
54
 
45
- After installing with NPM, you'll get code hints.
55
+ Use TypeScript? Install via NPM for full IntelliSense support.
46
56
 
47
57
  ```sh
48
58
  $ npm i clickgo --save-dev
59
+ $ npm i @litert/loader --save-dev
60
+ $ npm i jszip --save-dev
49
61
  ```
50
62
 
51
- ## Note
63
+ ## Notes
52
64
 
53
- ClickGo demand loading Vue, jszip, resize-observer, but **DO NOT** reference these JS and CSS files. ClickGo will automatically reference. You only need to import "clickgo" module.
65
+ ClickGo auto-loads Vue, jszip, and resize-observer.
66
+ **Don't** include them manually — just import the `ClickGo` module.
54
67
 
55
68
  ## Demo
56
69
 
@@ -58,10 +71,6 @@ Clone and visit "dist/test/index.html".
58
71
 
59
72
  [Click here to visit online.](https://maiyun.github.io/clickgo/dist/test/)
60
73
 
61
- ## Changelog
62
-
63
- [Changelog](doc/CHANGELOG.md)
64
-
65
74
  ## License
66
75
 
67
76
  This library is published under [Apache-2.0](./LICENSE) license.
@@ -184,6 +193,9 @@ This library is published under [Apache-2.0](./LICENSE) license.
184
193
 
185
194
  [Question Circle SVG Vector](https://www.svgrepo.com/svg/522997/question-circle)
186
195
  [Info Circle SVG Vector](https://www.svgrepo.com/svg/522904/info-circle)
196
+ [Copy SVG Vector](https://www.svgrepo.com/svg/522803/copy)
197
+ [Scissors SVG Vector](https://www.svgrepo.com/svg/523012/scissors)
198
+ [Paste SVG Vector](https://www.svgrepo.com/svg/489767/paste)
187
199
 
188
200
  ### **LICENSE:** CC0 License **UPLOADER:** SVG Repo
189
201
 
@@ -52,7 +52,7 @@ class default_1 extends clickgo.core.AbstractApp {
52
52
  return __awaiter(this, void 0, void 0, function* () {
53
53
  var _a;
54
54
  this.run(yield clickgo.form.create(main_1.default, {
55
- 'param': (_a = data.param) !== null && _a !== void 0 ? _a : 'none'
55
+ 'param': (_a = data.param) !== null && _a !== void 0 ? _a : 'none',
56
56
  }));
57
57
  });
58
58
  }
@@ -7,7 +7,7 @@
7
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
8
  <block :style="{'padding': style ? '10px' : undefined}">
9
9
  <block v-for="(line, index) of lineCount">
10
- <button v-if="index > 0 && index % 10 === 0" style="height: 30px;">test</button>
10
+ <button v-if="index > 0 && index % 10 === 0">test</button>
11
11
  <block v-else :style="{'height': sub && (index === 1) ? '50px' : undefined}">Line {{line}}, index: {{index}}.</block>
12
12
  </block>
13
13
  </block>
@@ -40,14 +40,14 @@
40
40
  <!-- button list -->
41
41
  <layout gutter="10">
42
42
  <select v-model="lineValue" :data="[10, 50, 500, 5000]" style="flex: 1; width: 0;"></select>
43
- <button @click="lineCount += parseInt(lineValue[0])" style="height: 30px;">Add lines</button>
44
- <button @click="lineCount -= parseInt(lineValue[0]);if(lineCount < 0) {lineCount = 0;}" style="height: 30px;">Remove lines</button>
43
+ <button @click="lineCount += parseInt(lineValue[0])">Add lines</button>
44
+ <button @click="lineCount -= parseInt(lineValue[0]);if(lineCount < 0) {lineCount = 0;}" >Remove lines</button>
45
45
  </layout>
46
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>
47
+ <button @click="gesture = !gesture" style="flex: 1; width: 0;">{{gesture ? '' : '!'}}gesture</button>
48
+ <button @click="selection = !selection" style="flex: 1; width: 0;">{{selection ? '' : '!'}}selection</button>
49
+ <button @click="style = !style" style="flex: 1; width: 0;">{{style ? '' : '!'}}style</button>
50
+ <button @click="sub = !sub" style="flex: 1; width: 0;">{{sub ? '' : '!'}}sub</button>
51
51
  </layout>
52
52
  </layout>
53
53
  <!-- 自适应 -->
@@ -55,23 +55,23 @@
55
55
  <layout :direction="direction ? 'h' : 'v'" style="flex: 1; height: 0;">
56
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
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>
58
+ <button v-if="index > 0 && index % 10 === 0" :style="{'width': direction ? '30px' : undefined}">test</button>
59
59
  <block v-else :style="{'width': direction ? '80px' : undefined, 'text-align': direction ? 'center' : undefined}">Line {{line}}</block>
60
60
  </layout>
61
61
  </flow>
62
62
  </layout>
63
63
  <label>Scroll Left / Top: {{sLeft4}} / {{sTop4}}, Client Width / Height: {{cWidth4}} / {{cHeight4}}, Scroll Width / Height: {{sWidth4}} / {{sHeight4}}.</label>
64
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>
65
+ <button @click="lineCount += 10" style="flex: 1;">Add 10 lines</button>
66
+ <button @click="lineCount -= 10;if(lineCount < 0) {lineCount = 0;}" style="flex: 1;">Remove 10 lines</button>
67
+ <button @click="direction = !direction" style="flex: 1;">Direction</button>
68
68
  </layout>
69
69
  </layout>
70
70
  <!-- 内容超出 -->
71
71
  <layout v-else-if="ntab === 'beyond'" gutter="10" direction="v" style="flex: 1; width: 0; padding: 10px;">
72
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>
73
+ <button @click="dir5 = (dir5 === 'h' ? 'v' : 'h')" style="flex: 1;">Change direction</button>
74
+ <button @click="line5 = (line5 === 10 ? 1 : 10)" style="flex: 1;">Change data</button>
75
75
  <label>Direction: {{dir5}}</label>
76
76
  </layout>
77
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;">
@@ -24,5 +24,17 @@
24
24
  <icon name="info" size="m"></icon>
25
25
  <label>info</label>
26
26
  </layout>
27
+ <layout gutter="20" align-v="center">
28
+ <icon name="copy"></icon>
29
+ <icon name="copy" size="m"></icon>
30
+ <label>copy</label>
31
+ <icon name="cut"></icon>
32
+ <icon name="cut" size="m"></icon>
33
+ <label>cut</label>
34
+ </layout>
35
+ <layout gutter="20" align-v="center">
36
+ <icon name="paste"></icon>
37
+ <icon name="paste" size="m"></icon>
38
+ </layout>
27
39
  </layout>
28
40
  </form>
@@ -80,11 +80,29 @@ class default_1 extends clickgo.form.AbstractForm {
80
80
  {
81
81
  'control': 'split'
82
82
  },
83
+ {
84
+ 'type': 1
85
+ },
86
+ {
87
+ 'type': 1
88
+ },
89
+ {
90
+ 'type': 1
91
+ },
92
+ {
93
+ 'type': 1
94
+ },
95
+ {
96
+ 'type': 1
97
+ },
98
+ {
99
+ 'type': 1
100
+ },
83
101
  {
84
102
  'type': 1
85
103
  }
86
104
  ];
87
- this.select = [];
105
+ this.select = [11];
88
106
  this.select2 = ['Appraise'];
89
107
  this.label2 = [''];
90
108
  this.listData5 = [
@@ -143,6 +161,7 @@ class default_1 extends clickgo.form.AbstractForm {
143
161
  this.check = false;
144
162
  this.mode = ['default'];
145
163
  this.listDataEmpty = false;
164
+ this.glNone = false;
146
165
  }
147
166
  get sizes() {
148
167
  const rtn = {};
@@ -362,5 +381,7 @@ class default_1 extends clickgo.form.AbstractForm {
362
381
  resolve();
363
382
  });
364
383
  }
384
+ onMounted() {
385
+ }
365
386
  }
366
387
  exports.default = default_1;
@@ -3,7 +3,7 @@
3
3
  <tab v-model="ntab" :tabs="['greatlist', 'adaptation', 'beyond', 'list', 'object', 'async']" style="flex: 1; height: 0;">
4
4
  <!-- 默认 -->
5
5
  <layout v-if="ntab === 'greatlist'" direction="v" style="flex: 1; width: 0; padding: 10px;">
6
- <greatlist v-model="select" :data="slist" :disabled="disabled" :must="must" :multi="multi" :ctrl="ctrl" :selection="selection" :gesture="gesture ? ['top', 'bottom'] : []" :virtual="virtual" :mode="mode[0]" @gesture="onGesture" @add="onGAdd" @Remove="onGRemove" @change="onGChange" @changed="onGChanged" :scroll="scroll" :sizes="sizes" @select="onSelect" style="line-height: 1.3; flex: 1; height: 0;">
6
+ <greatlist v-model="select" :data="slist" :disabled="disabled" :must="must" :multi="multi" :ctrl="ctrl" :selection="selection" :gesture="gesture ? ['top', 'bottom'] : []" :virtual="virtual" :mode="mode[0]" @gesture="onGesture" @add="onGAdd" @Remove="onGRemove" @change="onGChange" @changed="onGChanged" :scroll="scroll" :sizes="sizes" @select="onSelect" style="line-height: 1.3; flex: 1; height: 0;" :style="{'display': glNone ? 'none': undefined}">
7
7
  <template v-slot="data">
8
8
  <layout v-if="data.row.type === 0" align-v="center" gutter="5" style="flex: 1;">
9
9
  <img :src="data.row.src" style="width: 32px; height: 32px;"></img>
@@ -12,7 +12,7 @@
12
12
  <block style="opacity: .7;">{{data.row.path}}</block>
13
13
  </block>
14
14
  </layout>
15
- <template v-else>Other</template>
15
+ <template v-else>Other{{data.index}}</template>
16
16
  </template>
17
17
  <template v-slot:pop>
18
18
  <menulist>
@@ -28,7 +28,7 @@
28
28
  </greatlist>
29
29
  <label class="tip">Right-click (computer) or press and hold (phone) to open the universal menu.</label>
30
30
  <label class="tip">Area: {{selectionArea}}</label>
31
- <button @click="select = [2]" style="margin-top: 10px;">Select [2]</button>
31
+ <button @click="select = [5]" style="margin-top: 10px;">Select [5]</button>
32
32
  </layout>
33
33
  <!-- 自适应 -->
34
34
  <layout v-else-if="ntab === 'adaptation'" direction="v" style="flex: 1; width: 0; padding: 10px;">
@@ -5,7 +5,7 @@
5
5
  <layout direction="v" style="flex: 1; width: 0;">
6
6
  <marquee direction="top" style="border: 1px solid rgba(0, 0, 0, .1); background: #FFF;" :style="{'padding': style ? '10px' : undefined, 'line-height': style ? '1.5' : undefined}">
7
7
  <block v-for="(line, index) of lineCount">
8
- <button v-if="index > 0 && index % 10 === 0" style="height: 30px;">test</button>
8
+ <button v-if="index > 0 && index % 10 === 0">test</button>
9
9
  <block v-else>Line {{line}}, index: {{index}}.</block>
10
10
  </block>
11
11
  </marquee>
@@ -16,7 +16,7 @@
16
16
  </marquee>
17
17
  <marquee :direction="direction" style="flex: 1; height: 0; border: 1px solid rgba(0, 0, 0, .1); background: #FFF;" :style="{'padding': style ? '10px' : undefined, 'line-height': style ? '1.5' : undefined}">
18
18
  <block v-for="(line, index) of lineCount">
19
- <button v-if="index > 0 && index % 10 === 0" style="height: 30px;">test</button>
19
+ <button v-if="index > 0 && index % 10 === 0">test</button>
20
20
  <block v-else>Line {{line}}, index: {{index}}.</block>
21
21
  </block>
22
22
  </marquee>
@@ -24,10 +24,10 @@
24
24
  </layout>
25
25
  <!-- 控制按钮 -->
26
26
  <layout gutter="10">
27
- <button @click="++lineCount" style="height: 30px; flex: 1; width: 0;">Add item</button>
28
- <button @click="--lineCount;if(lineCount < 0){lineCount = 0}" style="height: 30px; flex: 1; width: 0;">Remove item</button>
29
- <button @click="style = !style" style="height: 30px; flex: 1; width: 0;">Change style</button>
27
+ <button @click="++lineCount" style="flex: 1; width: 0;">Add item</button>
28
+ <button @click="--lineCount;if(lineCount < 0){lineCount = 0}" style="flex: 1; width: 0;">Remove item</button>
29
+ <button @click="style = !style" style="flex: 1; width: 0;">Change style</button>
30
30
  </layout>
31
- <button @click="changeDirection" style="height: 30px;">Right bottom: {{direction}}</button>
31
+ <button @click="changeDirection">Right bottom: {{direction}}</button>
32
32
  </layout>
33
33
  </form>
@@ -4,7 +4,7 @@
4
4
  <menulist>
5
5
  <menulist-item alt="A">Item1</menulist-item>
6
6
  <menulist-item alt="B">Item2</menulist-item>
7
- <menulist-item alt="C">
7
+ <menulist-item>
8
8
  <template v-slot>Radio</template>
9
9
  <template v-slot:pop>
10
10
  <menulist>
@@ -12,7 +12,7 @@
12
12
  <menulist-item type="radio" alt="B" v-model="radio" label="radio2">Radio2</menulist-item>
13
13
  <menulist-item type="radio" alt="C" v-model="radio" label="radio3" @check="onRadio">Radio3</menulist-item>
14
14
  <menulist-split></menulist-split>
15
- <menulist-item alt="C">
15
+ <menulist-item>
16
16
  <template v-slot>Check</template>
17
17
  <template v-slot:pop>
18
18
  <menulist>
@@ -26,43 +26,43 @@
26
26
  </menulist>
27
27
  </template>
28
28
  </menulist-item>
29
- <menulist-item alt="D">
29
+ <menulist-item>
30
30
  <template v-slot>Custom</template>
31
31
  <template v-slot:pop>
32
32
  <menulist>
33
- <menulist-item alt="A">
33
+ <menulist-item>
34
34
  <template v-slot>Icon</template>
35
35
  <template v-slot:pop>
36
36
  <menulist>
37
- <menulist-item alt="A"><img src="../../../res/txt.svg" style="width: 16px; height: 16px;" /><label style="margin-left: 10px;">Txt</label></menulist-item>
38
- <menulist-item alt="B"><img src="../../../res/sql.svg" style="width: 16px; height: 16px;" /><label style="margin-left: 10px;">Sql</label></menulist-item>
39
- <menulist-item alt="C"><img src="../../../res/zip.svg" style="width: 16px; height: 16px;" /><label style="margin-left: 10px;">Zip</label></menulist-item>
37
+ <menulist-item alt="A"><img src="../../../res/txt.svg" style="width: 16px; height: 16px;" /><label>Txt</label></menulist-item>
38
+ <menulist-item alt="B"><img src="../../../res/sql.svg" style="width: 16px; height: 16px;" /><label>Sql</label></menulist-item>
39
+ <menulist-item alt="C"><img src="../../../res/zip.svg" style="width: 16px; height: 16px;" /><label>Zip</label></menulist-item>
40
40
  </menulist>
41
41
  </template>
42
42
  </menulist-item>
43
- <menulist-item alt="B">
43
+ <menulist-item>
44
44
  <template v-slot>Control</template>
45
45
  <template v-slot:pop>
46
46
  <menulist>
47
47
  <menulist-item alt="A">
48
- <button @click="$event.stopPropagation()" style="height: 30px; flex: 1; width: 0;">Button</button>
48
+ <button @click="$event.stopPropagation()" style="flex: 1; width: 0;">Button</button>
49
49
  </menulist-item>
50
50
  <menulist-item alt="B">
51
- <scroll direction="h" @click="$event.stopPropagation()" style="height: 30px; width: 150px;"></scroll>
51
+ <scroll direction="h" @click="$event.stopPropagation()" style="width: 150px; height: 30px;"></scroll>
52
52
  </menulist-item>
53
53
  <menulist-item alt="C">
54
- <text @click="$event.stopPropagation()" style="height: 30px; flex: 1; width: 0;"></text>
54
+ <text @click="$event.stopPropagation()" style="flex: 1; width: 0;"></text>
55
55
  </menulist-item>
56
56
  </menulist>
57
57
  </template>
58
58
  </menulist-item>
59
- <menulist-item alt="C">
59
+ <menulist-item>
60
60
  <template v-slot>Free</template>
61
61
  <template v-slot:pop>
62
62
  <menulist>
63
63
  <layout>
64
64
  <menulist-item alt="A">Box 1</menulist-item>
65
- <menulist-item alt="B">
65
+ <menulist-item>
66
66
  <template v-slot>Box 2</template>
67
67
  <template v-slot:pop>
68
68
  <menulist>
@@ -82,7 +82,7 @@
82
82
  <label>Basic:</label>
83
83
  <menulist>
84
84
  <menulist-item alt="E">Item1</menulist-item>
85
- <menulist-item alt="F">
85
+ <menulist-item>
86
86
  <template v-slot>Item2</template>
87
87
  <template v-slot:pop>
88
88
  <menulist>
@@ -18,8 +18,8 @@
18
18
  <layout gutter="10" style="flex: 1; height: 0;">
19
19
  <layout direction="v" gutter="10" style="width: 100px;">
20
20
  <list v-model="file" :data="filesName" :must="false" style="flex: 1;"></list>
21
- <button @click="globalInclude" style="height: 30px;">{{globali ? '' : '!'}}global</button>
22
- <button @click="newInclude" style="height: 30px;">{{newi ? '' : '!'}}new</button>
21
+ <button @click="globalInclude">{{globali ? '' : '!'}}global</button>
22
+ <button @click="newInclude">{{newi ? '' : '!'}}new</button>
23
23
  </layout>
24
24
  <monaco v-if="files[file] !== undefined" v-model="files[file]" language="typescript" style="flex: 1; width: 0;"></monaco>
25
25
  <layout v-else align-v="center" align-h="center" style="flex: 1; width: 0;">Please select file.</layout>
@@ -6,7 +6,7 @@
6
6
  <label>Qs: {{qs}}</label>
7
7
  <label>rootMountData: {{rootMountData}}</label>
8
8
  <button @click="click">Hi</button>
9
- <button @click="sendToRootPanel({'a':1})" style="height: 30px;">sendToRootPanel({'a':1})</button>
9
+ <button @click="sendToRootPanel({'a':1})">sendToRootPanel({'a':1})</button>
10
10
  <button @click="clearQss">clearQs()</button>
11
11
  <button @click="jump">Jump</button>
12
12
  <layout>
@@ -49,6 +49,7 @@ class default_1 extends clickgo.form.AbstractForm {
49
49
  this.v = 0;
50
50
  this.v2 = 20;
51
51
  this.v3 = 60;
52
+ this.v4 = ['default'];
52
53
  }
53
54
  onMounted() {
54
55
  clickgo.tool.sleep(500).then(() => __awaiter(this, void 0, void 0, function* () {
@@ -1,8 +1,9 @@
1
1
  <form title="Progress" width="500" height="400" min-width="300" min-height="400" padding="10">
2
2
  <layout gutter="10" direction="v" style="flex: 1; width: 0;">
3
- <progress v-model="v"></progress>
4
- <progress v-model="v2"></progress>
5
- <progress v-model="v3" style="height: 10px;"></progress>
3
+ <progress v-model="v" :type="v4[0]"></progress>
4
+ <progress v-model="v2" :type="v4[0]"></progress>
5
+ <progress v-model="v3" style="height: 10px;" :type="v4[0]"></progress>
6
6
  <button @click="v3 = v3 === 20 ? 60 : 20">Set to {{v3 === 20 ? '60' : '20'}}</button>
7
+ <select v-model="v4" :data="['default', 'primary', 'info', 'warning', 'danger']"></select>
7
8
  </layout>
8
9
  </form>
@@ -9,7 +9,7 @@
9
9
  <radio v-model="value" :disabled="disabled" value="radio3" style="flex: 1; width: 0;">radio3</radio>
10
10
  <radio v-model="value" :disabled="disabled" value="radio4" @change="onChange" style="flex: 1; width: 0;">radio4 (r2n4)</radio>
11
11
  </layout>
12
- <button @click="value = 'radio2'" style="height: 30px;">Set value to "radio2"</button>
13
- <button @click="disabled = !disabled" style="height: 30px;">{{disabled ? 'Remove' : 'Set'}} disabled</button>
12
+ <button @click="value = 'radio2'">Set value to "radio2"</button>
13
+ <button @click="disabled = !disabled">{{disabled ? 'Remove' : 'Set'}} disabled</button>
14
14
  </layout>
15
15
  </form>
@@ -4,12 +4,12 @@
4
4
  <layout gutter="10" direction="v" style="flex: 1;">
5
5
  <label>Offset: {{so1}}</label>
6
6
  <layout gutter="10">
7
- <button @click="sh1 = (sh1 === 1000 ? 2000 : 1000)" style="height: 30px; flex: 1;">Set length {{sh1 === 1000 ? '2000' : '1000'}}</button>
8
- <button @click="c1 = (c1 === 100 ? 200 : 100)" style="height: 30px; flex: 1;">Set client {{c1 === 100 ? '200' : '100'}}</button>
7
+ <button @click="sh1 = (sh1 === 1000 ? 2000 : 1000)" style="flex: 1;">Set length {{sh1 === 1000 ? '2000' : '1000'}}</button>
8
+ <button @click="c1 = (c1 === 100 ? 200 : 100)" style="flex: 1;">Set client {{c1 === 100 ? '200' : '100'}}</button>
9
9
  </layout>
10
10
  <layout gutter="10">
11
- <button @click="disabled = !disabled" style="height: 30px; flex: 1;">{{disabled ? 'Remove' : 'Set'}} disabled</button>
12
- <button @click="sh1 = 1000;c1 = 2000" style="height: 30px; flex: 1;">Set client > length</button>
11
+ <button @click="disabled = !disabled" style="flex: 1;">{{disabled ? 'Remove' : 'Set'}} disabled</button>
12
+ <button @click="sh1 = 1000;c1 = 2000" style="flex: 1;">Set client > length</button>
13
13
  </layout>
14
14
  </layout>
15
15
  <scroll :length="sh1" :client="c1" v-model:offset="so1" :disabled="disabled" style="width: 20px;"></scroll>
@@ -31,8 +31,8 @@
31
31
  <label>On the left is the flow control.</label>
32
32
  <label>isShow: {{isShow}}</label>
33
33
  </layout>
34
- <button @click="float = !float" style="height: 30px;">{{float ? 'Remove' : 'Set'}} float</button>
35
- <button @click="count += 10" style="height: 30px;">Add 10 lines</button>
34
+ <button @click="float = !float">{{float ? 'Remove' : 'Set'}} float</button>
35
+ <button @click="count += 10">Add 10 lines</button>
36
36
  </layout>
37
37
  </layout>
38
38
  </form>
@@ -127,6 +127,7 @@ class default_1 extends clickgo.form.AbstractForm {
127
127
  '3': []
128
128
  };
129
129
  this.noValue = [];
130
+ this.reward = ['z'];
130
131
  this.disabledList = [];
131
132
  this.unavailableList = [];
132
133
  this.padding = ['m'];
@@ -1,4 +1,4 @@
1
- <form title="Select" width="400" height="650" min-width="300" min-height="400" padding="10">
1
+ <form title="Select" width="450" height="650" min-width="300" min-height="400" padding="10">
2
2
  <layout gutter="10" direction="v" style="flex: 1; width: 0;">
3
3
  <tab v-model="ntab" :tabs="['greatselect', 'select', 'levelselect']" style="flex: 1; height: 0;">
4
4
  <!-- greatselect -->
@@ -89,6 +89,12 @@
89
89
  <select v-model="noValue" :data="['0','1','2','3']" :virtual="virtual" :padding="padding[0]" search style="flex: 1;" />
90
90
  <button @click="noValue = []">Clear</button>
91
91
  </layout>
92
+ <!-- rearward -->
93
+ <label>Rearward: {{reward}}</label>
94
+ <layout gutter="10">
95
+ <select v-model="reward" :data="['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'z']" :virtual="virtual" :padding="padding[0]" style="flex: 1;"></select>
96
+ <button @click="reward[0] = 'z'">z</button>
97
+ </layout>
92
98
  </layout>
93
99
  </flow>
94
100
  <!-- levelselect -->
@@ -51,6 +51,7 @@ class default_1 extends clickgo.form.AbstractForm {
51
51
  this.checked3 = false;
52
52
  this.checked4 = 0;
53
53
  this.disabled = false;
54
+ this.size = ['m'];
54
55
  }
55
56
  onChange(e) {
56
57
  return __awaiter(this, void 0, void 0, function* () {
@@ -2,21 +2,24 @@
2
2
  <layout direction="v" gutter="10" style="flex: 1; width: 0;">
3
3
  <label>Checked: {{checked1}}, {{checked2}}, {{checked3}}</label>
4
4
  <layout gutter="10" align-v="center">
5
- <switch v-model="checked1" :disabled="disabled"></switch>
5
+ <switch v-model="checked1" :disabled="disabled" :size="size[0]"></switch>
6
6
  <label style="flex: 1;">{{checked1 ? 'on' : 'off'}}</label>
7
- <switch v-model="checked2" :disabled="disabled"></switch>
7
+ <switch v-model="checked2" :disabled="disabled" :size="size[0]"></switch>
8
8
  <label style="flex: 1;">{{checked2 ? 'true' : 'false'}}</label>
9
9
  </layout>
10
10
  <layout gutter="10" align-v="center">
11
- <switch v-model="checked3" :disabled="disabled"></switch>
11
+ <switch v-model="checked3" :disabled="disabled" :size="size[0]"></switch>
12
12
  <label style="flex: 1;">{{checked3 ? 'ok' : 'no'}}</label>
13
- <switch :disabled="disabled" @change="onChange" />
13
+ <switch :disabled="disabled" @change="onChange" :size="size[0]"></switch>
14
14
  <label style="flex: 1;">not</label>
15
15
  </layout>
16
16
  <layout gutter="10" align-v="center">
17
- <switch v-model="checked4" :disabled="disabled" :map="{'true':0,'false':1}"></switch>
17
+ <switch v-model="checked4" :disabled="disabled" :map="{'true':0,'false':1}" :size="size[0]"></switch>
18
18
  <label style="flex: 1;">{{checked4}}</label>
19
19
  </layout>
20
- <button @click="disabled = !disabled">{{disabled ? 'Remove' : 'Set'}} disabled</button>
20
+ <layout gutter="10" align-v="center">
21
+ <button @click="disabled = !disabled" style="flex: 1;">{{disabled ? 'Remove' : 'Set'}} disabled</button>
22
+ <select v-model="size" :data="['s', 'm']" style="flex: 1;"></select>
23
+ </layout>
21
24
  </layout>
22
25
  </form>
@@ -5,7 +5,7 @@
5
5
  <!-- v -->
6
6
  <layout gutter="10" style="flex: 1; height: 0;">
7
7
  <vflow 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, 'padding': style ? '10px' : undefined}" class="border" style="flex: 1; width: 0;" :data="lineCount" v-slot="data" :sizes="is">
8
- <button v-if="data.index > 0 && data.index % 10 === 0" style="height: 30px;">test</button>
8
+ <button v-if="data.index > 0 && data.index % 10 === 0">test</button>
9
9
  <block v-else>Line {{data.row}}, index: {{data.index}}<label v-if="content" class="content">ha</label>.</block>
10
10
  </vflow>
11
11
  <layout class="border" style="flex: 1; width: 0;">
@@ -30,14 +30,14 @@
30
30
  <!-- button list -->
31
31
  <layout gutter="10">
32
32
  <select v-model="lineValue" :data="[100, 500, 1000, 10000]" style="flex: 1; width: 0;"></select>
33
- <button @click="lineCount += parseInt(lineValue[0])" style="height: 30px;">Add lines</button>
34
- <button @click="lineCount -= parseInt(lineValue[0]);if(lineCount < 0) {lineCount = 0;}" style="height: 30px;">Remove lines</button>
33
+ <button @click="lineCount += parseInt(lineValue[0])">Add lines</button>
34
+ <button @click="lineCount -= parseInt(lineValue[0]);if(lineCount < 0) {lineCount = 0;}">Remove lines</button>
35
35
  </layout>
36
36
  <layout gutter="10">
37
- <button @click="gesture = !gesture" style="flex: 1; width: 0; height: 30px;">{{gesture ? '' : '!'}}gesture</button>
38
- <button @click="selection = !selection" style="flex: 1; width: 0; height: 30px;">{{selection ? '' : '!'}}selection</button>
39
- <button @click="style = !style" style="flex: 1; width: 0; height: 30px;">{{style ? '' : '!'}}style</button>
40
- <button @click="content = !content" style="flex: 1; width: 0; height: 30px;">{{content ? '' : '!'}}content</button>
37
+ <button @click="gesture = !gesture" style="flex: 1; width: 0;">{{gesture ? '' : '!'}}gesture</button>
38
+ <button @click="selection = !selection" style="flex: 1; width: 0;">{{selection ? '' : '!'}}selection</button>
39
+ <button @click="style = !style" style="flex: 1; width: 0;">{{style ? '' : '!'}}style</button>
40
+ <button @click="content = !content" style="flex: 1; width: 0;">{{content ? '' : '!'}}content</button>
41
41
  </layout>
42
42
  </layout>
43
43
  <!-- 自适应 -->
@@ -45,23 +45,23 @@
45
45
  <layout :direction="direction ? 'h' : 'v'" style="flex: 1; height: 0;">
46
46
  <vflow 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" :data="lineCount" v-slot="data" :sizes="is">
47
47
  <layout align-v="center" direction="v" :class="[direction && 'rightborder']" style="flex: 1;">
48
- <button v-if="data.index > 0 && data.index % 10 === 0" style="height: 30px;" :style="{'width': direction ? '30px' : undefined}">btn</button>
48
+ <button v-if="data.index > 0 && data.index % 10 === 0" :style="{'width': direction ? '30px' : undefined}">btn</button>
49
49
  <block v-else :style="{'width': direction ? '80px' : undefined, 'text-align': direction ? 'center' : undefined}">Line {{data.row}}</block>
50
50
  </layout>
51
51
  </vflow>
52
52
  </layout>
53
53
  <label>Scroll Left / Top: {{sLeft4}} / {{sTop4}}, Client Width / Height: {{cWidth4}} / {{cHeight4}}, Scroll Width / Height: {{sWidth4}} / {{sHeight4}}.</label>
54
54
  <layout gutter="10">
55
- <button @click="lineCount += 10" style="flex: 1; width: 0; height: 30px;">Add 10 lines</button>
56
- <button @click="lineCount -= 10;if(lineCount < 0) {lineCount = 0;}" style="flex: 1; width: 0; height: 30px;">Remove 10 lines</button>
57
- <button @click="direction = !direction" style="flex: 1; height: 30px;">Direction</button>
55
+ <button @click="lineCount += 10" style="flex: 1; width: 0;">Add 10 lines</button>
56
+ <button @click="lineCount -= 10;if(lineCount < 0) {lineCount = 0;}" style="flex: 1; width: 0;">Remove 10 lines</button>
57
+ <button @click="direction = !direction" style="flex: 1;">Direction</button>
58
58
  </layout>
59
59
  </layout>
60
60
  <!-- 内容超出 -->
61
61
  <layout v-else-if="ntab === 'beyond'" gutter="10" direction="v" style="flex: 1; width: 0; padding: 10px;">
62
62
  <layout gutter="10" align-v="center">
63
- <button @click="dir5 = (dir5 === 'h' ? 'v' : 'h')" style="flex: 1; width: 0; height: 30px;">Change direction</button>
64
- <button @click="line5 = (line5 === 10 ? 1 : 10)" style="flex: 1; width: 0; height: 30px;">Change data</button>
63
+ <button @click="dir5 = (dir5 === 'h' ? 'v' : 'h')" style="flex: 1; width: 0;">Change direction</button>
64
+ <button @click="line5 = (line5 === 10 ? 1 : 10)" style="flex: 1; width: 0;">Change data</button>
65
65
  <label>Direction: {{dir5}}</label>
66
66
  </layout>
67
67
  <vflow 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;" :data="line5" v-slot="data">
@@ -80,6 +80,9 @@ class default_1 extends clickgo.form.AbstractForm {
80
80
  get isFull() {
81
81
  return clickgo.dom.is.full;
82
82
  }
83
+ get isDark() {
84
+ return clickgo.dom.is.dark;
85
+ }
83
86
  setGlobalCursor(type) {
84
87
  clickgo.dom.setGlobalCursor(type);
85
88
  }