clickgo 3.12.0 → 3.12.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.
Files changed (47) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/dist/app/demo/form/control/marquee/marquee.xml +4 -4
  4. package/dist/app/demo/form/control/page/page.js +2 -0
  5. package/dist/app/demo/form/control/page/page.xml +6 -1
  6. package/dist/app/demo/form/control/table/table.js +6 -2
  7. package/dist/app/demo/form/control/table/table.xml +27 -2
  8. package/dist/app/demo/form/control/text/text.js +1 -1
  9. package/dist/app/demo/form/control/text/text.xml +6 -0
  10. package/dist/app/demo/form/method/core/core.xml +1 -1
  11. package/dist/clickgo.js +1 -1
  12. package/dist/clickgo.ts +1 -1
  13. package/dist/control/arteditor.cgc +0 -0
  14. package/dist/control/box.cgc +0 -0
  15. package/dist/control/common.cgc +0 -0
  16. package/dist/control/desc.cgc +0 -0
  17. package/dist/control/drawer.cgc +0 -0
  18. package/dist/control/echarts.cgc +0 -0
  19. package/dist/control/form.cgc +0 -0
  20. package/dist/control/iconview.cgc +0 -0
  21. package/dist/control/map.cgc +0 -0
  22. package/dist/control/monaco.cgc +0 -0
  23. package/dist/control/nav.cgc +0 -0
  24. package/dist/control/page.cgc +0 -0
  25. package/dist/control/property.cgc +0 -0
  26. package/dist/control/table.cgc +0 -0
  27. package/dist/control/task.cgc +0 -0
  28. package/dist/control/tuieditor.cgc +0 -0
  29. package/dist/control/tuiviewer.cgc +0 -0
  30. package/dist/control/weditor.cgc +0 -0
  31. package/dist/control/xterm.cgc +0 -0
  32. package/dist/lib/control.js +30 -0
  33. package/dist/lib/control.ts +35 -1
  34. package/dist/lib/core.ts +1 -1
  35. package/dist/lib/dom.ts +1 -1
  36. package/dist/lib/form.ts +1 -1
  37. package/dist/lib/native.ts +1 -1
  38. package/dist/lib/storage.ts +1 -1
  39. package/dist/lib/task.js +6 -0
  40. package/dist/lib/task.ts +13 -1
  41. package/dist/lib/theme.ts +1 -1
  42. package/dist/lib/tool.js +7 -1
  43. package/dist/lib/tool.ts +9 -1
  44. package/dist/theme/byterun.cgt +0 -0
  45. package/dist/theme/familiar.cgt +0 -0
  46. package/dist/theme/light.cgt +0 -0
  47. package/package.json +6 -6
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 2023 MAIYUN.NET
189
+ Copyright 2024 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
@@ -25,7 +25,7 @@ Load the module loader first, and then load it using the module loader.
25
25
  **index.html**
26
26
 
27
27
  ```html
28
- <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.2/dist/loader.min.js?path=index&npm={'clickgo':'3.12.0'}"></script>
28
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.7/dist/loader.min.js?path=index&npm={'clickgo':'3.12.2'}"></script>
29
29
  ```
30
30
 
31
31
  **index.js**
@@ -1,9 +1,9 @@
1
- <form title="Marquee" width="300" height="300" padding="10">
1
+ <form title="Marquee" width="350" height="300" padding="10">
2
2
  <layout gutter="10" direction="v" style="flex: 1; width: 0;">
3
3
  <!-- 左右分 -->
4
4
  <layout gutter="10" style="flex: 1; height: 0;">
5
5
  <layout direction="v" style="flex: 1; width: 0;">
6
- <marquee direction="top" :scroll="scroll" style="border: 1px solid rgba(0, 0, 0, .1); background: #FFF;" :style="{'padding': style ? '10px' : undefined, 'line-height': style ? '1.5' : undefined}">
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
8
  <button v-if="index > 0 && index % 10 === 0" style="height: 30px;">test</button>
9
9
  <block v-else>Line {{line}}, index: {{index}}.</block>
@@ -11,10 +11,10 @@
11
11
  </marquee>
12
12
  </layout>
13
13
  <layout direction="v" gutter="10" style="flex: 1; width: 0;">
14
- <marquee direction="left" :scroll="scroll" style="background: #000; color: #FFF;" :style="{'padding': style ? '10px' : undefined, 'line-height': style ? '1.5' : undefined}">
14
+ <marquee direction="left" style="background: #000; color: #FFF;" :style="{'padding': style ? '10px' : undefined, 'line-height': style ? '1.5' : undefined}">
15
15
  <block v-for="(line, index) of lineCount">Line {{line}}, index: {{index}}.</block>
16
16
  </marquee>
17
- <marquee :direction="direction" :scroll="scroll" 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}">
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
19
  <button v-if="index > 0 && index % 10 === 0" style="height: 30px;">test</button>
20
20
  <block v-else>Line {{line}}, index: {{index}}.</block>
@@ -32,7 +32,9 @@ class default_1 extends clickgo.form.AbstractForm {
32
32
  this.p3 = 30;
33
33
  this.p4 = 50;
34
34
  this.p5 = 1;
35
+ this.p6 = 2;
35
36
  this.total5 = 0;
37
+ this.count6 = 20;
36
38
  this.control = 2;
37
39
  }
38
40
  }
@@ -1,13 +1,18 @@
1
- <form width="700" height="400" title="Page">
1
+ <form width="700" height="500" title="Page">
2
2
  <layout direction="v" gutter="10" style="flex: 1; padding: 10px;">
3
+ <label>count6: {{count6}}</label>
3
4
  <page max="10" :control="control" />
4
5
  <page v-model="p1" max="10" :control="control" />
5
6
  <page v-model="p2" max="30" :control="control" />
6
7
  <page v-model="p3" total="1282" :control="control" />
7
8
  <page v-model="p4" total="1282" count="20" :control="control" />
8
9
  <page v-model="p5" :total="total5" count="20" :control="control" />
10
+ <page v-model="p6" total="1000" v-model:count="count6" :counts="[20,50,100]" :control="control" />
9
11
  <layout gutter="10">
10
12
  <button @click="total5 = total5 ? 0 : 300" style="flex: 2;">total to {{total5 ? 0 : 300}}</button>
13
+ <button @click="count6 = count6 === 20 ? 50 : 20" style="flex: 2;">count6 to {{count6 === 20 ? 50 : 20}}</button>
14
+ </layout>
15
+ <layout gutter="10">
11
16
  <button @click="control=2" style="flex: 2;">control to 2</button>
12
17
  <button @click="control=5" style="flex: 1;">to 5</button>
13
18
  <button @click="control=0" style="flex: 1;">to 0</button>
@@ -44,6 +44,7 @@ class default_1 extends clickgo.form.AbstractForm {
44
44
  this.must = true;
45
45
  this.multi = false;
46
46
  this.ctrl = true;
47
+ this.bottom = false;
47
48
  this.selection = false;
48
49
  this.gesture = false;
49
50
  this.selectionArea = {};
@@ -187,12 +188,14 @@ class default_1 extends clickgo.form.AbstractForm {
187
188
  {
188
189
  'check': false,
189
190
  'type': 0,
190
- 'name': 'Appraise'
191
+ 'name': 'Appraise',
192
+ 'bottom': false
191
193
  },
192
194
  {
193
195
  'check': false,
194
196
  'type': 0,
195
197
  'name': 'Card',
198
+ 'bottom': false
196
199
  },
197
200
  {
198
201
  'check': false,
@@ -205,7 +208,8 @@ class default_1 extends clickgo.form.AbstractForm {
205
208
  },
206
209
  {
207
210
  'check': false,
208
- 'type': 1
211
+ 'type': 1,
212
+ 'bottom': true
209
213
  }
210
214
  ];
211
215
  this.loadFirst = true;
@@ -8,9 +8,12 @@
8
8
  </table-item>
9
9
  <table-item label="name">{{d.row.name ?? 'name'}}</table-item>
10
10
  <table-item label="size" width="80" align-v="center" align-h="center">{{d.row.type ?? '0'}}</table-item>
11
- <table-item label="col" width="100" direction="v" gutter="5" sort="false">
11
+ <table-item label="col" width="120" direction="v" gutter="5" sort="false">
12
12
  <label>line1</label>
13
- <button>line2</button>
13
+ <layout gutter="5">
14
+ <button>line2</button>
15
+ <button v-if="bottom" @click="d.row.bottom = d.row.bottom ? false : true">{{d.row.bottom ? 'close' : 'open'}}</button>
16
+ </layout>
14
17
  </table-item>
15
18
  </template>
16
19
  <template v-slot:pop>
@@ -23,6 +26,27 @@
23
26
  <check :modelValue="checkinfo.selected > 0" @change="onHeaderCheck" :indeterminate="checkinfo.selected > 0 && checkinfo.selected < checkinfo.total">index</check>
24
27
  </layout>
25
28
  </template>
29
+ <!-- bottom -->
30
+ <template v-if="bottom" v-slot:bottom="d">
31
+ <desc v-if="d.row.bottom" style="flex: 1; margin: var(--g-padding); margin-top: 0;">
32
+ <desc-row>
33
+ <desc-head>HEAD1</desc-head>
34
+ <desc-head>HEAD2</desc-head>
35
+ <desc-head>HEAD3</desc-head>
36
+ <desc-head>HEAD4</desc-head>
37
+ </desc-row>
38
+ <desc-row>
39
+ <desc-head>HEAD5</desc-head>
40
+ <desc-cell>CELL1</desc-cell>
41
+ <desc-head>HEAD6</desc-head>
42
+ <desc-cell>CELL2</desc-cell>
43
+ </desc-row>
44
+ <desc-row>
45
+ <desc-head>HEAD7</desc-head>
46
+ <desc-cell colspan="3">CELL1</desc-cell>
47
+ </desc-row>
48
+ </desc>
49
+ </template>
26
50
  </table>
27
51
  <template v-if="loadFirst">
28
52
  <layout gutter="10">
@@ -41,6 +65,7 @@
41
65
  <button style="flex: 1;" @click="disabled = !disabled">{{disabled ? '' : '!'}}disabled</button>
42
66
  <button style="flex: 1;" @click="multi = !multi">{{multi ? '' : '!'}}multi</button>
43
67
  <button style="flex: 1;" @click="ctrl = !ctrl">{{ctrl ? '' : '!'}}ctrl</button>
68
+ <button style="flex: 1;" @click="bottom = !bottom">{{bottom ? '' : '!'}}bottom</button>
44
69
  </layout>
45
70
  <layout gutter="10">
46
71
  <button style="flex: 1;" @click="must = !must">{{must ? '' : '!'}}must</button>
@@ -102,7 +102,7 @@ long`;
102
102
  return;
103
103
  }
104
104
  if (e.detail.value === '1346') {
105
- e.detail.change = '0000';
105
+ e.detail.change = '000000';
106
106
  }
107
107
  }
108
108
  }
@@ -39,6 +39,12 @@
39
39
  <select v-model="type" :data="['text', 'password', 'multi', 'number']" style="flex: 1;"></select>
40
40
  <button @click="maxlength = maxlength === 0 ? 10 : 0" style="flex: 1;">maxlength to {{maxlength === 0 ? 10 : 0}}</button>
41
41
  </layout>
42
+ <layout gutter="10">
43
+ <label>max:</label>
44
+ <label style="flex: 1;">{{max}}</label>
45
+ <label>min:</label>
46
+ <label style="flex: 1;">{{min}}</label>
47
+ </layout>
42
48
  <layout gutter="10">
43
49
  <button @click="max = '200'; min = '10'" style="flex: 1;">max 200 min 10</button>
44
50
  <button @click="max = '20'" style="flex: 1;">max 20</button>
@@ -1,4 +1,4 @@
1
- <form width="350" height="600" title="Library task" padding="10">
1
+ <form width="350" height="600" title="Library core" padding="10">
2
2
  <layout direction="v" gutter="10" style="flex: 1;">
3
3
  <label>config:</label>
4
4
  <text v-model="config" readonly type="multi" style="flex: 1;"></text>
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.12.0';
27
+ const version = '3.12.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.12.0';
16
+ const version = '3.12.2';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -115,6 +115,36 @@ class AbstractControl {
115
115
  return `cg-theme-task${this.taskId}-${this.controlName}_${cla}${this.prep ? (' ' + this.prep + cla) : ''}`;
116
116
  };
117
117
  }
118
+ get alignHComp() {
119
+ if (!this.props.alignH) {
120
+ return undefined;
121
+ }
122
+ switch (this.props.alignH) {
123
+ case 'center': {
124
+ return 'center';
125
+ }
126
+ case 'left':
127
+ case 'start': {
128
+ return 'flex-start';
129
+ }
130
+ }
131
+ return 'flex-end';
132
+ }
133
+ get alignVComp() {
134
+ if (!this.props.alignV) {
135
+ return undefined;
136
+ }
137
+ switch (this.props.alignV) {
138
+ case 'center': {
139
+ return 'center';
140
+ }
141
+ case 'top':
142
+ case 'start': {
143
+ return 'flex-start';
144
+ }
145
+ }
146
+ return 'flex-end';
147
+ }
118
148
  watch(name, cb, opt = {}) {
119
149
  return this.$watch(name, cb, opt);
120
150
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2022 Han Guoshuai <zohegs@gmail.com>
2
+ * Copyright 2024 Han Guoshuai <zohegs@gmail.com>
3
3
 
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -130,6 +130,40 @@ export abstract class AbstractControl {
130
130
  };
131
131
  }
132
132
 
133
+ /** --- 获取 alignH 的 css 属性模式,请确保 props.alignH 存在 --- */
134
+ public get alignHComp(): string | undefined {
135
+ if (!(this.props as any).alignH) {
136
+ return undefined;
137
+ }
138
+ switch ((this.props as any).alignH) {
139
+ case 'center': {
140
+ return 'center';
141
+ }
142
+ case 'left':
143
+ case 'start': {
144
+ return 'flex-start'
145
+ }
146
+ }
147
+ return 'flex-end';
148
+ }
149
+
150
+ /** --- 获取 alignH 的 css 属性模式,请确保 props.alignH 存在 --- */
151
+ public get alignVComp(): string | undefined {
152
+ if (!(this.props as any).alignV) {
153
+ return undefined;
154
+ }
155
+ switch ((this.props as any).alignV) {
156
+ case 'center': {
157
+ return 'center';
158
+ }
159
+ case 'top':
160
+ case 'start': {
161
+ return 'flex-start'
162
+ }
163
+ }
164
+ return 'flex-end';
165
+ }
166
+
133
167
  /**
134
168
  * --- 监视变动 ---
135
169
  * @param name 监视的属性或 prop 值
package/dist/lib/core.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2022 Han Guoshuai <zohegs@gmail.com>
2
+ * Copyright 2024 Han Guoshuai <zohegs@gmail.com>
3
3
 
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
package/dist/lib/dom.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2022 Han Guoshuai <zohegs@gmail.com>
2
+ * Copyright 2024 Han Guoshuai <zohegs@gmail.com>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
package/dist/lib/form.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2022 Han Guoshuai <zohegs@gmail.com>
2
+ * Copyright 2024 Han Guoshuai <zohegs@gmail.com>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2022 Han Guoshuai <zohegs@gmail.com>
2
+ * Copyright 2024 Han Guoshuai <zohegs@gmail.com>
3
3
 
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2023 Han Guoshuai <zohegs@gmail.com>
2
+ * Copyright 2024 Han Guoshuai <zohegs@gmail.com>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
package/dist/lib/task.js CHANGED
@@ -1055,9 +1055,15 @@ function run(url_1) {
1055
1055
  fetch: function (url, init) {
1056
1056
  return tool.fetch(url, init);
1057
1057
  },
1058
+ get: function (url, opt) {
1059
+ return tool.get(url, opt);
1060
+ },
1058
1061
  post: function (url, data, opt) {
1059
1062
  return tool.post(url, data, opt);
1060
1063
  },
1064
+ getResponseJson: function (url, opt) {
1065
+ return tool.getResponseJson(url, opt);
1066
+ },
1061
1067
  postResponseJson: function (url, data, opt) {
1062
1068
  return tool.postResponseJson(url, data, opt);
1063
1069
  },
package/dist/lib/task.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2022 Han Guoshuai <zohegs@gmail.com>
2
+ * Copyright 2024 Han Guoshuai <zohegs@gmail.com>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1186,12 +1186,24 @@ export async function run(url: string | types.IApp, opt: types.ITaskRunOptions =
1186
1186
  fetch: function(url: string, init?: RequestInit): Promise<string | Blob | null> {
1187
1187
  return tool.fetch(url, init);
1188
1188
  },
1189
+ get: function(url: string, opt?: {
1190
+ 'credentials'?: 'include' | 'same-origin' | 'omit';
1191
+ 'headers'?: HeadersInit;
1192
+ }) {
1193
+ return tool.get(url, opt);
1194
+ },
1189
1195
  post: function(url: string, data: Record<string, any> | FormData, opt?: {
1190
1196
  'credentials'?: 'include' | 'same-origin' | 'omit';
1191
1197
  'headers'?: HeadersInit;
1192
1198
  }): Promise<Response | null> {
1193
1199
  return tool.post(url, data, opt);
1194
1200
  },
1201
+ getResponseJson: function(url: string, opt?: {
1202
+ 'credentials'?: 'include' | 'same-origin' | 'omit';
1203
+ 'headers'?: HeadersInit;
1204
+ }): Promise<any | null> {
1205
+ return tool.getResponseJson(url, opt);
1206
+ },
1195
1207
  postResponseJson: function(url: string, data: Record<string, any> | FormData, opt?: {
1196
1208
  'credentials'?: 'include' | 'same-origin' | 'omit';
1197
1209
  'headers'?: HeadersInit;
package/dist/lib/theme.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2022 Han Guoshuai <zohegs@gmail.com>
2
+ * Copyright 2024 Han Guoshuai <zohegs@gmail.com>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
package/dist/lib/tool.js CHANGED
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.queryParse = exports.queryStringify = exports.formatSecond = exports.compar = exports.execCommand = exports.blob2DataUrl = exports.blob2Text = exports.urlAtom = exports.urlResolve = exports.parseUrl = exports.postResponseJson = exports.post = exports.get = exports.fetch = exports.request = exports.rgb2hsl = exports.escapeHTML = exports.getArray = exports.getNumber = exports.getBoolean = exports.random = exports.RANDOM_LUNS = exports.RANDOM_V = exports.RANDOM_LUN = exports.RANDOM_LU = exports.RANDOM_LN = exports.RANDOM_UN = exports.RANDOM_L = exports.RANDOM_U = exports.RANDOM_N = exports.rand = exports.getMimeByPath = exports.stylePrepend = exports.teleportGlue = exports.eventsAttrWrap = exports.layoutClassPrepend = exports.layoutInsertAttr = exports.layoutAddTagClassAndReTagName = exports.styleUrl2DataUrl = exports.match = exports.purify = exports.sleepFrame = exports.nextFrame = exports.sleep = exports.clone = exports.blob2ArrayBuffer = exports.getClassPrototype = void 0;
12
+ exports.queryParse = exports.queryStringify = exports.formatSecond = exports.compar = exports.execCommand = exports.blob2DataUrl = exports.blob2Text = exports.urlAtom = exports.urlResolve = exports.parseUrl = exports.postResponseJson = exports.getResponseJson = exports.post = exports.get = exports.fetch = exports.request = exports.rgb2hsl = exports.escapeHTML = exports.getArray = exports.getNumber = exports.getBoolean = exports.random = exports.RANDOM_LUNS = exports.RANDOM_V = exports.RANDOM_LUN = exports.RANDOM_LU = exports.RANDOM_LN = exports.RANDOM_UN = exports.RANDOM_L = exports.RANDOM_U = exports.RANDOM_N = exports.rand = exports.getMimeByPath = exports.stylePrepend = exports.teleportGlue = exports.eventsAttrWrap = exports.layoutClassPrepend = exports.layoutInsertAttr = exports.layoutAddTagClassAndReTagName = exports.styleUrl2DataUrl = exports.match = exports.purify = exports.sleepFrame = exports.nextFrame = exports.sleep = exports.clone = exports.blob2ArrayBuffer = exports.getClassPrototype = void 0;
13
13
  function getClassPrototype(obj, over = [], level = 0) {
14
14
  if (level === 0) {
15
15
  return getClassPrototype(Object.getPrototypeOf(obj), over, level + 1);
@@ -643,6 +643,12 @@ function post(url, data, opt) {
643
643
  return loader.post(url, data, opt);
644
644
  }
645
645
  exports.post = post;
646
+ function getResponseJson(url, opt) {
647
+ return __awaiter(this, void 0, void 0, function* () {
648
+ return loader.getResponseJson(url, opt);
649
+ });
650
+ }
651
+ exports.getResponseJson = getResponseJson;
646
652
  function postResponseJson(url, data, opt) {
647
653
  return __awaiter(this, void 0, void 0, function* () {
648
654
  return loader.postResponseJson(url, data, opt);
package/dist/lib/tool.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2022 Han Guoshuai <zohegs@gmail.com>
2
+ * Copyright 2024 Han Guoshuai <zohegs@gmail.com>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -820,6 +820,14 @@ export function post(url: string, data: Record<string, any> | FormData, opt?: {
820
820
  return loader.post(url, data, opt);
821
821
  }
822
822
 
823
+ /** --- 发送 get 响应为 json 的网络数据,无需 try,失败返回 null */
824
+ export async function getResponseJson(url: string, opt?: {
825
+ 'credentials'?: 'include' | 'same-origin' | 'omit';
826
+ 'headers'?: HeadersInit;
827
+ }): Promise<any | null> {
828
+ return loader.getResponseJson(url, opt);
829
+ }
830
+
823
831
  /** --- 发送响应为 json 的网络数据,无需 try,失败返回 null --- */
824
832
  export async function postResponseJson(url: string, data: Record<string, any> | FormData, opt?: {
825
833
  'credentials'?: 'include' | 'same-origin' | 'omit';
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.12.0",
3
+ "version": "3.12.2",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",
@@ -19,11 +19,11 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@litert/eslint-plugin-rules": "^0.1.7",
22
- "@litert/loader": "^3.5.2",
23
- "@types/node": "^20.12.5",
24
- "electron": "^29.2.0",
22
+ "@litert/loader": "^3.5.7",
23
+ "@types/node": "^20.14.6",
24
+ "electron": "^31.0.2",
25
25
  "jszip": "^3.10.1",
26
- "terser": "^5.30.3",
27
- "typescript": "^5.4.4"
26
+ "terser": "^5.31.1",
27
+ "typescript": "^5.4.5"
28
28
  }
29
29
  }