过滤器格式化时间

This commit is contained in:
jiutianzhiyu 2021-03-30 06:18:49 +08:00
parent 40facf16f0
commit 7421fd70bb
2 changed files with 13 additions and 1 deletions

View File

@ -16,9 +16,17 @@ import router from './router'
import '@/icons' // icon
import '@/permission' // permission control
// 第三方组件全局注册
import Component from '@/components'
Vue.use(Component)
// 批量注册
import * as myfilter from '@/filters'
// 遍历注册
for (const key in myfilter) {
Vue.filter(key, myfilter[key])
}
/**
* If you don't want to use mock-server
* you want to use MockJs for mock api

View File

@ -18,7 +18,11 @@
<el-table-column label="手机号" sortable="" prop="mobile" />
<el-table-column label="聘用形式" sortable="" prop="formOfEmployment" :formatter="formatEmployment" />
<el-table-column label="部门" sortable="" prop="departmentName" />
<el-table-column label="入职时间" sortable="" prop="timeOfEntry" />
<el-table-column label="入职时间" sortable="" prop="timeOfEntry">
<template slot-scope="{row}">
{{ row.timeOfEntry | formatDate }}
</template>
</el-table-column>
<el-table-column label="账户状态" sortable="" prop="enableState" />
<el-table-column label="操作" fixed="right" width="280">
<template>