time-formating

1.0.5 • Public • Published

时间戳格式化插件

使用说明

# 安装依赖
npm install time-formating --save
 
# 项目引用
import timeFormating from 'time-formating'
Vue.prototype.$timeformater = timeFormating
 
# 组件中使用
this.$timeformater('1528094422381') // 2018-06-04 14:40:22
this.$timeformater('1528094422381','YYYY-MM-DD hh:mm:ss') // 2018-06-04 14:40:22
this.$timeformater('1528094422381','YYYY-MM-DD hh-mm-ss') // 2018-06-04 14-40-22
this.$timeformater('1528094422381','YYYY/MM/DD') // 2018/06/04
this.$timeformater('1528094422381','YYYY/MM/DD hh:mm:ss') // 2018/06/04 14:40:22
this.$timeformater('1528094422381','YYYY/MM/DD hh-mm-ss') // 2018/06/04 14-40-22

Package Sidebar

Install

npm i time-formating

Weekly Downloads

2

Version

1.0.5

License

ISC

Unpacked Size

6.09 kB

Total Files

5

Last publish

Collaborators

  • fuleiyang