1.0.8 • Published 2 years ago

cm-tool2 v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

编译

npm run build

工具说明

  1. cookie_session_storage

    • addCookie(name: string, value: string | number, iDay: number) [添加cookie]
    • getCookie(name: string) [获取cookie]
    • removeCookie(name: string) [删除cookie]
    • clearAllCookie() [删除全部cookie]
    • setStorage(name: string, content: any) [添加storage, 对象需要JSON.stringify()]
    • getStorage(name: string) [获取stroage, 对象需要JSON.parse()]
    • removeStorage(name: string) [移除storage]
    • setSession(name: string, value: any) [添加session]
    • getSession(name: string) [获取session]
    • removeSession(name: string) [移除session]
  2. getQueryVariable(variable: string) [获取url参数]

  3. debounce(fn: () => void , wait: number) [防抖函数,underscore 源码支持取消延迟,loadsh等工具库]
  4. throttle(fn: () => void , wait: number) [节流函数,underscore 源码支持取消延迟,loadsh等工具库]
  5. request 原生请求工具
  6. download_image 图片下载工具
  7. get_richtext_img_src 获取富文本里面的所有图片地址
  8. get_location_search 获取rul参数,以对象形式返回
  9. filter_tree 过滤树形数据
  10. replaceRichTextImg 替换符文中的所有图片标签 例如:替换成【图片】
  11. formatRMB 格式化人民币金额
1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago