feat: 合并1.1.1,升级版本到2.0.8

This commit is contained in:
奔跑的面条
2022-09-27 20:28:47 +08:00
129 changed files with 2438 additions and 28199 deletions
+6 -3
View File
@@ -112,11 +112,13 @@ export const isMac = () => {
/**
* * 挂载监听
*/
// eslint-disable-next-line no-undef
export const addEventListener = <K extends keyof WindowEventMap>(
target: HTMLElement | Document,
type: K,
listener: any,
delay?: number,
// eslint-disable-next-line no-undef
options?: boolean | AddEventListenerOptions | undefined
) => {
if (!target) return
@@ -133,6 +135,7 @@ export const addEventListener = <K extends keyof WindowEventMap>(
/**
* * 卸载监听
*/
// eslint-disable-next-line no-undef
export const removeEventListener = <K extends keyof WindowEventMap>(
target: HTMLElement | Document,
type: K,
@@ -222,12 +225,12 @@ export const intervalUnitHandle = (num: number, unit: RequestHttpIntervalEnum) =
/**
* * 对象转换 cookie 格式
* @param obj
* @param obj
* @returns string
*/
export const objToCookie = (obj: RequestParamsObjType) => {
if(!obj) return ''
if (!obj) return ''
let str = ''
for (const key in obj) {
str += key + '=' + obj[key] + ';'