mrxy-yk 1.13.1 → 1.13.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StorageCookieSetOptions } from './type';
|
|
1
|
+
import { StorageCookieRemoveOptions, StorageCookieSetOptions } from './type';
|
|
2
2
|
export declare class StorageCookie {
|
|
3
3
|
/**
|
|
4
4
|
* 获取cookie
|
|
@@ -19,6 +19,7 @@ export declare class StorageCookie {
|
|
|
19
19
|
/**
|
|
20
20
|
* 删除cookie
|
|
21
21
|
* @param key
|
|
22
|
+
* @param options
|
|
22
23
|
*/
|
|
23
|
-
static remove(key: string): void;
|
|
24
|
+
static remove(key: string, options?: StorageCookieRemoveOptions): void;
|
|
24
25
|
}
|
|
@@ -63,9 +63,16 @@ var StorageCookie = class {
|
|
|
63
63
|
/**
|
|
64
64
|
* 删除cookie
|
|
65
65
|
* @param key
|
|
66
|
+
* @param options
|
|
66
67
|
*/
|
|
67
|
-
static remove(key) {
|
|
68
|
-
this.set(
|
|
68
|
+
static remove(key, options = {}) {
|
|
69
|
+
this.set({
|
|
70
|
+
path: "/",
|
|
71
|
+
value: "",
|
|
72
|
+
...options,
|
|
73
|
+
key,
|
|
74
|
+
expires: -1
|
|
75
|
+
});
|
|
69
76
|
}
|
|
70
77
|
};
|
|
71
78
|
//#endregion
|
package/package.json
CHANGED