1.0.5 • Published 5 years ago
conven v1.0.5
Conven
基本样式及组件库
安装
npm install conven --save
# or with yarn
yarn add conven
使用示例
// 使用样式
@import('conven/index.min.css')
// 文本居中及字体色值设置为#fff
<h4 class="txt-center txt-white"></h4>
// 方法
import { setLItem, getLItem } from 'conven'
setLItem('name', 'Jack')
getLItem('name') // Jack
...
已实现的方法
cookie
getCookie
setCookie
storage
getSItem
- setSItem
- removeSItem
- getLItem
- setLItem
- removeLItem
clearLItem
number
randomNum
- randomNumRange
- numSep
2019-03-19 更新
device
isIOS
- isIOS4
- isAndroid
- isAndroid4_3
- isWeixin
isAlipay
date
isLeapYear 判断是否是闰年
- getDaysOfMonth 获取该月的天数
- date2str 格式化时间转为年月日