clickgo 3.10.0 → 3.10.2
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 +5 -1
- package/dist/app/demo/config.json +2 -0
- package/dist/app/demo/form/control/form/form.js +3 -3
- package/dist/app/demo/form/control/form/form.xml +1 -1
- package/dist/app/demo/form/control/iconview/iconview.js +6 -6
- package/dist/app/demo/form/control/list/list.js +3 -0
- package/dist/app/demo/form/control/nav/nav.js +4 -3
- package/dist/app/demo/form/control/nav/nav.xml +12 -4
- package/dist/app/demo/form/control/panel/panel.js +27 -7
- package/dist/app/demo/form/control/panel/panel.xml +5 -4
- package/dist/app/demo/form/control/panel/test1.js +6 -0
- package/dist/app/demo/form/control/panel/test1.xml +1 -0
- package/dist/app/demo/form/control/select/select.js +12 -6
- package/dist/app/demo/form/control/select/select.xml +7 -6
- package/dist/app/demo/form/control/table/table.xml +43 -41
- package/dist/app/demo/form/main.js +7 -2
- package/dist/app/demo/form/main.xml +8 -2
- package/dist/app/demo/form/method/aform/aform.js +7 -0
- package/dist/app/demo/form/method/aform/aform.xml +1 -0
- package/dist/app/demo/form/solution/backpanel/backpanel.js +69 -0
- package/dist/app/demo/form/solution/backpanel/backpanel.xml +29 -0
- package/dist/clickgo.js +1 -1
- package/dist/clickgo.ts +1 -1
- package/dist/control/common.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/iconview.cgc +0 -0
- package/dist/control/nav.cgc +0 -0
- package/dist/control/table.cgc +0 -0
- package/dist/lib/control.js +16 -1
- package/dist/lib/control.ts +19 -1
- package/dist/lib/form.js +81 -21
- package/dist/lib/form.ts +94 -24
- package/dist/lib/fs.js +1 -1
- package/dist/lib/fs.ts +1 -1
- package/dist/lib/task.js +2 -2
- package/dist/lib/task.ts +8 -4
- package/dist/lib/tool.js +6 -0
- package/dist/lib/tool.ts +6 -0
- package/package.json +1 -1
- package/types/index.d.ts +74 -1
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.0/dist/loader.min.js?path=index&npm={'clickgo':'3.10.
|
|
31
|
+
<script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'clickgo':'3.10.2'}"></script>
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
**index.js**
|
|
@@ -117,6 +117,10 @@ This library is published under [Apache-2.0](./LICENSE) license.
|
|
|
117
117
|
[Border Radius SVG Vector](https://www.svgrepo.com/svg/446973/border-radius)
|
|
118
118
|
[Copy SVG Vector](https://www.svgrepo.com/svg/446994/copy)
|
|
119
119
|
|
|
120
|
+
#### Select
|
|
121
|
+
|
|
122
|
+
[Close SVG Vector](https://www.svgrepo.com/svg/446990/close)
|
|
123
|
+
|
|
120
124
|
### **LICENSE:** MIT License **AUTHOR:** developmentseed
|
|
121
125
|
|
|
122
126
|
#### Map
|
|
@@ -157,6 +157,8 @@
|
|
|
157
157
|
"/form/method/tool/tool.xml",
|
|
158
158
|
"/form/method/zip/zip.js",
|
|
159
159
|
"/form/method/zip/zip.xml",
|
|
160
|
+
"/form/solution/backpanel/backpanel.js",
|
|
161
|
+
"/form/solution/backpanel/backpanel.xml",
|
|
160
162
|
"/form/main.css",
|
|
161
163
|
"/form/main.js",
|
|
162
164
|
"/form/main.xml",
|
|
@@ -48,14 +48,14 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
48
48
|
this.minWidth = 200;
|
|
49
49
|
this.minHeight = 100;
|
|
50
50
|
this.resize = true;
|
|
51
|
-
this.
|
|
51
|
+
this.floading = false;
|
|
52
52
|
this.border = 'normal';
|
|
53
53
|
}
|
|
54
54
|
showLoading() {
|
|
55
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
this.
|
|
56
|
+
this.floading = true;
|
|
57
57
|
yield clickgo.tool.sleep(1000);
|
|
58
|
-
this.
|
|
58
|
+
this.floading = false;
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -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="
|
|
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">
|
|
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>
|
|
@@ -135,17 +135,17 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
135
135
|
this.list.splice(-1, 1);
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
-
drop(
|
|
138
|
+
drop(e) {
|
|
139
139
|
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
-
yield clickgo.form.dialog(JSON.stringify(
|
|
140
|
+
yield clickgo.form.dialog(JSON.stringify(e.detail));
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
onSelect(
|
|
144
|
-
this.selectionArea = area;
|
|
143
|
+
onSelect(e) {
|
|
144
|
+
this.selectionArea = e.detail.area;
|
|
145
145
|
}
|
|
146
|
-
onOpen(
|
|
146
|
+
onOpen(e) {
|
|
147
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
-
yield clickgo.form.dialog('onOpen: ' +
|
|
148
|
+
yield clickgo.form.dialog('onOpen: ' + e.detail.value.toString());
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
scrollChange() {
|
|
@@ -37,15 +37,16 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
37
37
|
constructor() {
|
|
38
38
|
super(...arguments);
|
|
39
39
|
this.layer = false;
|
|
40
|
+
this.qs = {};
|
|
40
41
|
this.name = '';
|
|
41
42
|
this.isShow = true;
|
|
42
|
-
this.loading = false;
|
|
43
43
|
this.logo = '';
|
|
44
|
+
this.hash = false;
|
|
44
45
|
}
|
|
45
|
-
onSelect(e
|
|
46
|
+
onSelect(e) {
|
|
46
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
48
|
e.preventDefault();
|
|
48
|
-
yield clickgo.form.dialog('Not nav,
|
|
49
|
+
yield clickgo.form.dialog('Not nav, selected: ' + e.detail.selected + ', name: ' + e.detail.name);
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
52
|
onMounted() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<form width="600" height="500" title="Nav"
|
|
2
|
-
<nav v-model="name" v-model:show="isShow" :logo="logo" @layer="layer = $event" style="flex: 1; width: 0;">
|
|
1
|
+
<form width="600" height="500" title="Nav">
|
|
2
|
+
<nav v-model="name" default="Action1" v-model:show="isShow" :logo="logo" @layer="layer = $event" @qs="qs = $event" :hash="hash" style="flex: 1; width: 0;">
|
|
3
3
|
<nav-item label="Title1">
|
|
4
4
|
<nav-title>group1</nav-title>
|
|
5
5
|
<nav-item label="Sub1">
|
|
@@ -39,9 +39,10 @@
|
|
|
39
39
|
<nav-item label="Root2"></nav-item>
|
|
40
40
|
<nav-item label="Root3" name="root?id=1"></nav-item>
|
|
41
41
|
<nav-item label="Root4" name="root?id=2"></nav-item>
|
|
42
|
+
<nav-item label="Root5" name="root"></nav-item>
|
|
42
43
|
<nav-item label="Event" @select="onSelect"></nav-item>
|
|
43
|
-
<nav-item label="
|
|
44
|
-
<nav-item label="
|
|
44
|
+
<nav-item label="Root6" name="root6" icon="/package/res/icon.svg"></nav-item>
|
|
45
|
+
<nav-item label="Root7" icon="/package/res/marker.svg"></nav-item>
|
|
45
46
|
<template v-slot:header>
|
|
46
47
|
<label style="flex: 1; padding-left: 10px;">Test</label>
|
|
47
48
|
<menu>
|
|
@@ -78,10 +79,17 @@
|
|
|
78
79
|
<label>Now select: {{name}}</label>
|
|
79
80
|
<label>Show: {{isShow ? 'true' : 'false'}}</label>
|
|
80
81
|
<label>Layer: {{layer ? 'true' : 'false'}}</label>
|
|
82
|
+
<label>Qs: {{qs}}</label>
|
|
83
|
+
<label>formHash: {{formHash}}</label>
|
|
81
84
|
<button v-if="layer" @click="isShow = true">Open</button>
|
|
82
85
|
<button @click="name = 'Action11'">Select "Action11"</button>
|
|
83
86
|
<button @click="name = 'hasname'">Select "hasname"</button>
|
|
87
|
+
<button @click="name = 'root6?id=8'">Select "root6?id=8"</button>
|
|
84
88
|
<button @click="logo = logo ? '' : '/clickgo/icon.png'">{{logo ? 'Remove' : 'Set'}} logo</button>
|
|
89
|
+
<layout gutter="10">
|
|
90
|
+
<button @click="hash = !hash" style="flex: 1;">{{hash ? '' : '!'}}hash</button>
|
|
91
|
+
<button v-if="hash" @click="formHashBack" style="flex: 1;">hashBack</button>
|
|
92
|
+
</layout>
|
|
85
93
|
</layout>
|
|
86
94
|
</template>
|
|
87
95
|
</nav>
|
|
@@ -41,8 +41,9 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
41
41
|
constructor() {
|
|
42
42
|
super(...arguments);
|
|
43
43
|
this.selected = ['none'];
|
|
44
|
+
this.panelv = '';
|
|
44
45
|
this.parentData = 'yeah!';
|
|
45
|
-
this.
|
|
46
|
+
this.map = null;
|
|
46
47
|
}
|
|
47
48
|
go() {
|
|
48
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -58,22 +59,41 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
58
59
|
'type': 'send'
|
|
59
60
|
});
|
|
60
61
|
}
|
|
62
|
+
changeMap() {
|
|
63
|
+
this.map = this.map ? null : {
|
|
64
|
+
'test1': test1_1.default,
|
|
65
|
+
'test2': './test2'
|
|
66
|
+
};
|
|
67
|
+
}
|
|
61
68
|
onMounted() {
|
|
62
69
|
this.watch('selected', () => __awaiter(this, void 0, void 0, function* () {
|
|
63
70
|
switch (this.selected[0]) {
|
|
64
71
|
case 'none': {
|
|
72
|
+
if (this.map) {
|
|
73
|
+
this.panelv = '';
|
|
74
|
+
}
|
|
65
75
|
break;
|
|
66
76
|
}
|
|
67
77
|
case './test1': {
|
|
68
|
-
this.
|
|
69
|
-
|
|
70
|
-
|
|
78
|
+
if (this.map) {
|
|
79
|
+
this.panelv = 'test1';
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
this.loading = true;
|
|
83
|
+
yield this.refs.panel.go(test1_1.default);
|
|
84
|
+
this.loading = false;
|
|
85
|
+
}
|
|
71
86
|
break;
|
|
72
87
|
}
|
|
73
88
|
case './test2': {
|
|
74
|
-
this.
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
if (this.map) {
|
|
90
|
+
this.panelv = 'test2';
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
this.loading = true;
|
|
94
|
+
yield this.refs.panel.go('./test2');
|
|
95
|
+
this.loading = false;
|
|
96
|
+
}
|
|
77
97
|
break;
|
|
78
98
|
}
|
|
79
99
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
<form width="600" height="500" title="Panel"
|
|
1
|
+
<form width="600" height="500" title="Panel">
|
|
2
2
|
<layout direction="v" gutter="10" style="padding: 10px; flex: 1;">
|
|
3
3
|
<label>Form ID: {{formId}}</label>
|
|
4
4
|
<select v-model="selected" :data="['none', './test1', './test2']"></select>
|
|
5
5
|
<layout gutter="10">
|
|
6
|
-
<button v-if="selected[0] !== './test1'" style="
|
|
7
|
-
<button style="
|
|
6
|
+
<button v-if="selected[0] !== './test1'" style="flex: 1;" @click="go">Go test1 with {'type': 'show'}</button>
|
|
7
|
+
<button style="flex: 1;" @click="ssend">send {'type': 'send'}</button>
|
|
8
|
+
<button style="flex: 1;" @click="changeMap">{{map ? '' : '!'}}map</button>
|
|
8
9
|
</layout>
|
|
9
|
-
<panel ref="panel" style="flex: 1;"></panel>
|
|
10
|
+
<panel ref="panel" v-model="panelv" :map="map" @go="loading=true" @went="loading=false" style="flex: 1;"></panel>
|
|
10
11
|
</layout>
|
|
11
12
|
</form>
|
|
@@ -57,6 +57,12 @@ class default_1 extends clickgo.form.AbstractPanel {
|
|
|
57
57
|
yield clickgo.form.dialog('test1 got data.');
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
+
onQsChange() {
|
|
61
|
+
clickgo.form.notify({
|
|
62
|
+
'title': 'Test1 Panel',
|
|
63
|
+
'content': 'onQsChange: ' + Object.keys(this.qs).length.toString()
|
|
64
|
+
});
|
|
65
|
+
}
|
|
60
66
|
click() {
|
|
61
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
68
|
yield clickgo.form.dialog('Hello panel!');
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<label>onShow count: {{scount}}</label>
|
|
4
4
|
<label>Data: {{data}}</label>
|
|
5
5
|
<label>Parent data: {{rootForm.parentData}}</label>
|
|
6
|
+
<label>Qs: {{qs}}</label>
|
|
6
7
|
<button @click="click" style="height: 30px;">Hi</button>
|
|
7
8
|
<layout>
|
|
8
9
|
<button style="padding: 15px 30px;" area="split">
|
|
@@ -68,7 +68,10 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
68
68
|
];
|
|
69
69
|
this.select = [];
|
|
70
70
|
this.slist2 = [
|
|
71
|
-
'haha1', 'haha2', 'haha3',
|
|
71
|
+
'haha1', 'haha2', 'haha3', {
|
|
72
|
+
'label': 'tip',
|
|
73
|
+
'color': 'tip'
|
|
74
|
+
}, 'haha4', {
|
|
72
75
|
'value': 'ha5',
|
|
73
76
|
'label': 'The value is ha5'
|
|
74
77
|
}, {
|
|
@@ -93,13 +96,14 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
93
96
|
}
|
|
94
97
|
];
|
|
95
98
|
this.addRemoveList = [];
|
|
96
|
-
this.select2 = ['
|
|
99
|
+
this.select2 = ['haha21111'];
|
|
97
100
|
this.aemodel = [];
|
|
98
101
|
this.label2 = [];
|
|
99
102
|
this.asyncModel = ['1'];
|
|
100
103
|
this.asyncData = [];
|
|
101
|
-
this.select3 =
|
|
102
|
-
this.label3 =
|
|
104
|
+
this.select3 = '';
|
|
105
|
+
this.label3 = '';
|
|
106
|
+
this.level3 = [];
|
|
103
107
|
this.s3other = false;
|
|
104
108
|
this.slist3r = ['a', 'b', 'c', 'haha3'];
|
|
105
109
|
this.padding = false;
|
|
@@ -146,8 +150,10 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
146
150
|
});
|
|
147
151
|
}
|
|
148
152
|
onLoaded() {
|
|
149
|
-
|
|
150
|
-
|
|
153
|
+
clickgo.form.notify({
|
|
154
|
+
'type': 'info',
|
|
155
|
+
'title': 'Levelselect @loaded',
|
|
156
|
+
'content': 'Done'
|
|
151
157
|
});
|
|
152
158
|
}
|
|
153
159
|
onRemote(value, resolve) {
|
|
@@ -80,11 +80,12 @@
|
|
|
80
80
|
<layout gutter="10" direction="v" style="padding: 10px;">
|
|
81
81
|
<label>Now select value is {{select3}}</label>
|
|
82
82
|
<label>Label: {{label3}}</label>
|
|
83
|
-
<
|
|
83
|
+
<label>Level: {{level3}}</label>
|
|
84
|
+
<levelselect v-model="select3" @label="label3 = $event" @level="level3 = $event" :data="s3other ? slist3r : slist2" :disabled="disabled" :editable="editable" :multi="multi" :async="async" placeholder="Please enter" @load="onLoad" @loaded="onLoaded" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></levelselect>
|
|
84
85
|
<button @click="async = !async">{{async ? '' : '!'}}async</button>
|
|
85
|
-
<button @click="select3 =
|
|
86
|
-
<button @click="select3 =
|
|
87
|
-
<button @click="select3
|
|
86
|
+
<button @click="select3 = 'title'">Set: 'title'</button>
|
|
87
|
+
<button @click="select3 = 'haha2'">Set: 'haha2'</button>
|
|
88
|
+
<button @click="select3 = ''">Clear</button>
|
|
88
89
|
<button @click="s3other = !s3other">Set {{s3other ? 'this' : 'other'}} data</button>
|
|
89
90
|
</layout>
|
|
90
91
|
</flow>
|
|
@@ -92,7 +93,7 @@
|
|
|
92
93
|
<layout gutter="10">
|
|
93
94
|
<button @click="disabled = !disabled" style="flex: 1;">{{disabled ? '' : '!'}}disabled</button>
|
|
94
95
|
<button v-if="ntab === 'greatselect'" @click="changeArea" style="flex: 1;">Area: {{area}}</button>
|
|
95
|
-
<button v-else @click="editable = !editable" style="flex: 1;">{{editable ? '' : '!'}}editable</button>
|
|
96
|
+
<button v-else-if="ntab === 'select'" @click="editable = !editable" style="flex: 1;">{{editable ? '' : '!'}}editable</button>
|
|
96
97
|
</layout>
|
|
97
98
|
<layout gutter="10">
|
|
98
99
|
<button @click="fontSize = !fontSize" style="flex: 1;">Change font size</button>
|
|
@@ -100,7 +101,7 @@
|
|
|
100
101
|
</layout>
|
|
101
102
|
<layout gutter="10">
|
|
102
103
|
<button @click="background = !background" style="flex: 1;">Change bg & color</button>
|
|
103
|
-
<button @click="multi = !multi" style="flex: 1;">{{multi ? '' : '!'}}multi</button>
|
|
104
|
+
<button v-if="ntab !== 'levelselect'" @click="multi = !multi" style="flex: 1;">{{multi ? '' : '!'}}multi</button>
|
|
104
105
|
</layout>
|
|
105
106
|
</layout>
|
|
106
107
|
</form>
|
|
@@ -1,43 +1,45 @@
|
|
|
1
|
-
<form width="400" height="500" title="Table">
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<label>
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
<form width="400" height="500" title="Table" padding="10">
|
|
2
|
+
<flow direction="v" style="flex: 1; width: 0;">
|
|
3
|
+
<layout direction="v" gutter="10" style="flex: 1;">
|
|
4
|
+
<label>Value: {{val}}</label>
|
|
5
|
+
<table :data="data" :style="{'flex': adaptation ? undefined : '1'}" v-model="val" :disabled="disabled" :must="must" :multi="multi" :ctrl="ctrl" :selection="selection" :gesture="gesture ? ['top', 'bottom'] : []" :split="split" @gesture="onGesture" :scroll="scroll" :sizes="sizes" :sort="sort" @select="onSelect" @sort="onSort">
|
|
6
|
+
<template v-slot="d">
|
|
7
|
+
<table-item v-if="index" label="index" width="80" sort="false">{{d.index}}</table-item>
|
|
8
|
+
<table-item label="name">{{d.row.name ?? 'name'}}</table-item>
|
|
9
|
+
<table-item label="size" width="50" align-v="center" align-h="center">{{d.row.type ?? '0'}}</table-item>
|
|
10
|
+
<table-item label="col" width="100" direction="v" gutter="5">
|
|
11
|
+
<label>line1</label>
|
|
12
|
+
<button>line2</button>
|
|
13
|
+
</table-item>
|
|
14
|
+
</template>
|
|
15
|
+
<template v-slot:pop>
|
|
16
|
+
<menulist>
|
|
17
|
+
<menulist-item alt="S" @click="showIndex">Show select</menulist-item>
|
|
18
|
+
</menulist>
|
|
19
|
+
</template>
|
|
20
|
+
</table>
|
|
21
|
+
<template v-if="loadFirst">
|
|
22
|
+
<layout gutter="10">
|
|
23
|
+
<button style="flex: 1;" @click="data.splice(-2, 0, {'type': 0, 'name': 'Card' + data.length, 'disabled': false});refreshSort()">Add</button>
|
|
24
|
+
<button style="flex: 1;" @click="data.splice(-3, 1);refreshSort()">Remove</button>
|
|
25
|
+
<button style="flex: 1;" @click="scrollChange">Scroll {{scroll}}</button>
|
|
26
|
+
<button style="flex: 1;" @click="adaptation = !adaptation">{{adaptation ? '' : '!'}}adaptation</button>
|
|
27
|
+
</layout>
|
|
28
|
+
<layout gutter="10">
|
|
29
|
+
<button style="flex: 1;" @click="disabled = !disabled">{{disabled ? '' : '!'}}disabled</button>
|
|
30
|
+
<button style="flex: 1;" @click="multi = !multi">{{multi ? '' : '!'}}multi</button>
|
|
31
|
+
<button style="flex: 1;" @click="ctrl = !ctrl">{{ctrl ? '' : '!'}}ctrl</button>
|
|
32
|
+
<button style="flex: 1;" @click="must = !must">{{must ? '' : '!'}}must</button>
|
|
33
|
+
<button style="flex: 1;" @click="index = !index">{{index ? '' : '!'}}index</button>
|
|
34
|
+
</layout>
|
|
35
|
+
<layout gutter="10">
|
|
36
|
+
<button style="flex: 1;" @click="sortChange">sort {{sort ? 'true' : (sort === false ? 'false' : 'undefined')}}</button>
|
|
37
|
+
<button style="flex: 1;" @click="selection = !selection">{{selection ? '' : '!'}}selection</button>
|
|
38
|
+
<button style="flex: 1;" @click="gesture = !gesture">{{gesture ? '' : '!'}}gesture</button>
|
|
39
|
+
<button style="flex: 1;" @click="split = !split">{{split ? '' : '!'}}split</button>
|
|
40
|
+
</layout>
|
|
13
41
|
</template>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</menulist>
|
|
18
|
-
</template>
|
|
19
|
-
</table>
|
|
20
|
-
<template v-if="loadFirst">
|
|
21
|
-
<layout gutter="10">
|
|
22
|
-
<button style="flex: 1;" @click="data.splice(-2, 0, {'type': 0, 'name': 'Card' + data.length, 'disabled': false});refreshSort()">Add</button>
|
|
23
|
-
<button style="flex: 1;" @click="data.splice(-3, 1);refreshSort()">Remove</button>
|
|
24
|
-
<button style="flex: 1;" @click="scrollChange">Scroll {{scroll}}</button>
|
|
25
|
-
<button style="flex: 1;" @click="adaptation = !adaptation">{{adaptation ? '' : '!'}}adaptation</button>
|
|
26
|
-
</layout>
|
|
27
|
-
<layout gutter="10">
|
|
28
|
-
<button style="flex: 1;" @click="disabled = !disabled">{{disabled ? '' : '!'}}disabled</button>
|
|
29
|
-
<button style="flex: 1;" @click="multi = !multi">{{multi ? '' : '!'}}multi</button>
|
|
30
|
-
<button style="flex: 1;" @click="ctrl = !ctrl">{{ctrl ? '' : '!'}}ctrl</button>
|
|
31
|
-
<button style="flex: 1;" @click="must = !must">{{must ? '' : '!'}}must</button>
|
|
32
|
-
<button style="flex: 1;" @click="index = !index">{{index ? '' : '!'}}index</button>
|
|
33
|
-
</layout>
|
|
34
|
-
<layout gutter="10">
|
|
35
|
-
<button style="flex: 1;" @click="sortChange">sort {{sort ? 'true' : (sort === false ? 'false' : 'undefined')}}</button>
|
|
36
|
-
<button style="flex: 1;" @click="selection = !selection">{{selection ? '' : '!'}}selection</button>
|
|
37
|
-
<button style="flex: 1;" @click="gesture = !gesture">{{gesture ? '' : '!'}}gesture</button>
|
|
38
|
-
<button style="flex: 1;" @click="split = !split">{{split ? '' : '!'}}split</button>
|
|
39
|
-
</layout>
|
|
40
|
-
</template>
|
|
41
|
-
<button v-else @click="load">Load</button>
|
|
42
|
-
</layout>
|
|
42
|
+
<button v-else @click="load">Load</button>
|
|
43
|
+
</layout>
|
|
44
|
+
</flow>
|
|
43
45
|
</form>
|
|
@@ -90,13 +90,14 @@ const task_2 = __importDefault(require("./method/task/task"));
|
|
|
90
90
|
const theme_1 = __importDefault(require("./method/theme/theme"));
|
|
91
91
|
const tool_1 = __importDefault(require("./method/tool/tool"));
|
|
92
92
|
const zip_1 = __importDefault(require("./method/zip/zip"));
|
|
93
|
+
const backpanel_1 = __importDefault(require("./solution/backpanel/backpanel"));
|
|
93
94
|
class default_1 extends clickgo.form.AbstractForm {
|
|
94
95
|
constructor() {
|
|
95
96
|
super(...arguments);
|
|
96
97
|
this.ntab = '';
|
|
97
98
|
this.adata = {};
|
|
98
99
|
}
|
|
99
|
-
openForm(name) {
|
|
100
|
+
openForm(name, data) {
|
|
100
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
102
|
let frm;
|
|
102
103
|
switch (name) {
|
|
@@ -330,8 +331,12 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
330
331
|
frm = yield clickgo.form.create(tool_1.default);
|
|
331
332
|
break;
|
|
332
333
|
}
|
|
333
|
-
|
|
334
|
+
case 'mzip': {
|
|
334
335
|
frm = yield clickgo.form.create(zip_1.default);
|
|
336
|
+
break;
|
|
337
|
+
}
|
|
338
|
+
default: {
|
|
339
|
+
frm = yield clickgo.form.create(backpanel_1.default, data);
|
|
335
340
|
}
|
|
336
341
|
}
|
|
337
342
|
frm.show();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<form width="400" height="550" title="ClickGo demo" icon="/package/res/icon.svg">
|
|
2
|
-
<tab v-model="ntab" :tabs="['control', 'method', 'event']" style="margin: 10px; flex: 1;">
|
|
2
|
+
<tab v-model="ntab" :tabs="['control', 'method', 'event', 'solution']" style="margin: 10px; flex: 1;">
|
|
3
3
|
<flow v-if="ntab === 'control'" class="inner" direction="v">
|
|
4
4
|
<layout class="buttons" gutter="10" direction="v">
|
|
5
5
|
<label>App data: {{adata}}</label>
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
<button @click="openForm('msystem')">System</button>
|
|
105
105
|
</layout>
|
|
106
106
|
</flow>
|
|
107
|
-
<flow v-else class="inner" direction="v">
|
|
107
|
+
<flow v-else-if="ntab === 'event'" class="inner" direction="v">
|
|
108
108
|
<layout gutter="10" direction="v">
|
|
109
109
|
<button @click="openForm('escreen')">About screen</button>
|
|
110
110
|
<button @click="openForm('eform')">About form</button>
|
|
@@ -112,5 +112,11 @@
|
|
|
112
112
|
<button @click="openForm('eother')">About other</button>
|
|
113
113
|
</layout>
|
|
114
114
|
</flow>
|
|
115
|
+
<flow v-else class="inner" direction="v">
|
|
116
|
+
<layout gutter="10" direction="v">
|
|
117
|
+
<button @click="openForm('sbackpanel')">Backend panel</button>
|
|
118
|
+
<button @click="openForm('sbackpanel', {'hash': 'test2?p=6'})">Backend panel with hash</button>
|
|
119
|
+
</layout>
|
|
120
|
+
</flow>
|
|
115
121
|
</tab>
|
|
116
122
|
</form>
|
|
@@ -64,6 +64,13 @@ class default_1 extends clickgo.form.AbstractForm {
|
|
|
64
64
|
this.dr = yield frm.showDialog();
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
+
showLoading() {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
this.loading = true;
|
|
70
|
+
yield clickgo.tool.sleep(1000);
|
|
71
|
+
this.loading = false;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
67
74
|
onMounted() {
|
|
68
75
|
this.watch('test', () => __awaiter(this, void 0, void 0, function* () {
|
|
69
76
|
yield clickgo.form.dialog('test changed.');
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
<label>{{formHash}}</label>
|
|
31
31
|
</layout>
|
|
32
32
|
<button @click="formHashBack">formHashBack()</button>
|
|
33
|
+
<button @click="showLoading">Show loading</button>
|
|
33
34
|
<layout gutter="10" align-v="center">
|
|
34
35
|
<label>Form Hash:</label>
|
|
35
36
|
<text v-model="hash" style="flex: 1; width: 0;"></text>
|
|
@@ -0,0 +1,69 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
const clickgo = __importStar(require("clickgo"));
|
|
39
|
+
const test1_1 = __importDefault(require("../../control/panel/test1"));
|
|
40
|
+
class default_1 extends clickgo.form.AbstractForm {
|
|
41
|
+
constructor() {
|
|
42
|
+
super(...arguments);
|
|
43
|
+
this.fh = '';
|
|
44
|
+
this.name = '';
|
|
45
|
+
this.map = {
|
|
46
|
+
'test1': test1_1.default,
|
|
47
|
+
'test2': '../../control/panel/test2'
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
onFormHashChange(taskId, formId, value) {
|
|
51
|
+
if (formId !== this.formId) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.fh = value;
|
|
55
|
+
}
|
|
56
|
+
onSelect(e) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
e.preventDefault();
|
|
59
|
+
yield clickgo.form.dialog('Show form');
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
onMounted(data) {
|
|
63
|
+
if (!data.hash) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.formHash = data.hash;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.default = default_1;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<form width="800" height="500" title="Backend Panel" padding="10">
|
|
2
|
+
<layout direction="v" gutter="10" style="flex: 1;">
|
|
3
|
+
<layout gutter="10" align-v="center">
|
|
4
|
+
<label>formHash:</label>
|
|
5
|
+
<text v-model="fh" style="flex: 1;" />
|
|
6
|
+
<button @click="formHash = fh">Change</button>
|
|
7
|
+
</layout>
|
|
8
|
+
<nav v-model="name" default="list" hash style="flex: 1;">
|
|
9
|
+
<nav-item label="User">
|
|
10
|
+
<nav-item label="All list" name="list"></nav-item>
|
|
11
|
+
<nav-item label="Available" name="list?avail=1"></nav-item>
|
|
12
|
+
</nav-item>
|
|
13
|
+
<nav-item label="Goods">
|
|
14
|
+
<nav-item label="Available" name="goodslist?avail=1"></nav-item>
|
|
15
|
+
<nav-item label="Unavailable" name="goodslist?avail=0"></nav-item>
|
|
16
|
+
</nav-item>
|
|
17
|
+
<nav-item label="Form" name="form" @select="onSelect"></nav-item>
|
|
18
|
+
<nav-item label="Test1" name="test1"></nav-item>
|
|
19
|
+
<nav-item label="Test1QS" name="test1?a=1&b=2"></nav-item>
|
|
20
|
+
<nav-item label="Test2" name="test2"></nav-item>
|
|
21
|
+
<template v-slot:header>
|
|
22
|
+
<label style="flex: 1; text-align: right; padding-right: var(--g-padding);">Panel</label>
|
|
23
|
+
</template>
|
|
24
|
+
<template v-slot:content>
|
|
25
|
+
<panel :map="map" style="flex: 1;" @go="loading = true" @went="loading = false"></panel>
|
|
26
|
+
</template>
|
|
27
|
+
</nav>
|
|
28
|
+
</layout>
|
|
29
|
+
</form>
|
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.10.
|
|
27
|
+
const version = '3.10.2';
|
|
28
28
|
function getVersion() {
|
|
29
29
|
return version;
|
|
30
30
|
}
|
package/dist/clickgo.ts
CHANGED