Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
shenshaokai
jinfa-admin
Commits
0b55d619
Commit
0b55d619
authored
Mar 17, 2021
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加app企业商城装修底部选中icon图片上传
parent
ccf76f03
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/pageCustomized/mobileSettingPanel/propsSettings/components/bottomNavigation/index.tsx
View file @
0b55d619
...
...
@@ -18,6 +18,7 @@ interface DataItemType {
id
:
number
,
name
:
string
,
icon
:
string
,
selectIcon
:
string
,
/** 类型:1-首页 2-分类 3-进货单 4-工作台 5-我的 6-找现货 7-找供应 8-求购 9-换积分 10-找店铺 */
type
:
number
,
status
:
boolean
,
...
...
@@ -203,11 +204,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
)
...
...
@@ -272,11 +273,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
)
}
>
...
...
@@ -291,6 +292,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