component-shipinlv 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -97,6 +97,7 @@ declare const Tool: {
97
97
  };
98
98
  };
99
99
  store: {
100
+ key(): string;
100
101
  get(name: string): any;
101
102
  set(name: string, value: any): void;
102
103
  };
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('__shan__' + name);
29
+ getData = window.localStorage.getItem("__".concat(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('__shan__' + name, JSON.stringify(saveData));
50
+ window.localStorage.setItem("__".concat(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
@@ -42,6 +42,7 @@ declare namespace Global {
42
42
  webKind: WebKind;
43
43
  version: string;
44
44
  versionReal: string;
45
+ productName: string;
45
46
 
46
47
  douzhuli: WebBaseConfigItem;
47
48
  douxidong: WebBaseConfigItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",