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
陈智峰
jinfa-platform
Commits
af42bf39
Commit
af42bf39
authored
May 20, 2021
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge
parent
2344b126
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
16 deletions
+11
-16
productImageForm.tsx
...s/commodity/products/addProductsItem/productImageForm.tsx
+11
-16
No files found.
src/pages/commodity/products/addProductsItem/productImageForm.tsx
View file @
af42bf39
...
...
@@ -14,12 +14,8 @@ import { store } from '@/store'
import
{
getAuth
}
from
'@/utils/auth'
const
ProductImageForm
:
React
.
FC
<
{}
>
=
(
props
)
=>
{
<<
<
<<<<
HEAD
const
[
defaultChecked
,
setDefaultChecked
]
=
useState
(-1)
=======
const
{
token
}
=
getAuth
()
||
{}
const
[
defaultChecked
,
setDefaultChecked
]
=
useState
(
-
1
)
>
>>>>>>
6c65de7e22bdf2b26fa4cd85b489a286672fa466
const
[
priceAttributeParamsByRender
,
setPriceAttributeParamsByRender
]
=
useState
<
any
[]
>
([])
const
[
commonImageList
,
setCommonImageList
]
=
useState
<
any
>
([])
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
)
...
...
@@ -36,13 +32,13 @@ const ProductImageForm: React.FC<{}> = (props) => {
const
editRowIndexRef
=
useRef
<
number
>
(
0
)
const
{
ProductStore
}
=
store
const
{
priceAttributeParams
,
productInfoByEdit
,
setProductAttributeAndImageParams
,
setIsAllAttributePic
,
selectCategoryId
,
tabClickItem
const
{
priceAttributeParams
,
productInfoByEdit
,
setProductAttributeAndImageParams
,
setIsAllAttributePic
,
selectCategoryId
,
tabClickItem
}
=
ProductStore
// 再次点击tab 选中置为0
...
...
@@ -267,10 +263,10 @@ const ProductImageForm: React.FC<{}> = (props) => {
<
span
>
所有属性共用
<
i
style=
{
{
color
:
'red'
}
}
>
*
</
i
></
span
>
</
li
>
}
{
!
setImageType
&&
{
!
setImageType
&&
priceAttributeParamsByRender
?.
length
>
0
&&
priceAttributeParamsByRender
.
map
(
(
item
,
index
)
=>
{
return
Array
.
isArray
(
item
.
attributeAndValueList
)
&&
return
Array
.
isArray
(
item
.
attributeAndValueList
)
&&
<
li
key=
{
index
}
className=
{
defaultChecked
==
index
?
styles
.
activedLi
:
""
}
onClick=
{
()
=>
clickItemTab
(
index
)
}
>
<
span
>
{
...
...
@@ -287,7 +283,7 @@ const ProductImageForm: React.FC<{}> = (props) => {
<
Col
span=
{
20
}
style=
{
{
padding
:
24
}
}
id=
"uploadBox"
>
{
!
setImageType
?
(
priceAttributeParamsByRender
?.
length
>
0
&&
priceAttributeParamsByRender
[
0
]?.
attributeAndValueList
?.
length
!=
0
?
priceAttributeParamsByRender
.
map
((
item
,
index
)
=>
(
priceAttributeParamsByRender
?.
length
>
0
&&
priceAttributeParamsByRender
[
0
]?.
attributeAndValueList
?.
length
!=
0
?
priceAttributeParamsByRender
.
map
((
item
,
index
)
=>
<
div
key=
{
index
+
100
}
style=
{
defaultChecked
==
index
?
{
display
:
'block'
}
:
{
display
:
'none'
}
}
>
<
div
className=
{
styles
.
pictureCardBox
}
>
<
div
className=
"clearfix"
>
...
...
@@ -372,4 +368,4 @@ const ProductImageForm: React.FC<{}> = (props) => {
</
div
>)
}
export default observer(ProductImageForm)
\ No newline at end of file
export
default
observer
(
ProductImageForm
)
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