shaogen1995 2 tahun lalu
induk
melakukan
e46032358b
3 mengubah file dengan 26 tambahan dan 6 penghapusan
  1. TEMPAT SAMPAH
      src/assets/img/toTop.png
  2. 20 3
      src/pages/A3GoodsM/index.module.scss
  3. 6 3
      src/pages/A3GoodsM/index.tsx

TEMPAT SAMPAH
src/assets/img/toTop.png


+ 20 - 3
src/pages/A3GoodsM/index.module.scss

@@ -113,7 +113,7 @@
 
     }
 
-    .noRow{
+    .noRow {
       width: 100%;
       height: calc(100% - 130px);
       padding-bottom: 200px;
@@ -164,14 +164,31 @@
       }
     }
 
-    .A3ToTop{
+    .A3ToTop {
       position: fixed;
       z-index: 10;
       bottom: 20px;
       right: 10px;
       width: 40px;
-      &>img{
+
+      .A3ToTop1 {
         width: 100%;
+        height: 34px;
+        background-color: var(--themeColor);
+        text-align: center;
+        color: #fff;
+        line-height: 34px;
+        font-weight: 700;
+        font-size: 28px;
+      }
+
+      .A3ToTop2 {
+        padding: 10px 10px 15px;
+        font-size: 20px;
+        text-align: center;
+        background-color: #fff;
+        color: var(--themeColor);
+        font-weight: 700;
       }
     }
   }

+ 6 - 3
src/pages/A3GoodsM/index.tsx

@@ -17,7 +17,7 @@ import { RootState } from "@/store";
 import ImageLazy from "@/components/ImageLazy";
 import { Goods } from "@/types";
 // import lookImg from "@/assets/img/look.png";
-import toTopImg from "@/assets/img/toTop.png";
+import { UpOutlined } from "@ant-design/icons";
 import GoodsInfoM from "./GoodsInfoM";
 
 function A3GoodsM() {
@@ -81,7 +81,7 @@ function A3GoodsM() {
     if (scrollRef.current) {
       scrollRef.current.scrollTop = 0;
       window.setTimeout(() => {
-        if (scrollRef.current) scrollRef.current.scrollTop = 6;
+        if (scrollRef.current) scrollRef.current.scrollTop = 1;
       }, 100);
     }
   }, []);
@@ -207,7 +207,10 @@ function A3GoodsM() {
 
       {/* 返回顶部 */}
       <div className="A3ToTop" hidden={!scrollShow} onClick={fullTopFu}>
-        <img src={toTopImg} alt="" />
+        <div className="A3ToTop1">
+          <UpOutlined rev={undefined} />
+        </div>
+        <div className="A3ToTop2">回到顶部</div>
       </div>
 
       {/* 查看文物详情 */}