@whitesev/utils 2.6.1 → 2.6.3
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/LICENSE +674 -0
- package/dist/index.amd.js +10 -4
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +10 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +10 -4
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +10 -4
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +10 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/UtilsGMCookie.d.ts +3 -4
- package/dist/types/src/types/UtilsGMCookie.d.ts +2 -2
- package/package.json +52 -52
- package/src/Utils.ts +1 -1
- package/src/UtilsGMCookie.ts +13 -9
- package/src/types/UtilsGMCookie.d.ts +2 -2
package/dist/index.system.js
CHANGED
|
@@ -383,7 +383,7 @@ System.register('Utils', [], (function (exports) {
|
|
|
383
383
|
url: this.windowApi.window.location.href,
|
|
384
384
|
name: "",
|
|
385
385
|
value: "",
|
|
386
|
-
domain:
|
|
386
|
+
domain: "",
|
|
387
387
|
path: "/",
|
|
388
388
|
secure: true,
|
|
389
389
|
httpOnly: false,
|
|
@@ -402,6 +402,9 @@ System.register('Utils', [], (function (exports) {
|
|
|
402
402
|
";expires=" +
|
|
403
403
|
new Date(life).toGMTString() +
|
|
404
404
|
"; path=/";
|
|
405
|
+
if (utils.isNotNull(defaultOption.domain)) {
|
|
406
|
+
cookieStr += "; domain=" + defaultOption.domain;
|
|
407
|
+
}
|
|
405
408
|
this.windowApi.document.cookie = cookieStr;
|
|
406
409
|
}
|
|
407
410
|
catch (error) {
|
|
@@ -425,10 +428,13 @@ System.register('Utils', [], (function (exports) {
|
|
|
425
428
|
url: this.windowApi.window.location.href,
|
|
426
429
|
name: "",
|
|
427
430
|
path: "/",
|
|
428
|
-
firstPartyDomain:
|
|
431
|
+
firstPartyDomain: "",
|
|
429
432
|
};
|
|
430
433
|
defaultOption = utils.assign(defaultOption, option);
|
|
431
|
-
let cookieStr = `${defaultOption.name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${defaultOption.path}
|
|
434
|
+
let cookieStr = `${defaultOption.name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${defaultOption.path}`;
|
|
435
|
+
if (utils.isNotNull(defaultOption.firstPartyDomain)) {
|
|
436
|
+
cookieStr += `; domain=${defaultOption.firstPartyDomain};`;
|
|
437
|
+
}
|
|
432
438
|
this.windowApi.document.cookie = cookieStr;
|
|
433
439
|
}
|
|
434
440
|
catch (error) {
|
|
@@ -5040,7 +5046,7 @@ System.register('Utils', [], (function (exports) {
|
|
|
5040
5046
|
this.windowApi = new WindowApi(option);
|
|
5041
5047
|
}
|
|
5042
5048
|
/** 版本号 */
|
|
5043
|
-
version = "2025.
|
|
5049
|
+
version = "2025.3.25";
|
|
5044
5050
|
addStyle(cssText) {
|
|
5045
5051
|
if (typeof cssText !== "string") {
|
|
5046
5052
|
throw new Error("Utils.addStyle 参数cssText 必须为String类型");
|