component-shipinlv 0.0.6 → 0.0.8
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/dist/lib/Tool.d.ts +1 -0
- package/dist/lib/Tool.js +6 -2
- package/dist/typings.d.ts +1 -0
- package/package.json +1 -1
package/dist/lib/Tool.d.ts
CHANGED
package/dist/lib/Tool.js
CHANGED
@@ -19,10 +19,14 @@ import PostMessage from "./postMessage";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
20
20
|
var packageJson = require("../../package.json");
|
21
21
|
var store = {
|
22
|
+
key: function key() {
|
23
|
+
var WebBaseConfig = window.WebBaseConfig || {};
|
24
|
+
return "__".concat(WebBaseConfig.webKind, "-").concat(WebBaseConfig.productName, "__");
|
25
|
+
},
|
22
26
|
get: function get(name) {
|
23
27
|
var getData;
|
24
28
|
try {
|
25
|
-
getData = window.localStorage.getItem(
|
29
|
+
getData = window.localStorage.getItem(this.key() + name);
|
26
30
|
if (getData) {
|
27
31
|
getData = JSON.parse(getData);
|
28
32
|
}
|
@@ -43,7 +47,7 @@ var store = {
|
|
43
47
|
value: value
|
44
48
|
};
|
45
49
|
try {
|
46
|
-
window.localStorage.setItem(
|
50
|
+
window.localStorage.setItem(this.key() + name, JSON.stringify(saveData));
|
47
51
|
} catch (e) {
|
48
52
|
console.error('LocalStorage set Error:', e);
|
49
53
|
}
|
package/dist/typings.d.ts
CHANGED