优化Video
parent
86c826f1a1
commit
acb52f66a0
|
|
@ -1,4 +1,4 @@
|
|||
import { Modal } from "antd";
|
||||
import { Button, Modal } from "antd";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { getFileUrl } from "../../utils";
|
||||
import AliPlayer from "./AliPlayer";
|
||||
|
|
@ -21,7 +21,6 @@ const Video = ({
|
|||
title = "视频",
|
||||
visible: externalVisible = false,
|
||||
onCancel,
|
||||
...restProps
|
||||
}) => {
|
||||
const [internalVisible, setInternalVisible] = useState(false);
|
||||
const playerRef = useRef(null);
|
||||
|
|
@ -68,15 +67,15 @@ const Video = ({
|
|||
return (
|
||||
<Modal
|
||||
open={visible}
|
||||
width={800}
|
||||
title={title}
|
||||
footer={[
|
||||
<button key="cancel" onClick={() => setVisible(false)}>
|
||||
<Button key="cancel" onClick={() => setVisible(false)}>
|
||||
取消
|
||||
</button>,
|
||||
</Button>,
|
||||
]}
|
||||
maskClosable={false}
|
||||
onCancel={() => setVisible(false)}
|
||||
{...restProps}
|
||||
>
|
||||
{playerElement}
|
||||
</Modal>
|
||||
|
|
|
|||
Loading…
Reference in New Issue