Commit af42bf39 authored by 前端-许佳敏's avatar 前端-许佳敏

merge

parent 2344b126
......@@ -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>所有属性共用&nbsp;<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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment