fix: 优化属性名
This commit is contained in:
parent
1f16e68272
commit
b915d80dea
@ -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) => {
|
||||
|
@ -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>
|
||||
|
@ -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 };
|
Loading…
Reference in New Issue
Block a user