1 Star 0 Fork 0

karlkidd8080 / k-collection

加入 Gitee
与超过 800 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README.md

Install

 npm install --save k-collection

Example

// if you use require
const kCollection = require('k-collection');
console.log(kCollection,'=====kCollection')

or

// if you use import, you can import
import { kCollection } from  'k-collection';
// or
import kCollection from  'k-collection';
console.log(kCollection,'=====kCollection')

Api

{
  author: "karlkidd",
  install: ƒ (Vue),
  kCloneDeep: v => {},
  kCompressImage: (file, callBack, convertToBase64 = false) => {},
  kCookies: {install: ƒ, setCookie: ƒ, setCookieConfig: ƒ, getCookie: ƒ, delCookie: ƒ},
  kCopyText: ƒ copyText(value),
  kDateFormat: ƒ kDateFormat(fmt, date),
  kDebounce: ƒ kDebounce(fn, wait=1000),
  kExportExcel: ƒ kExportExcel(interfaceParameters),
  kRegExp: {intReg: /^\d{1,}$/, floatReg: /^\d+\.\d+$/, numReg: /^[0-9.]+$/, IMEI: /^\d{15,17}$/, },
  kThrottle: ƒ kThrottle(fn, delay=1000),
  kUserAgent: {uaInfo: 'other', wx: false, ios: false, android: false, wxIos: false, },
  name: "k-collection",
  version: "0.0.02",
}

// If you want use in vue 
vue.use(kCollection)
kCompressImage
kCompressImage(file,callbackFun,false);
callbackFun(res){
  console.log(res)
}
kCookies
{
  delCookie: ƒ delCookie(name),
  getCookie: ƒ getCookie(name),
  install: ƒ (Vue),
  setCookie: ƒ setCookie(key,value,expires,domains,path),
  setCookieObj: ƒ setCookieConfig(obj) // obj is {key,value,expires,domains,path},
}
// if you want set cookie 
kCookies.setCookie(key,value,expires,domains,path)
// or
kCookies.setCookie({key,value,expires,domains,path})
//or
kCookies.setCookieObj({key,value,expires,domains,path})

// get cookie or delect cookie 
kCookies.getCookieObj(name)
kCookies.delCookieObj(name)
kCopyText
kCopyText(string).then(()=>{
  alert('copy success')
})

简介

k-collection 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/karlkidd8080/k-collection.git
git@gitee.com:karlkidd8080/k-collection.git
karlkidd8080
k-collection
k-collection
master

搜索帮助