clickgo 3.15.20 → 3.15.22
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/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.22'}"></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/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 列表 --- */
|