mirror of https://github.com/openspug/spug
U 优化批量执行结果展示效果
parent
e2516bc68d
commit
2ee1ea22fa
|
@ -50,11 +50,9 @@ 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.handleWrite(key, data);
|
||||||
const fields = data.trim().split('\r\n')
|
const tmp = data.trim();
|
||||||
this.lastOutputs[key] = fields.slice(-1)
|
if (tmp) this.lastOutputs[key] = tmp.split('\r\n').slice(-1)
|
||||||
}
|
|
||||||
this.handleWrite(key, data)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue