Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
4127ede8
Commit
4127ede8
authored
Sep 14, 2024
by
涂伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: '移动菜单配置新增搜索'
parent
6c5afabb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
miniMenu.jsx
src/pages/productCenter/mobileConfig/menuconfig/miniMenu.jsx
+24
-1
No files found.
src/pages/productCenter/mobileConfig/menuconfig/miniMenu.jsx
View file @
4127ede8
...
...
@@ -57,6 +57,9 @@ const MiniMenu = props => {
const
[
inf
,
setInf
]
=
useState
({});
const
[
checkList
,
setCheckList
]
=
useState
([]);
const
[
importOrExportVisible
,
setImportOrExportVisible
]
=
useState
(
false
);
// 导入导出弹窗
const
[
keywords
,
setKeywords
]
=
useState
(
''
);
const
{
Search
}
=
Input
;
// 获取菜单树
useEffect
(()
=>
{
...
...
@@ -84,10 +87,19 @@ const MiniMenu = props => {
getInfo
();
},
[
menuID
]);
const
onChangeSearch
=
e
=>
{
setKeywords
(
e
.
target
.
value
);
};
const
onSearch
=
value
=>
{
updateTrees
(
''
,
value
);
};
// 更新树
const
updateTrees
=
e
=>
{
const
updateTrees
=
(
e
,
keyword
)
=>
{
getMiniAppModuleTree
({
userMode
:
userMode
||
'super'
,
keyword
})
.
then
(
res
=>
{
// console.log(res, 'res');
...
...
@@ -744,6 +756,17 @@ const MiniMenu = props => {
</
Tooltip
>
</
div
>
</
div
>
<
Search
style=
{
{
marginBottom
:
8
,
width
:
'98%'
,
marginLeft
:
'7px'
,
}
}
value=
{
keywords
}
placeholder=
"快速搜索菜单"
onChange=
{
onChangeSearch
}
onSearch=
{
onSearch
}
/>
{
treeData
.
length
>
0
?
(
<
div
style=
{
{
height
:
'calc(100% - 35px)'
,
overflowY
:
'scroll'
}
}
>
<
Tree
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment