فهرست منبع

fix: 222 【bcwin网站】站内信&个人游戏功能优化

Before 7 ماه پیش
والد
کامیت
a32019e93b
2فایلهای تغییر یافته به همراه29 افزوده شده و 2 حذف شده
  1. 16 2
      src/components/Tabs/index.tsx
  2. 13 0
      src/components/Tabs/style.module.scss

+ 16 - 2
src/components/Tabs/index.tsx

@@ -1,6 +1,7 @@
 "use client";
 import { Badge, Tabs } from "antd-mobile";
 import { FC, PropsWithChildren, ReactNode } from "react";
+import styles from "./style.module.scss";
 interface Item {
     id: number;
     name: string;
@@ -10,7 +11,19 @@ interface Item {
 interface Props {
     items: Item[];
 }
-
+// <Badge
+//   className={"flex items-center justify-center text-[20px]"}
+//   content={tab.content > 0 ? tab.content : null}
+//   style={{
+//     "--right": "-10px",
+//     "--top": "8px",
+//     width: "20px",
+//     height: "20px",
+//   }}
+//   color={"#ff311b"}
+// >
+//   {tab.name}
+// </Badge>
 const Transactions: FC<PropsWithChildren<Props>> = (props) => {
     const { items } = props;
     return (
@@ -27,11 +40,12 @@ const Transactions: FC<PropsWithChildren<Props>> = (props) => {
                 return (
                     <Tabs.Tab
                         key={tab.id}
+                        className={styles.badge}
                         title={
                             <Badge
                                 content={tab.content > 0 ? tab.content : null}
                                 style={{
-                                    "--right": "-10px",
+                                    "--right": "-0.0972rem",
                                     "--top": "8px",
                                 }}
                                 color={"#ff311b"}

+ 13 - 0
src/components/Tabs/style.module.scss

@@ -0,0 +1,13 @@
+
+.badge{
+  :global(.adm-badge-content){
+    width: 0.1806rem;
+    height: 0.1389rem;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    padding: 1px 0;
+    font-size: 0.1111rem;
+  }
+}
+