Skip to content

Commit

Permalink
U 优化批量执行结果展示效果
Browse files Browse the repository at this point in the history
  • Loading branch information
vapao committed Nov 8, 2021
1 parent e2516bc commit 2ee1ea2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions spug_web/src/pages/exec/task/ExecConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ class ExecConsole extends React.Component {
const {key, data, status} = JSON.parse(e.data);
if (status !== undefined) store.outputs[key].status = status;
if (data) {
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);
const tmp = data.trim();
if (tmp) this.lastOutputs[key] = tmp.split('\r\n').slice(-1)
}
}
};
Expand Down

0 comments on commit 2ee1ea2

Please sign in to comment.