import { Tabs, Button, Popover } from "antd"; import { MenuOutlined, PushpinOutlined } from "@ant-design/icons"; import PaliTextToc from "./PaliTextToc"; import Find from "./Find"; import Nav from "./Nav"; import { useIntl } from "react-intl"; interface IWidget { type?: string; articleId?: string; } const ArticleCardMainMenuWidget = ({ articleId }: IWidget) => { const intl = useIntl(); const id = articleId?.split("_"); let tocWidget = <>; if (id && id.length > 0) { const sentId = id[0].split("-"); if (sentId.length > 1) { tocWidget = ( ); } } const styleTabBody: React.CSSProperties = { width: 350, height: "calc(100vh - 200px)", overflowY: "scroll", }; const mainMenuContent = ( } />, }} items={[ { label: intl.formatMessage({ id: "labels.table-of-content", }), key: "1", children:
{tocWidget}
, }, { label: `定位`, key: "2", children: (
), }, { label: `查找`, key: "3", children: (
), }, ]} /> ); return (