@whitesev/utils 1.1.5 → 1.1.7

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.
@@ -148,7 +148,7 @@ declare class Utils {
148
148
  * 颜色转换
149
149
  * @returns
150
150
  */
151
- ColorConversion(): ColorConversion;
151
+ ColorConversion: typeof ColorConversion;
152
152
  /**
153
153
  * 深拷贝
154
154
  * @param obj 对象
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/utils",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "一个常用的工具库",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/node/index.esm.js",
package/src/Utils.ts CHANGED
@@ -402,9 +402,7 @@ class Utils {
402
402
  * 颜色转换
403
403
  * @returns
404
404
  */
405
- ColorConversion() {
406
- return new ColorConversion();
407
- }
405
+ ColorConversion = ColorConversion;
408
406
  /**
409
407
  * 深拷贝
410
408
  * @param obj 对象
@@ -68,7 +68,7 @@ class UtilsGMCookie {
68
68
  let itemSplit = item.split("=");
69
69
  let itemName = itemSplit[0];
70
70
  itemSplit.splice(0, 1);
71
- let itemValue = itemSplit.join("");
71
+ let itemValue = decodeURIComponent(itemSplit.join(""));
72
72
  if (itemName === cookieName) {
73
73
  findValue = {
74
74
  domain: globalThis.location.hostname,
@@ -116,7 +116,7 @@ class UtilsGMCookie {
116
116
  let itemSplit = item.split("=");
117
117
  let itemName = itemSplit[0];
118
118
  itemSplit.splice(0, 1);
119
- let itemValue = itemSplit.join("");
119
+ let itemValue = decodeURIComponent(itemSplit.join(""));
120
120
  let nameRegexp =
121
121
  (details.name as RegExp) instanceof RegExp
122
122
  ? details.name
@@ -169,7 +169,7 @@ class UtilsGMCookie {
169
169
  let itemSplit = item.split("=");
170
170
  let itemName = itemSplit[0];
171
171
  itemSplit.splice(0, 1);
172
- let itemValue = itemSplit.join("");
172
+ let itemValue = decodeURIComponent(itemSplit.join(""));
173
173
  let nameRegexp =
174
174
  (details.name as RegExp) instanceof RegExp
175
175
  ? details.name