clickgo 3.10.1 → 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 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.1'}"></script>
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**
@@ -135,17 +135,17 @@ class default_1 extends clickgo.form.AbstractForm {
135
135
  this.list.splice(-1, 1);
136
136
  });
137
137
  }
138
- drop(data) {
138
+ drop(e) {
139
139
  return __awaiter(this, void 0, void 0, function* () {
140
- yield clickgo.form.dialog(JSON.stringify(data));
140
+ yield clickgo.form.dialog(JSON.stringify(e.detail));
141
141
  });
142
142
  }
143
- onSelect(area) {
144
- this.selectionArea = area;
143
+ onSelect(e) {
144
+ this.selectionArea = e.detail.area;
145
145
  }
146
- onOpen(v) {
146
+ onOpen(e) {
147
147
  return __awaiter(this, void 0, void 0, function* () {
148
- yield clickgo.form.dialog('onOpen: ' + v.toString());
148
+ yield clickgo.form.dialog('onOpen: ' + e.detail.value.toString());
149
149
  });
150
150
  }
151
151
  scrollChange() {
@@ -119,6 +119,9 @@ class default_1 extends clickgo.form.AbstractForm {
119
119
  }
120
120
  get listData() {
121
121
  const data = ['Item1', {
122
+ 'label': 'Tip',
123
+ 'color': 'tip'
124
+ }, {
122
125
  'label': 'Title1',
123
126
  'children': [
124
127
  'Sub1',
@@ -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', 'haha4', {
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 = ['haha2'];
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
- return __awaiter(this, void 0, void 0, function* () {
150
- yield clickgo.form.dialog('done');
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
- <levelselect v-model="select3" @label="label3 = $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>
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 = ['title', 'sub2']">Set: ['title', 'sub2']</button>
86
- <button @click="select3 = ['haha2', '60']">Set: ['haha2', '60']</button>
87
- <button @click="select3.length = 0">Clear</button>
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 &amp; 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
- <layout direction="v" gutter="10" style="padding: 10px; flex: 1; width: 0;">
3
- <label>Value: {{val}}</label>
4
- <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">
5
- <template v-slot="d">
6
- <table-item v-if="index" label="index" width="80" sort="false">{{d.index}}</table-item>
7
- <table-item label="name">{{d.row.name ?? 'name'}}</table-item>
8
- <table-item label="size" width="50" align-v="center" align-h="center">{{d.row.type ?? '0'}}</table-item>
9
- <table-item label="col" width="100" direction="v" gutter="5">
10
- <label>line1</label>
11
- <button>line2</button>
12
- </table-item>
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
- <template v-slot:pop>
15
- <menulist>
16
- <menulist-item alt="S" @click="showIndex">Show select</menulist-item>
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>
@@ -97,7 +97,7 @@ class default_1 extends clickgo.form.AbstractForm {
97
97
  this.ntab = '';
98
98
  this.adata = {};
99
99
  }
100
- openForm(name) {
100
+ openForm(name, data) {
101
101
  return __awaiter(this, void 0, void 0, function* () {
102
102
  let frm;
103
103
  switch (name) {
@@ -336,7 +336,7 @@ class default_1 extends clickgo.form.AbstractForm {
336
336
  break;
337
337
  }
338
338
  default: {
339
- frm = yield clickgo.form.create(backpanel_1.default);
339
+ frm = yield clickgo.form.create(backpanel_1.default, data);
340
340
  }
341
341
  }
342
342
  frm.show();
@@ -115,6 +115,7 @@
115
115
  <flow v-else class="inner" direction="v">
116
116
  <layout gutter="10" direction="v">
117
117
  <button @click="openForm('sbackpanel')">Backend panel</button>
118
+ <button @click="openForm('sbackpanel', {'hash': 'test2?p=6'})">Backend panel with hash</button>
118
119
  </layout>
119
120
  </flow>
120
121
  </tab>
@@ -59,5 +59,11 @@ class default_1 extends clickgo.form.AbstractForm {
59
59
  yield clickgo.form.dialog('Show form');
60
60
  });
61
61
  }
62
+ onMounted(data) {
63
+ if (!data.hash) {
64
+ return;
65
+ }
66
+ this.formHash = data.hash;
67
+ }
62
68
  }
63
69
  exports.default = default_1;
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.1';
27
+ const version = '3.10.2';
28
28
  function getVersion() {
29
29
  return version;
30
30
  }
package/dist/clickgo.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- const version = '3.10.1';
16
+ const version = '3.10.2';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.10.1",
3
+ "version": "3.10.2",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",
package/types/index.d.ts CHANGED
@@ -661,6 +661,53 @@ export interface IGreatselectAddEvent extends ICustomEvent {
661
661
  };
662
662
  }
663
663
 
664
+ // --- Iconview Control ---
665
+
666
+ export interface IIconviewItemclickedEvent {
667
+ 'detail': {
668
+ 'event': MouseEvent | TouchEvent;
669
+ 'value': number;
670
+ };
671
+ }
672
+
673
+ export interface IIconviewOpenEvent {
674
+ 'detail': {
675
+ 'value': number[];
676
+ };
677
+ }
678
+
679
+ export interface IIconviewDropEvent {
680
+ 'detail': {
681
+ 'self': boolean;
682
+ 'from': Array<{
683
+ 'index': number;
684
+ 'type': 0 | 1 | -1 | undefined;
685
+ 'path': string;
686
+ }>;
687
+ 'to': {
688
+ 'index': number;
689
+ 'type': 0 | 1 | -1 | undefined;
690
+ 'path': string;
691
+ };
692
+ };
693
+ }
694
+
695
+ export interface IIconviewSelectEvent {
696
+ 'detail': {
697
+ 'area': {
698
+ 'x': number;
699
+ 'y': number;
700
+ 'width': number;
701
+ 'height': number;
702
+ 'shift': boolean;
703
+ 'ctrl': boolean;
704
+ 'start': number;
705
+ 'end': number;
706
+ 'empty': boolean;
707
+ };
708
+ };
709
+ }
710
+
664
711
  // --- List Control ---
665
712
 
666
713
  export interface IListRemoveEvent extends ICustomEvent {
@@ -680,7 +727,7 @@ export interface IListAddEvent extends ICustomEvent {
680
727
  export interface IListItemclickedEvent {
681
728
  'detail': {
682
729
  'event': MouseEvent | TouchEvent;
683
- 'value': number;
730
+ 'value': string;
684
731
  'arrow': boolean;
685
732
  };
686
733
  }