当前位置:网站首页>时间戳转格式化日期
时间戳转格式化日期
2022-04-23 05:52:00 【三笑痴513】
定义一个全局过滤器:
Vue.filter('dataFormat',function(originVal){
const dt = new Date(originVal)
const y = dt.getFullYear()
const m = (dt.getMonth() + 1 + '').padStart(2,'0')
const d = (dt.getDate() + '').padStart(2,'0')
const hh = (dt.getHours() + '').padStart(2,'0')
const mm = (dt.getMinutes() + '').padStart(2,'0')
const ss = (dt.getSeconds() + '').padStart(2,'0')
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
})
版权声明
本文为[三笑痴513]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_60248719/article/details/120689478
边栏推荐
- Tabbar implementation of dynamic bottom navigation bar in uniapp, authority management
- Friend function, friend class, class template
- Notes on advanced points of C language 4
- Makefile基础、常用函数及通用Makefile
- 猜數字遊戲
- QT add qserialport class to realize serial port operation
- C language advanced notes 3
- SSH 公钥 私钥的理解
- [UDS unified diagnostic service] IV. typical diagnostic service (2) - data transmission function unit
- Palindromic Primes
猜你喜欢

PN结、二极管原理详解与应用

VHDL 有限状态机(FSM) 代码示例

Opencv uses genericindex for KNN search

Initialization of classes and objects (constructors and destructors)
![C [document operation] PDF files and pictures are converted to each other](/img/6b/0742aa3eb45fbca091d6d20bc55326.png)
C [document operation] PDF files and pictures are converted to each other

CUDA environment installation

信息学一本通-小球

C语言实用小技巧合集(持续更新)

Class inheritance and derivation
![[UDS unified diagnosis service] i. diagnosis overview (2) - main diagnosis protocols (K-line and can)](/img/ec/9b783b6dca5684684485e3b9fc6846.png)
[UDS unified diagnosis service] i. diagnosis overview (2) - main diagnosis protocols (K-line and can)
随机推荐
猜數字遊戲
搭建openstack平台
C语言进阶要点笔记5
[UDS unified diagnostic service] IV. typical diagnostic service (2) - data transmission function unit
如何读文献
Log writing method (with time)
copy constructor
拷贝构造函数
深蓝学院激光slam 理论与实践 第三章激光雷达去畸变 作业习题
C语言进阶要点笔记2
Latex configuration and use
【UDS统一诊断服务】四、诊断典型服务(5)— 功能/元件测试功能单元(例行程序功能单元0x31)
C language advanced notes 3
2022LDU寒假训练-程序补丁
Shell脚本的通配符和特殊符号
Notes on advanced points of C language 2
【UDS统一诊断服务】四、诊断典型服务(1)— 诊断和通信管理功能单元
MOS管特性和导通过程
函数的调用过程
Notes on advanced points of C language 5