data is requested from the backend to calculate the time. The data is stored with a timestamp. Get the timestamp, and the front end will convert the time how many days ago or a few hours ago. There were only 4 pieces of data in total. As a result, a pile was printed out in the console. I looked at the element-ui document and couldn"t find the reason
. <template>
<el-table
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="SelectionChange">
<el-table-column
label="">
<template slot-scope="date">
<span v-html="formatDate(date.row)"></span>
</template>
</el-table-column>
</el-table>
</template>
<script>
tableData: []
methods:{
formatDate(D){
console.log(new Date(D.date));
}
}
</script>