提交 b59d98cc 作者: 翁进城

navHeader版本V3

上级 2acddd6e
.navHeader { .navHeader {
width: 100%; width: 100%;
height: 68px; height: 68px;
background: linear-gradient(360deg, #002157 0%, #00102c 100%); background: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
.ant-tabs-tab-btn { .ant-tabs-tab-btn {
font-size: 16px; font-size: 16px;
color: #fff; color: #000;
width: 90px; width: 90px;
text-align: center; text-align: center;
font-family: MicrosoftYaHei; font-family: MicrosoftYaHei;
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
:global .ant-tabs-tab-active { :global .ant-tabs-tab-active {
.ant-tabs-tab-btn { .ant-tabs-tab-btn {
color: #91c8ff !important;
} }
} }
...@@ -65,29 +64,23 @@ ...@@ -65,29 +64,23 @@
.btn1 { .btn1 {
width: 120px; width: 120px;
height: 40px; height: 40px;
background: linear-gradient(90deg, #278eff 0%, #0052da 100%); border-radius: 0px;
border-radius: 6px;
border: 0;
font-size: 16px; font-size: 16px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI; font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold; font-weight: bold;
color: #ffffff; color: #ffffff;
&:hover {
opacity: 0.8;
}
} }
.btn2 { .btn2 {
box-sizing: border-box; box-sizing: border-box;
width: 120px; width: 120px;
height: 40px; height: 40px;
border-radius: 6px; border-radius: 0px;
border: 1px solid #ffb02c; border: 1px solid rgba(255, 85, 45, 1);
font-size: 16px; font-size: 16px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI; font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold; font-weight: bold;
color: #ffb02c; color: rgba(255, 85, 45, 1);
background: none; background: none;
} }
......
import React, { useState } from 'react'; import React, { useState } from "react";
import { Avatar, Button, Space, Tabs } from 'antd'; import { Avatar, Button, Space, Tabs } from "antd";
import type { TabsProps } from 'antd'; import type { TabsProps } from "antd";
import styles from './index.module.scss'; import styles from "./index.module.scss";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { PlusOutlined } from "@ant-design/icons";
const items: TabsProps["items"] = [ const items: TabsProps["items"] = [
{ {
...@@ -10,15 +11,15 @@ const items: TabsProps["items"] = [ ...@@ -10,15 +11,15 @@ const items: TabsProps["items"] = [
label: ` 首页 `, label: ` 首页 `,
}, },
{ {
key: '/jobServices', key: "/jobServices",
label: `作业服务`, label: `作业服务`,
}, },
{ {
key: '/equipmentLeasing', key: "/equipmentLeasing",
label: `设备租赁`, label: `设备租赁`,
}, },
{ {
key: '/flyingHandService', key: "/flyingHandService",
label: `飞手服务`, label: `飞手服务`,
}, },
{ {
...@@ -38,7 +39,7 @@ const items: TabsProps["items"] = [ ...@@ -38,7 +39,7 @@ const items: TabsProps["items"] = [
export default function NavHeader() { export default function NavHeader() {
const router = useRouter(); const router = useRouter();
const currentPath = router.asPath; const currentPath = router.asPath;
console.log("currentHash", currentPath); console.log("currentHash", currentPath);
const onChange = (key: string) => { const onChange = (key: string) => {
console.log(key); console.log(key);
...@@ -47,23 +48,23 @@ export default function NavHeader() { ...@@ -47,23 +48,23 @@ export default function NavHeader() {
return ( return (
<div className={styles.navHeader}> <div className={styles.navHeader}>
<div className={styles.nav}> <div className={styles.nav}>
<div className={styles.logo}></div> <div className={styles.logo}></div>
<Tabs <Tabs
className={styles.tabs} className={styles.tabs}
defaultActiveKey={currentPath} defaultActiveKey={currentPath}
items={items} items={items}
onChange={onChange} onChange={onChange}
/> />
<Space size={16} className={styles.btns}> <Space size={16} className={styles.btns}>
<Button type='primary' className={styles.btn1}> <Button type="primary" className={styles.btn1}>
+ 发布信息 + 发布需求
</Button> </Button>
<Button className={styles.btn2}>入驻加盟</Button> <Button className={styles.btn2}>入驻加盟</Button>
</Space> </Space>
<div className={styles.haedImg}> <div className={styles.haedImg}>
<Avatar size={48} style={{ background: '#fff' }}></Avatar> <Avatar size={48} style={{ background: "#fff" }}></Avatar>
</div> </div>
</div> </div>
</div> </div>
); );
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论