mirror of https://github.com/openspug/spug
U 优化批量执行结果展示效果
parent
c90eed1c8a
commit
e2516bc68d
|
@ -50,7 +50,10 @@ class ExecConsole extends React.Component {
|
||||||
const {key, data, status} = JSON.parse(e.data);
|
const {key, data, status} = JSON.parse(e.data);
|
||||||
if (status !== undefined) store.outputs[key].status = status;
|
if (status !== undefined) store.outputs[key].status = status;
|
||||||
if (data) {
|
if (data) {
|
||||||
if (data.replace(/\r\n/g, '')) this.lastOutputs[key] = data.trim()
|
if (data.replace(/\r\n/g, '')) {
|
||||||
|
const fields = data.trim().split('\r\n')
|
||||||
|
this.lastOutputs[key] = fields.slice(-1)
|
||||||
|
}
|
||||||
this.handleWrite(key, data)
|
this.handleWrite(key, data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue