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(key, "", -1);
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
@@ -12,3 +12,10 @@ export type StorageCookieSetOptions = {
12
12
  // 是否加密
13
13
  encrypt?: boolean
14
14
  }
15
+
16
+ export type StorageCookieRemoveOptions = {
17
+ // 路径
18
+ path?: string
19
+ // 域名
20
+ domain?: string
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mrxy-yk",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "A collection of Vue 3 components and utilities",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "mrxy-yk",
4
- "version": "1.13.1",
4
+ "version": "1.13.2",
5
5
  "js-types-syntax": "typescript",
6
6
  "contributions": {
7
7
  "html": {