vue.js时间戳格式转换
来源:互联网 发布:三星手机时钟软件 编辑:程序博客网 时间:2024/05/20 05:09
Vue.filter('moment', function (value, formatString) { formatString = formatString || 'YYYY-MM-DD'; return moment(value).format(formatString);});var vm = new Vue({ el: '#vue_wrapper', data: { navItemWidth: [], navWidth: 0, navItemNum: 0, active: 'tab1', list1: [], allLoaded1: false, list2: [], allLoaded2: false, list3: [], allLoaded3: false, str_currentPage1: 1, str_currentPage2: 1, str_currentPage3: 1, total_page1: 0, total_page2: 0, total_page3: 0, str_pageRow: 10 }, });
<div v-for="item in list1"> <div class="total_li"> <div class="title_left">{{item.newsTitle}}</div> <div class="title_right">{{item.createDate|moment}}</div> </div> </div>
moment是一个处理时间的类库,下载地址http://momentjs.com/downloads/moment.js
阅读全文
0 0
- vue.js时间戳格式转换
- vue.js将unix时间戳转换为自定义时间格式
- vue.js将unix时间戳转换为自定义时间格式
- 【js】vue时间格式转化
- JS将时间戳转换时间格式
- JS 时间戳转换成时间格式
- js时间戳(时间格式转换)
- js时间格式转换
- js时间格式转换
- JS时间格式转换
- js时间格式转换
- js时间格式转换
- js时间格式转换
- JS转换时间格式
- js转换时间格式
- js时间格式转换
- js时间戳、日期格式 互相转换
- js时间戳转换为日期格式
- HttpClientUtil
- linux 下nginx 开启自启动
- 射频识别技术漫谈(5)——防冲突
- 二 iOS之 模仿下载进度—画圆圈
- 运动的方块
- vue.js时间戳格式转换
- 《Linux内核设计与实现》读书笔记(二)- 内核开发的准备
- Python爬虫实战一之爬取糗事百科段子
- HttpClientUtil2
- idea 快捷键大全(不定时更新)
- CNZZ后台偷偷跑广告
- 安卓第三方登录之微信登录(图文详解)
- 集成butterknife最新版本8.6.0
- 代码函数的短小化