fix: 优化属性名

This commit is contained in:
苑宏博 2024-04-25 17:39:07 +08:00
parent 1f16e68272
commit b915d80dea
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
import React, { useContext } from 'react';
import WindowToggle, { Size } from './components/WindowToggle';
import WindowToggle, { ISize } from './components/WindowToggle';
import WarningRecordList from './components/WarningRecordList';
import { ConfigProvider } from '@zhst/meta';
import { IRecord } from '../WarningRecordCard';
@ -32,8 +32,8 @@ interface RealTimeMonitorProps {
cardStyle?: React.CSSProperties;
imgStyle?: React.CSSProperties;
largeImageTitle?: string;
size: Size;
setSize: React.Dispatch<React.SetStateAction<Size>>
size: ISize;
setSize: React.Dispatch<React.SetStateAction<ISize>>
}
export const RealTimeMonitor: React.FC<RealTimeMonitorProps> = (props) => {

View File

@ -6,15 +6,15 @@ import { AppstoreOutlined, BarsOutlined } from '@ant-design/icons';
import { theme } from 'antd/lib';
import './index.less'
export type Size = 'large' | 'small'
export type ISize = 'large' | 'small'
interface WindowToggleProps {
dataSource?: VideoPlayerCardProps[];
handleWindowClick?: (key?: string) => void;
handleCloseButtonClick?: (key?: string) => void;
selectedWindowKey?: string;
size: Size;
setSize: React.Dispatch<React.SetStateAction<Size>>
size: ISize;
setSize: React.Dispatch<React.SetStateAction<ISize>>
}
export const WindowToggle: React.FC<WindowToggleProps> = (props) => {
@ -45,7 +45,7 @@ export const WindowToggle: React.FC<WindowToggleProps> = (props) => {
const { windowKey } = dataSource[0]
handleWindowClick?.(windowKey)
}
setSize(value as Size)
setSize(value as ISize)
}}
/>
</div>

View File

@ -1,4 +1,4 @@
import WindowToggle from './WindowToggle'
export default WindowToggle
import type { Size } from './WindowToggle';
export type { Size };
import type { ISize } from './WindowToggle';
export type { ISize };