clickgo 3.8.5 → 3.8.7

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.8.5'}"></script>
31
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.0/dist/loader.min.js?path=index&npm={'clickgo':'3.8.7'}"></script>
32
32
  ```
33
33
 
34
34
  **index.js**
@@ -30,6 +30,10 @@ class default_1 extends clickgo.form.AbstractForm {
30
30
  this.radio = 'radio1';
31
31
  this.check1 = true;
32
32
  this.check2 = false;
33
+ this.check3 = true;
34
+ }
35
+ onCheck(event) {
36
+ event.preventDefault();
33
37
  }
34
38
  }
35
39
  exports.default = default_1;
@@ -17,6 +17,8 @@
17
17
  <menulist>
18
18
  <menulist-item type="check" alt="A" v-model="check1">Check1</menulist-item>
19
19
  <menulist-item type="check" alt="B" v-model="check2">Check2</menulist-item>
20
+ <menulist-item type="check" alt="C" v-model="check3" @check="onCheck">Check3 (not)</menulist-item>
21
+ <menulist-item type="check" alt="D">Check4 (nov)</menulist-item>
20
22
  </menulist>
21
23
  </template>
22
24
  </menulist-item>
@@ -93,9 +93,12 @@ class default_1 extends clickgo.form.AbstractForm {
93
93
  }
94
94
  ];
95
95
  this.slist2r = [];
96
+ this.addRemoveList = [];
96
97
  this.select2 = ['haha2'];
97
98
  this.aemodel = [];
98
99
  this.label2 = [];
100
+ this.asyncModel = ['1'];
101
+ this.asyncData = [];
99
102
  this.select3 = [];
100
103
  this.label3 = [];
101
104
  this.s3other = false;
@@ -168,6 +171,12 @@ class default_1 extends clickgo.form.AbstractForm {
168
171
  }]);
169
172
  });
170
173
  }
174
+ onAdd(index, value) {
175
+ this.addRemoveList.unshift('@add, index: ' + index.toString() + ', value: ' + value);
176
+ }
177
+ onRemove(index, value) {
178
+ this.addRemoveList.unshift('@remove, index: ' + index.toString() + ', value: ' + value);
179
+ }
171
180
  changeArea() {
172
181
  switch (this.area) {
173
182
  case 'all': {
@@ -183,6 +192,15 @@ class default_1 extends clickgo.form.AbstractForm {
183
192
  }
184
193
  }
185
194
  }
195
+ asyncLoad() {
196
+ const list = ['0', {
197
+ 'label': 'ok',
198
+ 'value': '1'
199
+ }, '2', '3'];
200
+ for (const item of list) {
201
+ this.asyncData.push(item);
202
+ }
203
+ }
186
204
  onMounted() {
187
205
  this.watch(() => this.select.join(','), (n, o) => {
188
206
  let select = [];
@@ -45,7 +45,8 @@
45
45
  <layout gutter="10" direction="v" style="padding: 10px;">
46
46
  <label>Now select value is {{select2}}</label>
47
47
  <label>Label: {{label2}}</label>
48
- <select v-model="select2" @label="label2 = $event" :data="remote ? slist2r : slist2" :disabled="disabled" :editable="editable" :multi="multi" :tree="tree" :async="async" :search="search" :remote="remote" :remote-delay="remoteDelay[0]" :icon="icon" icon-default="../../../res/txt.svg" @load="onLoad" @remote="onRemote" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
48
+ <select v-model="select2" @label="label2 = $event" :data="remote ? slist2r : slist2" :disabled="disabled" :editable="editable" :multi="multi" :tree="tree" :async="async" :search="search" :remote="remote" :remote-delay="remoteDelay[0]" :icon="icon" icon-default="../../../res/txt.svg" @load="onLoad" @remote="onRemote" @add="onAdd" @remove="onRemove" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
49
+ <list :data="addRemoveList" style="height: 100px;"></list>
49
50
  <label>Custom height:</label>
50
51
  <select :data="remote ? slist2r : ['1','2','3','4','5']" :disabled="disabled" :editable="editable" :multi="multi" :tree="tree" :async="async" :search="search" :remote="remote" :remote-delay="remoteDelay[0]" :icon="icon" icon-default="../../../res/txt.svg" style="height: 60px;" @load="onLoad" @remote="onRemote" :style="{'font-size': fontSize ? '16px' : undefined, 'padding': padding ? '15px' : undefined, 'background': background ? 'red' : undefined, 'color': background ? '#FFF' : undefined}"></select>
51
52
  <label>Always editable: {{aemodel}}</label>
@@ -66,6 +67,12 @@
66
67
  <select :data="[0, 100, 500, 1000, 2000]" v-model="remoteDelay" style="flex: 1;"></select>
67
68
  </template>
68
69
  </layout>
70
+ <!-- async 延迟加载 data -->
71
+ <label>Async value: {{asyncModel}}</label>
72
+ <layout gutter="10">
73
+ <select v-model="asyncModel" :data="asyncData" style="flex: 1;"></select>
74
+ <button v-if="!asyncData.length" @click="asyncLoad">Load</button>
75
+ </layout>
69
76
  </layout>
70
77
  </flow>
71
78
  <!-- levelselect -->
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.8.5';
27
+ const version = '3.8.7';
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.8.5';
16
+ const version = '3.8.7';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
Binary file
Binary file
package/dist/lib/task.ts CHANGED
@@ -1170,6 +1170,10 @@ export async function run(url: string | types.IApp, opt: types.ITaskRunOptions =
1170
1170
  compar(before: string[], after: string[]): {
1171
1171
  'remove': Record<string, number>;
1172
1172
  'add': Record<string, number>;
1173
+ 'length': {
1174
+ 'remove': number;
1175
+ 'add': number;
1176
+ };
1173
1177
  } {
1174
1178
  return tool.compar(before, after);
1175
1179
  }
package/dist/lib/tool.js CHANGED
@@ -639,7 +639,11 @@ exports.execCommand = execCommand;
639
639
  function compar(before, after) {
640
640
  const rtn = {
641
641
  'remove': {},
642
- 'add': {}
642
+ 'add': {},
643
+ 'length': {
644
+ 'remove': 0,
645
+ 'add': 0
646
+ }
643
647
  };
644
648
  for (let i = 0; i < before.length; ++i) {
645
649
  const item = before[i];
@@ -647,6 +651,7 @@ function compar(before, after) {
647
651
  continue;
648
652
  }
649
653
  rtn.remove[item] = i;
654
+ ++rtn.length.remove;
650
655
  }
651
656
  for (let i = 0; i < after.length; ++i) {
652
657
  const item = after[i];
@@ -654,6 +659,7 @@ function compar(before, after) {
654
659
  continue;
655
660
  }
656
661
  rtn.add[item] = i;
662
+ ++rtn.length.add;
657
663
  }
658
664
  return rtn;
659
665
  }
package/dist/lib/tool.ts CHANGED
@@ -799,13 +799,25 @@ export function execCommand(ac: string): void {
799
799
  export function compar(before: string[], after: string[]): {
800
800
  'remove': Record<string, number>;
801
801
  'add': Record<string, number>;
802
+ 'length': {
803
+ 'remove': number;
804
+ 'add': number;
805
+ };
802
806
  } {
803
807
  const rtn: {
804
808
  'remove': Record<string, number>;
805
809
  'add': Record<string, number>;
810
+ 'length': {
811
+ 'remove': number;
812
+ 'add': number;
813
+ };
806
814
  } = {
807
815
  'remove': {},
808
- 'add': {}
816
+ 'add': {},
817
+ 'length': {
818
+ 'remove': 0,
819
+ 'add': 0
820
+ }
809
821
  };
810
822
  for (let i = 0; i < before.length; ++i) {
811
823
  const item = before[i];
@@ -813,6 +825,7 @@ export function compar(before: string[], after: string[]): {
813
825
  continue;
814
826
  }
815
827
  rtn.remove[item] = i;
828
+ ++rtn.length.remove;
816
829
  }
817
830
  for (let i = 0; i < after.length; ++i) {
818
831
  const item = after[i];
@@ -820,6 +833,7 @@ export function compar(before: string[], after: string[]): {
820
833
  continue;
821
834
  }
822
835
  rtn.add[item] = i;
836
+ ++rtn.length.add;
823
837
  }
824
838
  return rtn;
825
839
  }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.8.5",
3
+ "version": "3.8.7",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",