import { useIntl } from "react-intl"; import { Badge, Dropdown } from "antd"; import type { MenuProps } from "antd"; import { BlockOutlined, CalendarOutlined } from "@ant-design/icons"; const handleButtonClick = (e: React.MouseEvent) => { console.log("click left button", e); }; interface IWidget { style?: React.CSSProperties; sentId: string; count?: number; onMenuClick?: Function; } const SentTabButtonWidget = ({ style, ___sentId, onMenuClick, count = 0, }: IWidget) => { const intl = useIntl(); const items: MenuProps["items"] = [ { label: "排序", key: "orderby", icon: , children: [ { label: "完成度", key: "progress", }, { label: "问题数量", key: "qa", }, ], }, { label: "显示完成度", key: "show-progress", icon: , }, ]; const handleMenuClick: MenuProps["onClick"] = (e) => { e.domEvent.stopPropagation(); if (typeof onMenuClick !== "undefined") { onMenuClick(e.keyPath); } }; const menuProps = { items, onClick: handleMenuClick, }; return ( {intl.formatMessage({ id: "buttons.wbw", })} ); }; export default SentTabButtonWidget;