English | 简体中文
Introduction
super-tool
This is a useful, handy tool. Based on Vue.js and use the UI Toolkit -- element. I believe whatever your needs are, this project will help you.
This is a useful, handy tool for referencing in the vue project.
- tool: Vue.js
Note: This project uses element-ui@2.3.0+ version, so the minimum compatible vue@2.5.0+
Preparation
You need to install node and git locally. The project is based on ES2015+、vue、vuex、vue-router 和 element-ui. All data requests for this project are simulated using Mock.js. It would be helpful if you have pre-existing knowledge on those.
This project is not a scaffolding and is more of an integrated solution.
Features
- parseDate
- parseDatetime
- getMonDate
- getSunDate
- formatJsAdd
- formatRmbNum
- indexOfArray
配置参数:
方法 | 参数 | 说明 |
---|---|---|
parseDate(argu) | 时间戳/时间对象 | 输出格式: 2018-01-01 |
parseDatetime(argu) | 时间戳/时间对象 | 输出格式: 2018-01-01 12:00:00 |
getMonDate(argu) | 时间戳/时间对象 | 返回指定日期所在周的周一的日期 |
getSunDate(argu) | 时间戳/时间对象 | 返回指定日期所在周的周日的日期 |
formatJsAdd(a,b) | 浮点型 | 修正js浮点型数据相加返回异常 |
formatRmbNum(argu) | 数字/数字字符串 | 金钱格式化,千分位加',',如: 632,230 |
indexOfArray() | (value,array,name = 'name') | 返回array数组中key值为name(默认为'name')对应的val值==value的索引值 |
routes |---index.js |---lib | |---array.js | |---date-time.js | |---num.js
Getting started
# install dependency npm install goodtool --save # develop npm run dev
License
MIT
Copyright (c) 2017-present hukai