In my frontend development, I am utilizing vuejs along with element ui. I am faced with the task of rendering a table that includes dates in unix format. To make these dates more user-friendly, I have incorporated moment.js to convert them into a readable format.
However, I have encountered difficulties when trying to implement moment js within a table prop as it fails to display any results.
Below is an example of my code snippet for the table:
<el-table
:data="data"
style="width: 100%"
>
<el-table-column
prop="name"
label="Name"
width="180"
/>
<el-table-column
prop="address"
label="Address"
width="180"
/>
<el-table-column
prop="email"
label="Email"
/>
<el-table-column
prop="moment(due)"
label="Last Activity"
/>
</el-table>
If the moment js function call is removed, the date appears in unix format. However, I require it to be presented in a human-readable form.