clickgo 3.11.3 → 3.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/app/demo/form/control/form/form.js +6 -0
- package/dist/app/demo/form/control/form/form.xml +2 -1
- package/dist/app/demo/form/control/panel/test1.js +8 -2
- package/dist/app/demo/form/control/panel/test1.xml +1 -0
- package/dist/app/demo/form/solution/backpanel/backpanel.xml +1 -0
- package/dist/clickgo.js +1 -1
- package/dist/clickgo.ts +1 -1
- package/dist/control/arteditor.cgc +0 -0
- package/dist/control/box.cgc +0 -0
- package/dist/control/common.cgc +0 -0
- package/dist/control/desc.cgc +0 -0
- package/dist/control/echarts.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/html.cgc +0 -0
- package/dist/control/iconview.cgc +0 -0
- package/dist/control/map.cgc +0 -0
- package/dist/control/monaco.cgc +0 -0
- package/dist/control/nav.cgc +0 -0
- package/dist/control/page.cgc +0 -0
- package/dist/control/property.cgc +0 -0
- package/dist/control/table.cgc +0 -0
- package/dist/control/task.cgc +0 -0
- package/dist/control/tuieditor.cgc +0 -0
- package/dist/control/xterm.cgc +0 -0
- package/dist/lib/control.ts +3 -3
- package/dist/lib/form.js +11 -0
- package/dist/lib/form.ts +17 -1
- package/dist/theme/byterun.cgt +0 -0
- package/dist/theme/familiar.cgt +0 -0
- package/dist/theme/light.cgt +0 -0
- package/package.json +1 -1
- package/types/index.d.ts +56 -0
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Load the module loader first, and then load it using the module loader.
|
|
|
28
28
|
**index.html**
|
|
29
29
|
|
|
30
30
|
```html
|
|
31
|
-
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.1/dist/loader.min.js?path=index&npm={'clickgo':'3.11.
|
|
31
|
+
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.1/dist/loader.min.js?path=index&npm={'clickgo':'3.11.4'}"></script>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
**index.js**
|
|
@@ -50,6 +50,7 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
50
50
|
this.resize = true;
|
|
51
51
|
this.floading = false;
|
|
52
52
|
this.border = 'normal';
|
|
53
|
+
this.banClose = false;
|
|
53
54
|
}
|
|
54
55
|
showLoading() {
|
|
55
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -58,5 +59,10 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
58
59
|
this.floading = false;
|
|
59
60
|
});
|
|
60
61
|
}
|
|
62
|
+
onClose(e) {
|
|
63
|
+
if (this.banClose) {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
61
67
|
}
|
|
62
68
|
exports.default = default_1;
|
|
@@ -1,4 +1,4 @@
|
|
|
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="floading" :border="border" direction="v">
|
|
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="floading" :border="border" direction="v" @close="onClose">
|
|
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>
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
<button @click="height = 0">Set height auto</button>
|
|
18
18
|
<button @click="resize = resize ? false : true">{{resize ? 'Disabled' : 'Enabled'}} resize</button>
|
|
19
19
|
<button @click="showLoading">Show loading</button>
|
|
20
|
+
<button @click="banClose = !banClose">{{banClose ? '' : '!'}}banClose</button>
|
|
20
21
|
<layout class="bottom" gutter="10">
|
|
21
22
|
<button @click="border = 'normal'">Normal</button>
|
|
22
23
|
<button @click="border = 'thin'">Thin</button>
|
|
@@ -40,11 +40,11 @@ class default_1 extends clickgo.form.AbstractPanel {
|
|
|
40
40
|
this.data = {};
|
|
41
41
|
this.rootMountData = 'none';
|
|
42
42
|
}
|
|
43
|
-
onShow(
|
|
43
|
+
onShow(e) {
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
yield clickgo.tool.sleep(1000);
|
|
46
46
|
++this.scount;
|
|
47
|
-
this.data =
|
|
47
|
+
this.data = e;
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
onHide() {
|
|
@@ -69,6 +69,12 @@ class default_1 extends clickgo.form.AbstractPanel {
|
|
|
69
69
|
yield clickgo.form.dialog('Hello panel!');
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
+
clearQss() {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
this.clearQs();
|
|
75
|
+
yield clickgo.form.dialog('cleard.');
|
|
76
|
+
});
|
|
77
|
+
}
|
|
72
78
|
onMounted() {
|
|
73
79
|
this.rootMountData = this.rootForm.mountData;
|
|
74
80
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
<label>rootMountData: {{rootMountData}}</label>
|
|
8
8
|
<button @click="click">Hi</button>
|
|
9
9
|
<button @click="sendToRootPanel({'a':1})" style="height: 30px;">sendToRootPanel({'a':1})</button>
|
|
10
|
+
<button @click="clearQss">clearQs()</button>
|
|
10
11
|
<layout>
|
|
11
12
|
<button style="padding: 15px 30px;" area="split">
|
|
12
13
|
Padding 10px 20px with pop
|
package/dist/clickgo.js
CHANGED
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.zip = exports.tool = exports.theme = exports.task = exports.storage = exports.native = exports.fs = exports.form = exports.dom = exports.core = exports.control = exports.vue = exports.hasFrame = exports.isImmersion = exports.getPlatform = exports.isNative = exports.getVersion = void 0;
|
|
27
|
-
const version = '3.11.
|
|
27
|
+
const version = '3.11.4';
|
|
28
28
|
function getVersion() {
|
|
29
29
|
return version;
|
|
30
30
|
}
|
package/dist/clickgo.ts
CHANGED
|
Binary file
|
package/dist/control/box.cgc
CHANGED
|
Binary file
|
package/dist/control/common.cgc
CHANGED
|
Binary file
|
package/dist/control/desc.cgc
CHANGED
|
Binary file
|
package/dist/control/echarts.cgc
CHANGED
|
Binary file
|
package/dist/control/form.cgc
CHANGED
|
Binary file
|
package/dist/control/html.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/map.cgc
CHANGED
|
Binary file
|
package/dist/control/monaco.cgc
CHANGED
|
Binary file
|
package/dist/control/nav.cgc
CHANGED
|
Binary file
|
package/dist/control/page.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/table.cgc
CHANGED
|
Binary file
|
package/dist/control/task.cgc
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/control/xterm.cgc
CHANGED
|
Binary file
|
package/dist/lib/control.ts
CHANGED
|
@@ -128,9 +128,9 @@ export abstract class AbstractControl {
|
|
|
128
128
|
* @param cb 回调
|
|
129
129
|
* @param opt 参数
|
|
130
130
|
*/
|
|
131
|
-
public watch<T extends this & this['props'], TK extends keyof T>(
|
|
132
|
-
name: TK,
|
|
133
|
-
cb: (val: T[TK], old: T[TK]) => void | Promise<void>,
|
|
131
|
+
public watch<T extends this & this['props'], TK extends keyof T, TR>(
|
|
132
|
+
name: TK | (() => TR),
|
|
133
|
+
cb: (val: T[TK] & TR, old: T[TK] & TR) => void | Promise<void>,
|
|
134
134
|
opt: {
|
|
135
135
|
'immediate'?: boolean;
|
|
136
136
|
'deep'?: boolean;
|
package/dist/lib/form.js
CHANGED
|
@@ -275,6 +275,11 @@ class AbstractPanel extends AbstractCommon {
|
|
|
275
275
|
set formHash(fh) {
|
|
276
276
|
this.rootForm.formHash = fh;
|
|
277
277
|
}
|
|
278
|
+
formHashBack() {
|
|
279
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
280
|
+
yield this.rootForm.formHashBack();
|
|
281
|
+
});
|
|
282
|
+
}
|
|
278
283
|
sendToRootPanel(data) {
|
|
279
284
|
this.rootPanel.send(data);
|
|
280
285
|
}
|
|
@@ -288,6 +293,9 @@ class AbstractPanel extends AbstractCommon {
|
|
|
288
293
|
yield this.rootForm.doneStep();
|
|
289
294
|
});
|
|
290
295
|
}
|
|
296
|
+
clearQs() {
|
|
297
|
+
this.qs = {};
|
|
298
|
+
}
|
|
291
299
|
get formFocus() {
|
|
292
300
|
var _a;
|
|
293
301
|
return (_a = this.rootForm.formFocus) !== null && _a !== void 0 ? _a : false;
|
|
@@ -295,6 +303,9 @@ class AbstractPanel extends AbstractCommon {
|
|
|
295
303
|
onShow() {
|
|
296
304
|
return;
|
|
297
305
|
}
|
|
306
|
+
onShowed() {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
298
309
|
onHide() {
|
|
299
310
|
return;
|
|
300
311
|
}
|
package/dist/lib/form.ts
CHANGED
|
@@ -368,6 +368,11 @@ export abstract class AbstractPanel extends AbstractCommon {
|
|
|
368
368
|
this.rootForm.formHash = fh;
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
+
/** --- 将母窗体的 form hash 回退 --- */
|
|
372
|
+
public async formHashBack(): Promise<void> {
|
|
373
|
+
await this.rootForm.formHashBack();
|
|
374
|
+
}
|
|
375
|
+
|
|
371
376
|
/** --- 发送一段数据到自己这个 panel 控件,本质上也是调用的 panel 控件的 send 方法,主要用来实现发送给跳转后的 panel --- */
|
|
372
377
|
public sendToRootPanel(data: Record<string, any>): void {
|
|
373
378
|
this.rootPanel.send(data);
|
|
@@ -392,16 +397,27 @@ export abstract class AbstractPanel extends AbstractCommon {
|
|
|
392
397
|
/** --- 当前的 nav(若有)传递过来的 qs --- */
|
|
393
398
|
public qs: Record<string, string> = {};
|
|
394
399
|
|
|
400
|
+
/** --- 确定不再使用 qs 时可调用此方法清空,这样再次通过相同 qs 进入本 panel 依然会响应 qschange 事件 --- */
|
|
401
|
+
public clearQs() {
|
|
402
|
+
this.qs = {};
|
|
403
|
+
}
|
|
404
|
+
|
|
395
405
|
/** --- 当前窗体是否是焦点 --- */
|
|
396
406
|
public get formFocus(): boolean {
|
|
397
407
|
return this.rootForm.formFocus ?? false;
|
|
398
408
|
}
|
|
399
409
|
|
|
400
|
-
public onShow(
|
|
410
|
+
public onShow(e: types.IAbstractPanelShowEvent): void | Promise<void>;
|
|
401
411
|
public onShow(): void {
|
|
402
412
|
return;
|
|
403
413
|
}
|
|
404
414
|
|
|
415
|
+
public onShowed(): void | Promise<void>;
|
|
416
|
+
/** --- panel 已经完全显示后所要执行的 --- */
|
|
417
|
+
public onShowed() {
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
|
|
405
421
|
public onHide(): void | Promise<void>;
|
|
406
422
|
public onHide(): void {
|
|
407
423
|
return;
|
package/dist/theme/byterun.cgt
CHANGED
|
Binary file
|
package/dist/theme/familiar.cgt
CHANGED
|
Binary file
|
package/dist/theme/light.cgt
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -623,6 +623,62 @@ interface ICustomEvent {
|
|
|
623
623
|
preventDefault: () => void;
|
|
624
624
|
}
|
|
625
625
|
|
|
626
|
+
// --- AbstractPanel ---
|
|
627
|
+
|
|
628
|
+
export interface IAbstractPanelShowEvent {
|
|
629
|
+
'detail': {
|
|
630
|
+
'data': Record<string, any>;
|
|
631
|
+
/** --- 是否是 nav 模式 --- */
|
|
632
|
+
'nav': boolean;
|
|
633
|
+
/** --- 仅 nav 联动时有效,代表是前进还是回退 --- */
|
|
634
|
+
'action': 'forword' | 'back';
|
|
635
|
+
/** --- 仅 nav 联动时有效,代表上一个的 formHash 的值 --- */
|
|
636
|
+
'previous': string;
|
|
637
|
+
/** --- 仅 nav 联动时有效,代表本次 show 的时候 qs 是否发生了变化 --- */
|
|
638
|
+
'qsChange': boolean;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
// --- Form Control ---
|
|
643
|
+
|
|
644
|
+
export interface IFormCloseEvent extends ICustomEvent {
|
|
645
|
+
'detail': {
|
|
646
|
+
'event': MouseEvent;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export interface IFormMaxEvent {
|
|
651
|
+
'detail': {
|
|
652
|
+
'event': MouseEvent | TouchEvent | null;
|
|
653
|
+
'action': 'click' | 'move';
|
|
654
|
+
/** --- 当前是否时最大化状态 --- */
|
|
655
|
+
'max': boolean;
|
|
656
|
+
/** --- 最大化之前的窗体位置 --- */
|
|
657
|
+
'history': {
|
|
658
|
+
'width': number;
|
|
659
|
+
'height': number;
|
|
660
|
+
'left': number;
|
|
661
|
+
'top': number;
|
|
662
|
+
} | null
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
export interface IFormMinEvent {
|
|
667
|
+
'detail': {
|
|
668
|
+
'event': MouseEvent | TouchEvent | null;
|
|
669
|
+
'action': 'click' | 'method';
|
|
670
|
+
/** --- 当前是否时最小化状态 --- */
|
|
671
|
+
'min': boolean;
|
|
672
|
+
/** --- 最小化之前的窗体位置 --- */
|
|
673
|
+
'history': {
|
|
674
|
+
'width': number;
|
|
675
|
+
'height': number;
|
|
676
|
+
'left': number;
|
|
677
|
+
'top': number;
|
|
678
|
+
} | null
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
626
682
|
// --- Greatlist Control ---
|
|
627
683
|
|
|
628
684
|
export interface IGreatlistRemoveEvent extends ICustomEvent {
|