-
-
-
-
-
-
-
-
Footer
-
+
+
+
-
+
+
+
+
+
Footer
+
+
);
};
diff --git a/web/src/app/components/frontendHeader/index.tsx b/web/src/app/components/frontendHeader/index.tsx
index bd736a9..af013af 100644
--- a/web/src/app/components/frontendHeader/index.tsx
+++ b/web/src/app/components/frontendHeader/index.tsx
@@ -1,9 +1,10 @@
import React, { useEffect, useState } from 'react';
import Styles from './web.pc.module.less';
-import { Button, Space, Modal } from 'antd';
+import { Button, Space, Modal, Input, Select } from 'antd';
import { RightOutlined } from '@ant-design/icons';
import useFeatures from '@project/hooks/useFeatures';
import ConsoleAvatar from '../consoleAvatar';
+import { useHomeContext } from '@project/components/frontend/home/context/homeContext';
export default function render() {
const features = useFeatures();
@@ -19,6 +20,27 @@ export default function render() {
});
}, []);
+ const { searchParam, setSearchParam } = useHomeContext();
+
+ const selectBefore = (
+
+ );
+
return (
*/}
-
+
+ {/* 搜索框 */}
+
+ {
+ setSearchParam({
+ searchText: e.target.value,
+ });
+ }}
+ />
+
+
+
{user ? (
<>
diff --git a/web/src/app/components/frontendHeader/locales/zh-CN.json b/web/src/app/components/frontendHeader/locales/zh-CN.json
index 9591a76..44fef18 100644
--- a/web/src/app/components/frontendHeader/locales/zh-CN.json
+++ b/web/src/app/components/frontendHeader/locales/zh-CN.json
@@ -3,5 +3,9 @@
"console": "控制台",
"logout": "退出",
"close": "关闭",
- "login": "登录"
+ "login": "登录",
+ "searchPlaceholder": "搜索文章",
+ "title": "标题",
+ "content": "内容",
+ "search": "搜索"
}
\ No newline at end of file
diff --git a/web/src/app/components/frontendHeader/web.pc.module.less b/web/src/app/components/frontendHeader/web.pc.module.less
index 5bef2b2..1188214 100644
--- a/web/src/app/components/frontendHeader/web.pc.module.less
+++ b/web/src/app/components/frontendHeader/web.pc.module.less
@@ -55,4 +55,25 @@
.right {
margin-right: 16px;
}
+
+ .search {
+ flex: 1;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+
+ .input {
+ width: 30%;
+ min-width: 300px;
+ }
+
+ .btn {
+ background-color: #6661f5;
+ }
+ }
}
+
+.select {
+ width: 100px;
+}
\ No newline at end of file
diff --git a/web/src/app/namespaces/frontend/index.tsx b/web/src/app/namespaces/frontend/index.tsx
index 7a48737..12856c7 100644
--- a/web/src/app/namespaces/frontend/index.tsx
+++ b/web/src/app/namespaces/frontend/index.tsx
@@ -1,15 +1,18 @@
import React from 'react';
import { Outlet, Route } from 'react-router-dom';
import FrontendHeader from '../../components/frontendHeader';
-import Styles from './styles.module.less'
+import Styles from './styles.module.less';
+import { HomeProvider } from '@project/components/frontend/home/context/homeContext';
function Frontend() {
return (
);
}