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 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) => {

View File

@ -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>

View File

@ -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 };