Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
linweijiong
jinfa-platform
Commits
eb48ad23
Commit
eb48ad23
authored
Mar 18, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
88f9d246
7115ba6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
index.tsx
...Panel/propsSettings/components/bottomNavigation/index.tsx
+25
-4
No files found.
src/pages/editor/mobileSettingPanel/propsSettings/components/bottomNavigation/index.tsx
View file @
eb48ad23
...
...
@@ -18,6 +18,7 @@ interface DataItemType {
id
:
number
,
name
:
string
,
icon
:
string
,
selectIcon
:
string
,
/** 类型:1-首页 2-积分 3-工作台 4-资讯 5-进货单 6-我的 */
type
:
number
,
status
:
boolean
,
...
...
@@ -187,11 +188,11 @@ const BottomNavigation: React.FC<BottomNavigationPropsType> = (props) => {
})
}
const
handleIconChange
=
(
url
:
string
,
id
:
number
)
=>
{
const
handleIconChange
=
(
url
:
string
,
id
:
number
,
key
:
string
)
=>
{
const
newList
=
[...
list
]
newList
.
map
(
item
=>
{
if
(
item
.
id
===
id
)
{
item
.
icon
=
url
item
[
key
]
=
url
}
})
setList
(
newList
)
...
...
@@ -256,11 +257,11 @@ const BottomNavigation: React.FC<BottomNavigationPropsType> = (props) => {
</
div
>
</
div
>
<
div
className=
{
styles
.
setting_line_addItem_line
}
>
<
div
className=
{
styles
.
setting_line_addItem_line_label
}
>
图标:
</
div
>
<
div
className=
{
styles
.
setting_line_addItem_line_label
}
>
图标
-默认
:
</
div
>
<
div
className=
{
styles
.
setting_line_addItem_line_brief
}
>
<
div
className=
{
styles
.
uploadIconWrap
}
>
<
UploadImage
onChange=
{
(
url
)
=>
handleIconChange
(
url
,
item
.
id
)
}
onChange=
{
(
url
)
=>
handleIconChange
(
url
,
item
.
id
,
"icon"
)
}
listType=
"text"
>
<
div
className=
{
cx
(
styles
.
uploadIconBtn
,
styles
.
small
)
}
>
...
...
@@ -275,6 +276,26 @@ const BottomNavigation: React.FC<BottomNavigationPropsType> = (props) => {
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
setting_line_addItem_line
}
>
<
div
className=
{
styles
.
setting_line_addItem_line_label
}
>
图标-选中:
</
div
>
<
div
className=
{
styles
.
setting_line_addItem_line_brief
}
>
<
div
className=
{
styles
.
uploadIconWrap
}
>
<
UploadImage
onChange=
{
(
url
)
=>
handleIconChange
(
url
,
item
.
id
,
"selectIcon"
)
}
listType=
"text"
>
<
div
className=
{
cx
(
styles
.
uploadIconBtn
,
styles
.
small
)
}
>
<
PlusOutlined
className=
{
styles
.
uploadIconBtnIcon
}
/>
<
span
>
上传图标
</
span
>
</
div
>
</
UploadImage
>
<
label
className=
{
styles
.
uploadIconTip
}
>
最佳尺寸:160*160
</
label
>
</
div
>
<
div
className=
{
styles
.
previewIconWrap
}
>
{
item
.
selectIcon
&&
<
img
src=
{
item
.
selectIcon
}
className=
{
styles
.
previewIcon
}
alt=
{
item
.
name
}
/>
}
</
div
>
</
div
>
</
div
>
{
(
item
.
type
!==
1
&&
item
.
type
!==
4
)
&&
(
<
div
className=
{
styles
.
setting_line_addItem_line
}
>
...
...
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