From 39dfb295242c96e45a1ca8f7ffe4067963a2d4fe Mon Sep 17 00:00:00 2001 From: nuintun Date: Thu, 26 Nov 2015 12:55:11 +0800 Subject: [PATCH] update files --- static/js/components/app-main/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/components/app-main/index.js b/static/js/components/app-main/index.js index bb07aa4..66a874d 100644 --- a/static/js/components/app-main/index.js +++ b/static/js/components/app-main/index.js @@ -60,7 +60,9 @@ function createXTerm(name, xtermNode){ xtermNode.removeChild(xtermNode.firstChild); } + xterm.focus(); xtermNode.appendChild(xterm.element); + xterm.children[xterm.y].scrollIntoView(); } } @@ -130,7 +132,8 @@ module.exports = Vue.component('app-main', { exec: function (name, command){ var runtime = window.AppRuntime[this.project.name]; - runtime.xterm.write('运行命令: ' + name); + runtime.xterm.writeln('运行命令: \u001b[32m' + name + '\u001b[39m 在 \u001b[32m' + + (new Date().toLocaleString()) + '\u001b[39m'); scroll(runtime.xterm); },