clickgo 3.15.21 → 3.15.23

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
@@ -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.7/dist/loader.min.js?path=index&npm={'clickgo':'3.15.21'}"></script>
28
+ <script src="https://cdn.jsdelivr.net/npm/@litert/loader@3.5.7/dist/loader.min.js?path=index&npm={'clickgo':'3.15.23'}"></script>
29
29
  ```
30
30
 
31
31
  **index.js**
@@ -29,6 +29,7 @@ class default_1 extends clickgo.form.AbstractForm {
29
29
  super(...arguments);
30
30
  this.title = 'The title';
31
31
  this.slotTitle = false;
32
+ this.slotRight = false;
32
33
  this.slotFooter = false;
33
34
  }
34
35
  }
@@ -7,6 +7,9 @@
7
7
  <button>test</button>
8
8
  </layout>
9
9
  </template>
10
+ <template v-if="slotRight" v-slot:right>
11
+ <button style="margin-left: 10px;">test</button>
12
+ </template>
10
13
  <flow direction="v" gutter="10" style="flex: 1;">
11
14
  <label>123</label>
12
15
  <button>abc</button>
@@ -33,6 +36,7 @@
33
36
  </layout>
34
37
  <layout gutter="10">
35
38
  <button style="flex: 1;" @click="slotTitle = !slotTitle">{{slotTitle ? '' : '!'}}slotTitle</button>
39
+ <button style="flex: 1;" @click="slotRight = !slotRight">{{slotRight ? '' : '!'}}slotRight</button>
36
40
  <button style="flex: 1;" @click="slotFooter = !slotFooter">{{slotFooter ? '' : '!'}}slotFooter</button>
37
41
  </layout>
38
42
  </layout>
package/dist/clickgo.js CHANGED
@@ -29,7 +29,7 @@ exports.isNative = isNative;
29
29
  exports.getPlatform = getPlatform;
30
30
  exports.isImmersion = isImmersion;
31
31
  exports.hasFrame = hasFrame;
32
- const version = '3.15.21';
32
+ const version = '3.15.23';
33
33
  function getVersion() {
34
34
  return version;
35
35
  }
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.15.21';
16
+ const version = '3.15.23';
17
17
  export function getVersion(): string {
18
18
  return version;
19
19
  }
Binary file
Binary file
package/dist/lib/form.js CHANGED
@@ -1553,7 +1553,7 @@ function notify(opt) {
1553
1553
  let timeout = 5000;
1554
1554
  if (opt.timeout !== undefined) {
1555
1555
  if (opt.timeout <= 0 || opt.timeout > 30000) {
1556
- timeout = 30000;
1556
+ timeout = 60000 * 5;
1557
1557
  }
1558
1558
  else {
1559
1559
  timeout = opt.timeout;
package/dist/lib/form.ts CHANGED
@@ -2033,16 +2033,16 @@ let notifyBottom: number = -10;
2033
2033
  let notifyId: number = 0;
2034
2034
  /**
2035
2035
  * --- 弹出右上角信息框 ---
2036
- * @param opt timeout 默认 5 秒,最大 30
2036
+ * @param opt timeout 默认 5 秒,最大 5 分钟
2037
2037
  */
2038
2038
  export function notify(opt: types.INotifyOptions): number {
2039
2039
  // --- 申请 nid ---
2040
2040
  const nid = ++notifyId;
2041
2041
  // --- 设置 timeout ---
2042
- let timeout = 5000;
2042
+ let timeout = 5_000;
2043
2043
  if (opt.timeout !== undefined) {
2044
2044
  if (opt.timeout <= 0 || opt.timeout > 30000) {
2045
- timeout = 30000;
2045
+ timeout = 60_000 * 5;
2046
2046
  }
2047
2047
  else {
2048
2048
  timeout = opt.timeout;
@@ -93,7 +93,12 @@ function get(key, taskId) {
93
93
  if (v === null) {
94
94
  return null;
95
95
  }
96
- return JSON.parse(v);
96
+ try {
97
+ return JSON.parse(v);
98
+ }
99
+ catch (_a) {
100
+ return null;
101
+ }
97
102
  }
98
103
  function set(key, val, taskId) {
99
104
  if (!taskId) {
@@ -103,6 +108,9 @@ function set(key, val, taskId) {
103
108
  if (!t) {
104
109
  return false;
105
110
  }
111
+ if (val === undefined) {
112
+ return false;
113
+ }
106
114
  const v = JSON.stringify(val);
107
115
  const vsize = textEncoder.encode(v).length;
108
116
  const sizes = localStorage.getItem('clickgo-size-' + t.path);
@@ -80,7 +80,12 @@ export function get(key: string, taskId?: number): any {
80
80
  if (v === null) {
81
81
  return null;
82
82
  }
83
- return JSON.parse(v);
83
+ try {
84
+ return JSON.parse(v);
85
+ }
86
+ catch {
87
+ return null;
88
+ }
84
89
  }
85
90
 
86
91
  /**
@@ -97,6 +102,9 @@ export function set(key: string, val: string | number | any[] | Record<string, a
97
102
  if (!t) {
98
103
  return false;
99
104
  }
105
+ if (val === undefined) {
106
+ return false;
107
+ }
100
108
  const v = JSON.stringify(val);
101
109
  const vsize = textEncoder.encode(v).length;
102
110
  /** --- 当前 app 的 key 所占用的 size 列表 --- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clickgo",
3
- "version": "3.15.21",
3
+ "version": "3.15.23",
4
4
  "description": "Background interface, software interface, mobile phone APP interface operation library.",
5
5
  "keywords": [
6
6
  "deskrt",