After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 1.6 MiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 347 B |
After Width: | Height: | Size: 325 B |
After Width: | Height: | Size: 411 B |
After Width: | Height: | Size: 321 B |
After Width: | Height: | Size: 27 KiB |
@ -0,0 +1,39 @@ |
|||||
|
import React, { useEffect, useRef } from 'react'; |
||||
|
import { connect } from 'react-redux'; |
||||
|
import { TreeSelect, Tree, Form, Button, Popover, Tag, Switch, Input, Row, Col } from '@douyinfe/semi-ui'; |
||||
|
import { VideoPlay } from "$components"; |
||||
|
import { useState } from 'react'; |
||||
|
|
||||
|
|
||||
|
const Container = ({ videoObj }) => { |
||||
|
const [videoWidth, setVideoWidth] = useState() |
||||
|
const [videoHeight, setVideoHeight] = useState() |
||||
|
useEffect(() => { |
||||
|
setVideoWidth(document.getElementById('videoo').clientWidth) |
||||
|
setVideoHeight(document.getElementById('videoo').clientHeight) |
||||
|
}, []) |
||||
|
|
||||
|
return ( |
||||
|
<div style={{ width: videoWidth || '100%', height: videoHeight || '100%', border: ' 1px solid #D9D9D9', }}> |
||||
|
{/* <VideoPlay sizeWh={{ |
||||
|
width: 600, |
||||
|
height: 400, |
||||
|
parentWidth: 600, |
||||
|
parentHeight: 400, |
||||
|
}} |
||||
|
videoObj={videoObj} |
||||
|
height={400} |
||||
|
local={true} /> */} |
||||
|
|
||||
|
</div> |
||||
|
) |
||||
|
} |
||||
|
|
||||
|
function mapStateToProps (state) { |
||||
|
const { auth } = state; |
||||
|
return { |
||||
|
user: auth.user, |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
export default connect(mapStateToProps)(Container) |
@ -0,0 +1,49 @@ |
|||||
|
import React, { useEffect, useRef } from 'react'; |
||||
|
import { connect } from 'react-redux'; |
||||
|
import { TreeSelect, Tree, Form, Button, Popover, Tag, Switch, Input, Row, Col } from '@douyinfe/semi-ui'; |
||||
|
import Container from "./container"; |
||||
|
|
||||
|
|
||||
|
const VideoCard = ({ data, pageSize = 9 }) => { |
||||
|
|
||||
|
let span = 8 |
||||
|
if (pageSize === 1) { |
||||
|
span = 24 |
||||
|
} |
||||
|
|
||||
|
if (pageSize === 4) { |
||||
|
span = 12 |
||||
|
} |
||||
|
|
||||
|
let rowsCount = 2 |
||||
|
if (pageSize == 1) { |
||||
|
rowsCount = 1 |
||||
|
} |
||||
|
|
||||
|
if (pageSize == 9) { |
||||
|
rowsCount = 3 |
||||
|
} |
||||
|
let cheight = Math.floor(100 / rowsCount) + "%" |
||||
|
|
||||
|
return ( |
||||
|
<> |
||||
|
<Col span={6} style={{ height: cheight, }}> |
||||
|
<div id="videoo" style={{ width: '100%', height: '100%', }}> |
||||
|
<Container |
||||
|
videoObj={data} |
||||
|
/> |
||||
|
</div> |
||||
|
|
||||
|
</Col> |
||||
|
</> |
||||
|
) |
||||
|
} |
||||
|
|
||||
|
function mapStateToProps (state) { |
||||
|
const { auth } = state; |
||||
|
return { |
||||
|
user: auth.user, |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
export default connect(mapStateToProps)(VideoCard) |
@ -0,0 +1,18 @@ |
|||||
|
.KJBlue { |
||||
|
.semi-tree-option, |
||||
|
.semi-icon, |
||||
|
.semi-form-field-label-text { |
||||
|
color: #fff; |
||||
|
} |
||||
|
.semi-checkbox-inner-display { |
||||
|
//树状多选框 |
||||
|
border: 1px solid #fff; |
||||
|
} |
||||
|
input { |
||||
|
background: #01185f; |
||||
|
box-shadow: inset 0px 0px 5px 1px rgba(28, 96, 254, 0.4); |
||||
|
} |
||||
|
input::placeholder { |
||||
|
color: #fff; |
||||
|
} |
||||
|
} |