Video splitPoster 功能整理

This commit is contained in:
liaoxuezhi 2019-07-13 21:03:58 +08:00
parent e4b9a8efc3
commit 5da7567d28

View File

@ -439,7 +439,7 @@ export default class Video extends React.Component<VideoProps, VideoState> {
}
renderPosterAndPlayer() {
let {poster, data, locals, minPosterDimension, classPrefix: ns} = this.props;
let {poster, data, locals, minPosterDimension, classnames: cx} = this.props;
const posterInfo = this.state.posterInfo || {};
let dimensionClassName = '';
@ -449,14 +449,14 @@ export default class Video extends React.Component<VideoProps, VideoState> {
(minPosterDimension.width || minPosterDimension.height) &&
(minPosterDimension.width > posterInfo.width || minPosterDimension.height > posterInfo.height)
) {
dimensionClassName = `${ns}Text--danger`;
dimensionClassName = `Text--danger`;
}
return (
<div className="pull-in-xs">
<div className={`${ns}Hbox`}>
<div className={`${ns}Hbox-col`}>
<div className="Wrapper--xs">
<div className={cx('Hbox')}>
<div className={cx('Hbox-col')}>
<div className={cx('Wrapper Wrapper--xs')}>
<img
onLoad={this.onImageLoaded as any}
className="w-full"
@ -472,7 +472,7 @@ export default class Video extends React.Component<VideoProps, VideoState> {
<span>
{' '}
{' '}
<span className={`${ns}Text--danger`}>
<span className={cx('Text--danger')}>
{minPosterDimension.width || '-'} x {minPosterDimension.height || '-'}
</span>
</span>
@ -480,8 +480,8 @@ export default class Video extends React.Component<VideoProps, VideoState> {
</p>
</div>
</div>
<div className={`${ns}Hbox-col`}>
<div className="Wrapper--xs">{this.renderPlayer()}</div>
<div className={cx('Hbox-col')}>
<div className={cx('Wrapper Wrapper--xs')}>{this.renderPlayer()}</div>
</div>
</div>
</div>