Commit e0456a33 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:处理新增商品描述区域视频大小显示问题

parent a1cb76ba
......@@ -10,7 +10,7 @@ import ImgCrop from 'antd-img-crop';
import { inject, observer } from 'mobx-react'
import { store } from '@/store'
const ProductDescFormDefualt: React.FC<{}> = (props) => {
const ProductDescFormDefualt: React.FC<{}> = (props) => {
const [fileImageList, setFileImageList] = useState<any>([])
const [videoList, setVideoList] = useState<any>([])
const flagRef = useRef<boolean>(false)
......@@ -40,7 +40,7 @@ const ProductDescFormDefualt: React.FC<{}> = (props) => {
setFileImageList([])
setVideoList([])
}
}, [selectCategoryId])
useEffect(() => {
......@@ -117,11 +117,11 @@ const ProductDescFormDefualt: React.FC<{}> = (props) => {
return (<div>
<Spin spinning={isLoading}>
{
videoList?.length>0
?
videoList?.length>0
?
videoList.map((item, index) => <div key={index} className={cx(styles.descriptBox, styles.mediaContentBox)}>
<div className={styles.divVideo}>
<video src={item} controls={true}>
<video src={item} controls={true} width={320} height={240}>
您的浏览器不支持视频标签,请及时升级。
</video>
</div>
......@@ -183,4 +183,4 @@ const ProductDescFormDefualt: React.FC<{}> = (props) => {
</div>)
}
export default observer(ProductDescFormDefualt)
\ No newline at end of file
export default observer(ProductDescFormDefualt)
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