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

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

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