在main.js中
import moment from 'moment'
Vue.prototype.moment = moment;
在文件中使用
const systemTime = this.moment(new Date()).format('YYYY-MM-DD');
在main.js中
import moment from 'moment'
Vue.prototype.moment = moment;
在文件中使用
const systemTime = this.moment(new Date()).format('YYYY-MM-DD');