rz-func
v1.0.1
Published
> 瑞智云公共方法库
Downloads
6
Readme
rz common function js
瑞智云公共方法库
发布
npm login #登录
npm publish #发布
npm version patch #1.0.1 表示小的bug修复
npm version minor #1.1.0 表示新增一些小功能
npm version mmajor #2.0.0 表示大的版本或大升级
npm version preminor #1.1.0-0 后面多了个0,表示预发布
安装
$ npm install rz-func -S
全局引用main.js
import $rzFunc from 'rz-func'
Vue.prototype.$rzFunc = $rzFunc
页面调用
this.$rzFunc.getRandStr(n) #获取n位随机数
this.$rzFunc.getCurTime() #获取当前时间
this.$rzFunc.parseQueryString(str) #获取url参数
this.$rzFunc.getCookie(k) #获取cookie
this.$rzFunc.setCookie(k, v) #设置cookie
this.$rzFunc.delCookie(k) #删除cookie
this.$rzFunc.hasPermissions(k,v) #判断用户权限