{
for (let i = 0; i < this.state.webSockets.length; i++) {
let ws = this.state.webSockets[i]['ws'];
if (ws.readyState === WebSocket.OPEN) {
ws.send(JSON.stringify({
type: 'data',
content: value + String.fromCharCode(13)
}));
}
}
this.commandRef.current.setValue('');
}} enterButton='执行'/>
(
{
if (this.state.active === item['id']) {
this.setState({
active: undefined
})
} else {
this.setState({
active: item['id']
})
}
}}
>
)}
/>
>
);
}
}
export default BatchCommand;