Переглянути джерело

:fire: button 在分栏中打开

visuddhinanda 3 роки тому
батько
коміт
fd66214c0a

+ 4 - 10
dashboard/src/components/template/SentEdit/SentTabButton.tsx

@@ -17,20 +17,16 @@ const handleButtonClick = (e: React.MouseEvent<HTMLButtonElement>) => {
   console.log("click left button", e);
   console.log("click left button", e);
 };
 };
 
 
-interface IWidgetSentTabButton {
+interface IWidget {
   icon?: JSX.Element;
   icon?: JSX.Element;
   type: string;
   type: string;
   sentId: string;
   sentId: string;
   count?: number;
   count?: number;
+  title?: string;
 }
 }
-const Widget = ({ icon, type, sentId, count = 0 }: IWidgetSentTabButton) => {
+const Widget = ({ icon, type, sentId, title, count = 0 }: IWidget) => {
   const intl = useIntl();
   const intl = useIntl();
   const items: MenuProps["items"] = [
   const items: MenuProps["items"] = [
-    {
-      label: "在分栏中打开",
-      key: "openInCol",
-      icon: <OneToOneOutlined />,
-    },
     {
     {
       label: "在新标签页中打开",
       label: "在新标签页中打开",
       key: "openInWin",
       key: "openInWin",
@@ -69,9 +65,7 @@ const Widget = ({ icon, type, sentId, count = 0 }: IWidgetSentTabButton) => {
       menu={menuProps}
       menu={menuProps}
       onClick={handleButtonClick}
       onClick={handleButtonClick}
     >
     >
-      {intl.formatMessage({
-        id: `channel.type.${type}.label`,
-      })}
+      {title}
       <Badge size="small" color="geekblue" count={count}></Badge>
       <Badge size="small" color="geekblue" count={count}></Badge>
     </Dropdown.Button>
     </Dropdown.Button>
   );
   );