- setCookie(
name: string,
value: string,
options?: {
domain?: string;
expires?: number | Date;
path?: string;
sameSite?: "lax" | "strict" | "none";
secure?: boolean;
},
): boolean Parameters
- name: string
- value: string
- options: {
domain?: string;
expires?: number | Date;
path?: string;
sameSite?: "lax" | "strict" | "none";
secure?: boolean;
} = {}
Returns boolean
将 cookie 设置到浏览器