引入moment.js
npm install moment --save
或
yarn add moment
直接在所需要的組件中引入
<script> let moment = require("moment"); moment.locale('zh-cn')//漢化 export default { data(){ return{ } } </script>
轉自 https://blog.csdn.net/hailangtuteng/article/details/80309950