File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 2525 <el-table-column align =" center" prop =" created_at" label =" 发布时间" width =" 220" >
2626 <template scope="scope">
2727 <i class =" el-icon-time" ></i >
28- <span >{{scope.row.display_time }}</span >
28+ <span >{{scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}</span >
2929 </template >
3030 </el-table-column >
3131 </el-table >
3434
3535<script >
3636import { fetchList } from ' @/api/article'
37+ import { parseTime } from ' utils'
3738
3839export default {
3940 data () {
@@ -67,7 +68,13 @@ export default {
6768 })
6869 },
6970 formatJson (filterVal , jsonData ) {
70- return jsonData .map (v => filterVal .map (j => v[j]))
71+ return jsonData .map (v => filterVal .map (j => {
72+ if (j === ' timestamp' ) {
73+ return parseTime (v[j])
74+ } else {
75+ return v[j]
76+ }
77+ }))
7178 }
7279 }
7380}
You can’t perform that action at this time.
0 commit comments