import React, { useState } from 'react' import styles from './index.module.scss' import classNames from 'classnames' import { GoodsRow } from '@/types' import { baseURL } from '@/utils/history' import { Image } from 'antd' import LazyImg from '../LazyImg' type Props = { info: GoodsRow closeFu: () => void type: 'img' | 'model' | 'video' } function LookGood({ info, closeFu, type }: Props) { const [imgLook, setImgLook] = useState('') return (
{/* 关闭按钮 */}
{type === 'img' ? (
setImgLook(baseURL + info.lookSrc)}>
) : null} {type === 'model' ? ( ) : null} {type === 'video' ?
{info.name}
{/* pc端查看图片 */} {imgLook ? ( setImgLook('') }} /> ) : null}
) } const MemoLookGood = React.memo(LookGood) export default MemoLookGood