微信小程序页面迁移校验之前 P5任务处理之前
This commit is contained in:
29
apps/admin-web/src/components/BusinessDayHint.tsx
Normal file
29
apps/admin-web/src/components/BusinessDayHint.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* 营业日口径提示组件。
|
||||
*
|
||||
* 在日期选择器旁显示 Tooltip + 文字标注,说明当前营业日分割点。
|
||||
* 例如:「营业日:08:00 起」
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { Tooltip, Typography } from "antd";
|
||||
import { InfoCircleOutlined } from "@ant-design/icons";
|
||||
import { useBusinessDayStore } from "../store/businessDayStore";
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
const BusinessDayHint: React.FC = () => {
|
||||
const startHour = useBusinessDayStore((s) => s.startHour);
|
||||
const hh = String(startHour).padStart(2, "0");
|
||||
|
||||
return (
|
||||
<Tooltip title={`统计日期按营业日口径划分:每天 ${hh}:00 至次日 ${hh}:00`}>
|
||||
<Text type="secondary" style={{ fontSize: 12, marginLeft: 4 }}>
|
||||
<InfoCircleOutlined style={{ marginRight: 2 }} />
|
||||
营业日:{hh}:00 起
|
||||
</Text>
|
||||
</Tooltip>
|
||||
);
|
||||
};
|
||||
|
||||
export default BusinessDayHint;
|
||||
Reference in New Issue
Block a user