当前位置:网站首页>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>边栏推荐
- 菜鸟、小白在autojs和冰狐智能辅助之间如何选择?
- IDLE development wordCount program (5)
- Unity—UGUI控件
- 【FAQ】【Push Kit】推送服务,回执配置一直报错、回执过期修改、怎么删除配置的回执
- 二叉树 --- 堆
- Pieces of TensorFlow 2.9 (1)
- 手把手教你进行Mysql查询操作
- The implementation of the seemingly useless component (text gradient) in NaiveUI is so simple
- 预测股票涨跌看什么指标,如何预测明天股票走势
- 【Unity入门计划】制作RubyAdventure03-使用碰撞体&触发器实现世界交互
猜你喜欢

如何远程调试对方的H5页面

Uni-app develops WeChat applet using local images as background images

Introduction to the delta method

iwemeta metaverse: a doll sells for 9999 yuan, and Bubble Mart thinks it is not expensive at all

数据库公共字段自动填充

90.(cesium之家)cesium高度监听事件

ABAP Data Types 和XSD Type 映射关系以及XSD Type属性

2022-08-01 Advanced Network Engineering (24) STP Advanced Knowledge

IDLE development wordCount program (5)

短视频同城流量宣传小魔推有何优势?如何给实体商家带来销量?
随机推荐
Compilation failure:找不到符号
大体来讲,网站会被攻击分为几种原因
图像处理用什么神经网络,神经网络提取图片特征
PLSQL学习第一天
什么是长轮询
Solve the problem that the win10win7win8 system cannot find the specified module and cannot register the desert plug-in
菜鸟、小白在autojs和冰狐智能辅助之间如何选择?
navicat for mysql 连接时报错:1251-Client does not support authentication protocol requested by server
同步锁synchronized追本溯源
How AliExpress sellers seize product search weight
PHP笔记 28 29 30 31
js函数聚合的三种实现方式
神经网络的三种训练方法,神经网络训练全过程
基于sklearn的决策树应用实战
Introduction to the C language to realize bubble sort
Synchronization lock synchronized traces the source
关于数据中心的设计方案,数据中心网络规划设计
Summary of ctfshow SSTI knowledge points
【Unity入门计划】2D游戏实现敌人来回移动控制脚本
【业务架构】价值链分析:提高客户价值和盈利能力