Commit ff3a820a authored by 陈龙's avatar 陈龙

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

parent 1e1be112
import React from 'react'; import React, {useState} from 'react';
import AlarmScrollAssembly from '../index'; import AlarmScrollAssembly from '../index';
import {Button} from "antd";
window.globalConfig = { window.globalConfig = {
userInfo: { OID: 1 }, userInfo: {OID: 1},
}; };
export default () => { export default () => {
return ( const [deviceType, setDeviceType] = useState('二供泵房,二供机组');
<AlarmScrollAssembly
deviceType={'二供泵房,二供机组'} return (<>
prefix={'报警信息:'} <AlarmScrollAssembly
showTotal={false} deviceType={deviceType}
interval={1} prefix={'报警信息:'}
userAccess={true} showTotal={false}
/> interval={0.1}
); // 最小宽度930px 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