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 +1 -1
- package/dist/app/demo/form/control/group/group.js +1 -0
- package/dist/app/demo/form/control/group/group.xml +4 -0
- package/dist/clickgo.js +1 -1
- package/dist/clickgo.ts +1 -1
- package/dist/control/common.cgc +0 -0
- package/dist/control/nav.cgc +0 -0
- package/dist/lib/form.js +1 -1
- package/dist/lib/form.ts +3 -3
- package/dist/lib/storage.js +9 -1
- package/dist/lib/storage.ts +9 -1
- package/package.json +1 -1
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.
|
|
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**
|
|
@@ -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
package/dist/clickgo.ts
CHANGED
package/dist/control/common.cgc
CHANGED
|
Binary file
|
package/dist/control/nav.cgc
CHANGED
|
Binary file
|
package/dist/lib/form.js
CHANGED
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 秒,最大
|
|
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 =
|
|
2042
|
+
let timeout = 5_000;
|
|
2043
2043
|
if (opt.timeout !== undefined) {
|
|
2044
2044
|
if (opt.timeout <= 0 || opt.timeout > 30000) {
|
|
2045
|
-
timeout =
|
|
2045
|
+
timeout = 60_000 * 5;
|
|
2046
2046
|
}
|
|
2047
2047
|
else {
|
|
2048
2048
|
timeout = opt.timeout;
|
package/dist/lib/storage.js
CHANGED
|
@@ -93,7 +93,12 @@ function get(key, taskId) {
|
|
|
93
93
|
if (v === null) {
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
96
|
-
|
|
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);
|
package/dist/lib/storage.ts
CHANGED
|
@@ -80,7 +80,12 @@ export function get(key: string, taskId?: number): any {
|
|
|
80
80
|
if (v === null) {
|
|
81
81
|
return null;
|
|
82
82
|
}
|
|
83
|
-
|
|
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 列表 --- */
|