feat: 添加 视频窗口切换组件
This commit is contained in:
parent
c3041a7d9e
commit
b67b89a4ce
@ -1,11 +1,9 @@
|
|||||||
import { Card, Space, CardProps, Spin, Button } from 'antd';
|
import { Card, Space, CardProps, Spin, Button } from 'antd';
|
||||||
import { theme } from 'antd/lib';
|
import { theme } from 'antd/lib';
|
||||||
import { VideoPlayer, type VideoViewRef } from '@zhst/meta';
|
import { VideoPlayer, type VideoViewRef } from '@zhst/meta';
|
||||||
|
|
||||||
import React, { useState, useEffect, ReactNode, useRef } from 'react';
|
import React, { useState, useEffect, ReactNode, useRef } from 'react';
|
||||||
import { CloseOutlined, LoadingOutlined } from '@ant-design/icons';
|
import { CloseOutlined, LoadingOutlined } from '@ant-design/icons';
|
||||||
import './index.less'
|
import './index.less'
|
||||||
|
|
||||||
export interface VideoPlayerCardProps {
|
export interface VideoPlayerCardProps {
|
||||||
windowKey?: string;
|
windowKey?: string;
|
||||||
selectedWindowKey?: string;
|
selectedWindowKey?: string;
|
||||||
|
@ -4,12 +4,20 @@ import { Empty, Space, Spin } from 'antd';
|
|||||||
import "./index.less"
|
import "./index.less"
|
||||||
import { LoadingOutlined } from '@ant-design/icons';
|
import { LoadingOutlined } from '@ant-design/icons';
|
||||||
|
|
||||||
|
|
||||||
interface WarningRecordListProps {
|
interface WarningRecordListProps {
|
||||||
dataSource?: IRecord[];
|
dataSource?: IRecord[];
|
||||||
viewLargerImageModalRef?: React.RefObject<ViewLargerImageModalRef>;
|
viewLargerImageModalRef?: React.RefObject<ViewLargerImageModalRef>;
|
||||||
|
/*
|
||||||
|
处理 图片下载按钮点击事件
|
||||||
|
*/
|
||||||
handleDownloadImg?: (imgSrc?: string) => void;
|
handleDownloadImg?: (imgSrc?: string) => void;
|
||||||
|
/*
|
||||||
|
处理 预警记录卡片点击事件
|
||||||
|
*/
|
||||||
onRecordClick?: (record?: IRecord) => void;
|
onRecordClick?: (record?: IRecord) => void;
|
||||||
|
/*
|
||||||
|
获取选中的 记录 id 用于 判断是否显示 选中样式
|
||||||
|
*/
|
||||||
selectedRecordId?: string;
|
selectedRecordId?: string;
|
||||||
isRecordListLoading?: boolean;
|
isRecordListLoading?: boolean;
|
||||||
recordListTitle?: string;
|
recordListTitle?: string;
|
||||||
@ -58,7 +66,6 @@ const WarningRecordList: React.FC<WarningRecordListProps> = (props) => {
|
|||||||
imgStyle={{ width: 280, height: 169, ...imgStyle }}
|
imgStyle={{ width: 280, height: 169, ...imgStyle }}
|
||||||
/>)
|
/>)
|
||||||
}
|
}
|
||||||
|
|
||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
:
|
:
|
||||||
|
@ -16,7 +16,8 @@ title: WindowToggle 窗口切换组件
|
|||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
|
| dataSource | 用于渲染 每个窗口的数据 | VideoPlayerCardProps[] | 需要传一组默认值用于窗口的渲染| - |
|
||||||
|
| handleWindowClick | 用于获取窗口的 windowKey 方便更新对应窗口数据 | (key?: string) => void; | - | - |
|
||||||
|
| handleCloseButtonClick | 用于点击窗口关闭按钮的事件 | (key?: string) => void; | - | - |
|
||||||
|
| selectedWindowKey | 选中的窗口的 key 用于控制 选中边框样式 |string| - | - |
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user