diff --git a/web-react/src/views/main/_layout/header/search.jsx b/web-react/src/views/main/_layout/header/search.jsx
index f8aba8d..c2617da 100644
--- a/web-react/src/views/main/_layout/header/search.jsx
+++ b/web-react/src/views/main/_layout/header/search.jsx
@@ -31,12 +31,23 @@ function renderTitle(title) {
function renderItem(title, menu) {
return {
value: title,
+ openType: menu.openType,
component: menu.component,
+ link: menu.link,
+ redirect: menu.redirect,
menu,
label: (
<>
{title}
-
{menu.component}
+
+ {
+ {
+ 1: menu.component,
+ 2: menu.link,
+ 3: menu.redirect,
+ }[menu.openType]
+ }
+
>
),
}
@@ -73,7 +84,15 @@ export default class search extends Component {
searchValue = searchValue.toLowerCase()
return (
(option.value && option.value.toLowerCase().includes(searchValue)) ||
- (option.component && option.component.toLowerCase().includes(searchValue))
+ (option.openType === 1 &&
+ option.component &&
+ option.component.toLowerCase().includes(searchValue)) ||
+ (option.openType === 2 &&
+ option.link &&
+ option.link.toLowerCase().includes(searchValue)) ||
+ (option.openType === 3 &&
+ option.redirect &&
+ option.redirect.toLowerCase().includes(searchValue))
)
}