安装 moment官网 npm安装 npm install moment 引入(在) import moment from 'moment' 使用 this.month.yue=moment(this.month.stime).format('M'); this.month.ri=moment(this.month.stime).format('D');