Commit ff3a820a authored by 陈龙's avatar 陈龙

feat: 滚动组件增加设备类型监听;历史曲线增加快捷功能

parent 1e1be112
import React from 'react';
import React, {useState} from 'react';
import AlarmScrollAssembly from '../index';
import {Button} from "antd";
window.globalConfig = {
userInfo: { OID: 1 },
userInfo: {OID: 1},
};
export default () => {
return (
<AlarmScrollAssembly
deviceType={'二供泵房,二供机组'}
prefix={'报警信息:'}
showTotal={false}
interval={1}
userAccess={true}
/>
); // 最小宽度930px
const [deviceType, setDeviceType] = useState('二供泵房,二供机组');
return (<>
<AlarmScrollAssembly
deviceType={deviceType}
prefix={'报警信息:'}
showTotal={false}
interval={0.1}
userAccess={true}
/>
<Button onClick={() => {
if (deviceType === '二供泵房') {
setDeviceType('二供泵房,二供机组')
} else {
setDeviceType('二供泵房')
}
}}>点击切换</Button>
</>
); // 最小宽度930px
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment