错误示范:
<el-table-column prop="createDate" label="登录时间" sortable>
<template slot-scope="scope">
{{
$moment(scope.row.createDate).format("YYYY-MM-DD HH:MM:SS")
}}
</template>
</el-table-column>
正确示范:
<el-table-column prop="createDate" label="登录时间" sortable>
<template slot-scope="scope">
{{
$moment(scope.row.createDate).format("YYYY-MM-DD HH:mm:ss")
}}
</template>
</el-table-column>
所以需要注意,format时,时间格式是区分大小写的。