fix: 优化属性名
This commit is contained in:
parent
1f16e68272
commit
b915d80dea
@ -1,5 +1,5 @@
|
|||||||
import React, { useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
import WindowToggle, { Size } from './components/WindowToggle';
|
import WindowToggle, { ISize } from './components/WindowToggle';
|
||||||
import WarningRecordList from './components/WarningRecordList';
|
import WarningRecordList from './components/WarningRecordList';
|
||||||
import { ConfigProvider } from '@zhst/meta';
|
import { ConfigProvider } from '@zhst/meta';
|
||||||
import { IRecord } from '../WarningRecordCard';
|
import { IRecord } from '../WarningRecordCard';
|
||||||
@ -32,8 +32,8 @@ interface RealTimeMonitorProps {
|
|||||||
cardStyle?: React.CSSProperties;
|
cardStyle?: React.CSSProperties;
|
||||||
imgStyle?: React.CSSProperties;
|
imgStyle?: React.CSSProperties;
|
||||||
largeImageTitle?: string;
|
largeImageTitle?: string;
|
||||||
size: Size;
|
size: ISize;
|
||||||
setSize: React.Dispatch<React.SetStateAction<Size>>
|
setSize: React.Dispatch<React.SetStateAction<ISize>>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const RealTimeMonitor: React.FC<RealTimeMonitorProps> = (props) => {
|
export const RealTimeMonitor: React.FC<RealTimeMonitorProps> = (props) => {
|
||||||
|
@ -6,15 +6,15 @@ import { AppstoreOutlined, BarsOutlined } from '@ant-design/icons';
|
|||||||
import { theme } from 'antd/lib';
|
import { theme } from 'antd/lib';
|
||||||
import './index.less'
|
import './index.less'
|
||||||
|
|
||||||
export type Size = 'large' | 'small'
|
export type ISize = 'large' | 'small'
|
||||||
|
|
||||||
interface WindowToggleProps {
|
interface WindowToggleProps {
|
||||||
dataSource?: VideoPlayerCardProps[];
|
dataSource?: VideoPlayerCardProps[];
|
||||||
handleWindowClick?: (key?: string) => void;
|
handleWindowClick?: (key?: string) => void;
|
||||||
handleCloseButtonClick?: (key?: string) => void;
|
handleCloseButtonClick?: (key?: string) => void;
|
||||||
selectedWindowKey?: string;
|
selectedWindowKey?: string;
|
||||||
size: Size;
|
size: ISize;
|
||||||
setSize: React.Dispatch<React.SetStateAction<Size>>
|
setSize: React.Dispatch<React.SetStateAction<ISize>>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const WindowToggle: React.FC<WindowToggleProps> = (props) => {
|
export const WindowToggle: React.FC<WindowToggleProps> = (props) => {
|
||||||
@ -45,7 +45,7 @@ export const WindowToggle: React.FC<WindowToggleProps> = (props) => {
|
|||||||
const { windowKey } = dataSource[0]
|
const { windowKey } = dataSource[0]
|
||||||
handleWindowClick?.(windowKey)
|
handleWindowClick?.(windowKey)
|
||||||
}
|
}
|
||||||
setSize(value as Size)
|
setSize(value as ISize)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import WindowToggle from './WindowToggle'
|
import WindowToggle from './WindowToggle'
|
||||||
export default WindowToggle
|
export default WindowToggle
|
||||||
import type { Size } from './WindowToggle';
|
import type { ISize } from './WindowToggle';
|
||||||
export type { Size };
|
export type { ISize };
|
Loading…
Reference in New Issue
Block a user