当前位置:网站首页>时间过滤器(el-table)中使用
时间过滤器(el-table)中使用
2022-06-25 12:20:00 【cc&】
1.main,js设置过滤器
// 定义一个过滤器
Vue.filter('dateFormat', 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}`
})2.table中使用
<el-table-column label="下单时间" prop="create_time" width="180px">
<template slot-scope="scope">
{
{scope.row.create_time |dateFormat}}
</template>
</el-table-column>边栏推荐
- 2021-09-30
- node. JS architecture optimization: reverse proxy and cache service
- 阿里稳定性之故障应急处理流程
- How to implement a high-performance load balancing architecture?
- 百度搜索稳定性问题分析的故事
- Visual studio2019 link opencv
- 3+1保障:高可用系统稳定性是如何炼成的?
- list. replace, str.append
- 微信全文搜索技术优化
- Shell learning notes (latest update: 2022-02-18)
猜你喜欢

Elemntui's select+tree implements the search function

mysql导入导出数据到excel表日期出现问题

Differences between JS and JQ operation objects

C program linking SQLSERVER database: instance failed

2021-10-21
![[data visualization] 360 ° teaching you how to comprehensively learn visualization - Part 1](/img/36/167397ce61240036c865dd99463f1b.jpg)
[data visualization] 360 ° teaching you how to comprehensively learn visualization - Part 1

2021-09-02

The editor is used every day. What is the working principle of language service protocol?

Three jobs! You can learn this from me (attached with graduation vlog)

First acquaintance with CANopen
随机推荐
Jenkins Pipeline使用
Possible problems when idea encounters errors occurred while compiling module (solved)
Why are databases cloud native?
JS uses the for loop in the function to insert and delete the array at the specified position
Singleton mode in PHP to reduce memory consumption
Elemntui's select+tree implements the search function
Baidu search stability analysis story
Differences between JS and JQ operation objects
Wechat full-text search technology optimization
线上服务应急攻关方法论
[Visio]平行四边形在Word中模糊问题解决
词法陷阱(C)
GPS receiver design (1)
量化交易之回测篇 - 期货CTA策略实例(TQZFutureRenkoScalpingStrategy)
JS SMS countdown implementation (simple code)
Drawing cubes with Visio
list. replace, str.append
CUDA error: unspecified launch failure
Serevlt初识
深圳民太安智能二面_秋招第一份offer