feat:添加周信息

This commit is contained in:
1708-huayu 2025-08-29 19:03:02 +08:00
parent 9fb6be8bb3
commit f07dd23fc9
2 changed files with 6 additions and 4 deletions

View File

@ -33,7 +33,7 @@ import {CopyOutlined, ExclamationCircleFilled, LoadingOutlined} from "@ant-desig
import {copyToClipboard} from "@/lib/copyToClipboard"; import {copyToClipboard} from "@/lib/copyToClipboard";
import {solarToLunar} from "lunar-calendar"; import {solarToLunar} from "lunar-calendar";
import CalHeader from "@/components/CalHeader"; import CalHeader from "@/components/CalHeader";
import {lunarDateShow} from "@/utils/timeFormatUtil"; import {dayjsWeek, lunarDateShow} from "@/utils/timeFormatUtil";
const {confirm} = Modal; const {confirm} = Modal;
/** /**
@ -79,7 +79,7 @@ const CalShow: React.FC = () => {
} }
}) })
const dateFormat = (date: Date, culture?: Culture, localizer?: DateLocalizer) => { const dateFormat = (date: Date, culture?: Culture, localizer?: DateLocalizer) => {
return `${date.getDate()}/${lunarDateShow(date)}`; return `${date.getDate()}/${lunarDateShow(date)}/${dayjsWeek(dayjs(date))}`;
}; };
const handleViewChange = (newView: View) => { const handleViewChange = (newView: View) => {
setView(newView); setView(newView);
@ -466,7 +466,6 @@ const CalShow: React.FC = () => {
date={date} date={date}
// 条目信息改变 // 条目信息改变
onNavigate={handleNavigate} onNavigate={handleNavigate}
// 点击 // 点击
selectable selectable
scrollToTime={scrollToTime} scrollToTime={scrollToTime}

View File

@ -15,3 +15,6 @@ https://github.com/zzyss86/LunarCalendar
## umi ## umi
https://umijs.org/docs/introduce/faq https://umijs.org/docs/introduce/faq
## MDN
https://developer.mozilla.org/zh-CN/docs/Web/CSS/justify-content