npm install vue-moment
首先进行下载
然后再main.js文件中引入:Vue.use(require('vue-moment'));
在视图文件中以插槽的形式进行写入
<template slot-scope="scope">
{{scope.row.rutime|moment("YYYY-MM-DD HH:mm:ss")}}
</template>
效果图:
npm install vue-moment
首先进行下载
然后再main.js文件中引入:Vue.use(require('vue-moment'));
在视图文件中以插槽的形式进行写入
<template slot-scope="scope">
{{scope.row.rutime|moment("YYYY-MM-DD HH:mm:ss")}}
</template>
效果图: