<div> {
{date}} </div>
import {
dateToString,getCurrMonthDates} from '../utils/moment';
const timer = ref(null); //定时器
const date = ref(""); //时间
timer.value = setInterval(() => {
date.value = dateToString(new Date(), "YYYY年MM月DD日 HH:mm:ss");
}, 1000);
const gets = getCurrMonthDates() //[ "2022-07-01", "2022-07-31" ]
// moment.js方法
import moment from "moment";
export const dateToString =