当前位置:网站首页>dayjs-----时间格式化
dayjs-----时间格式化
2022-08-10 08:22:00 【cc&】
1.安装
npm install dayjs --save2.封装处理方法
methods: {
// str='默认值' str如果不传 读取默认值'YYYY-MM-DD'
formatDate(value, str = 'YYYY-MM-DD') {
return dayjs(value).format(str)
}
}3.模板使用方法
<el-table-column label="入职时间">
<template #default="{ row }">
{
{ formatDate(row.timeOfEntry)}}
</template>
</el-table-column>边栏推荐
- Introduction to the C language to realize bubble sort
- Obtain - 65 [chances] : "soldiers, subtlety also - 7-36 meter reading - defeat
- 机器人控制器编程实践指导书旧版-实践二 传感器(模拟量)
- Rust learning: 6.5_Array of composite types
- In the SQL SERVER database, if the data of the table is added, deleted, or modified, will the index of the table be recorded in the ldf log?
- Unity—UGUI控件
- Pieces of TensorFlow 2.9 (1)
- Rust学习:6.1_复合类型之切片
- QT下载清华源配置
- 【Unity入门计划】制作RubyAdventure03-使用碰撞体&触发器实现世界交互
猜你喜欢
随机推荐
m.bjhjwy.com全面教学设备 类型包括: 教学仪器, 教学设备 ,
Using the color picker
iwemeta元宇宙:一个娃娃卖9999元,泡泡玛特认为一点也不贵
图像处理用什么神经网络,神经网络提取图片特征
CV-人脸识别-2018:ArcFace
MySQL设置初始密码—注意版本mysql-8.0.30
卷积神经网络卷积层公式,卷积神经网络运算公式
QT下载清华源配置
自动化测试框架Pytest(三)——自定义allure测试报告
UGUI—事件,iTween插件
Unity—UGUI control
张驰课堂:老板会武术,谁也挡不住!六西格玛培训的魅力
.NET-7.WPF learning experience summary
Class Notes (7) (1) - #647. Find the root and the child (root)
机器人控制器编程实践指导书旧版-实践二 传感器(模拟量)
【Rust指南】使用Cargo工具高效创建Rust项目 | 理解Rust特别的输入输出语句
详解构建mock服务最方便的神器——Moco
每日一题,二叉树中增加一行
机器人控制器编程实践指导书旧版-实践一 LED灯(数字量)
组合数模板









