new Intl.DateTimeFormat日期格式化
可以针对不同日期格式进行转换
比如:2024/03/16 2024-03-16 2024年03月16日等格式
//1.在main.js文件中引入全局方法
import global from "./utils/global"
//2.组件中使用
created() {
let nowTime = new Date();
let res = this.$global.dateFormatter(nowTime, 'yyyy年MM月dd日HH时mm分ss秒');
console.log('res', res)[......]