From bc67b1c0d1f76f3c4e37752d9cced1d7ac20a4cb Mon Sep 17 00:00:00 2001 From: nuintun Date: Tue, 24 Nov 2015 18:48:08 +0800 Subject: [PATCH] update files --- static/js/components/app-main/app-main.html | 2 +- static/js/components/app-main/index.js | 10 ++++++++++ static/js/terminal/termlib.js | 11 +++-------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/static/js/components/app-main/app-main.html b/static/js/components/app-main/app-main.html index b755f43..ee7437b 100644 --- a/static/js/components/app-main/app-main.html +++ b/static/js/components/app-main/app-main.html @@ -31,5 +31,5 @@ -
+
\ No newline at end of file diff --git a/static/js/components/app-main/index.js b/static/js/components/app-main/index.js index 73abe62..5cd1d7c 100644 --- a/static/js/components/app-main/index.js +++ b/static/js/components/app-main/index.js @@ -8,6 +8,7 @@ var fs = require('fs'); var path = require('path'); var util = require('../../util'); var Vue = require('../../vue/vue'); +var Terminal = require('../../terminal/termlib'); const EMPTYPROJECT = { name: '', @@ -78,6 +79,15 @@ module.exports = Vue.component('app-main', { console.log('run %s: %s', name, command); if (!window.AppRuntime[this.project.name]) { + var xterm = new Terminal({ + x: 220, + y: 70, + termDiv: this.$els.terminal + }); + + xterm.open(); + xterm.write('aasdsad'); + window.AppRuntime[this.project.name] = { name: name, command: command, diff --git a/static/js/terminal/termlib.js b/static/js/terminal/termlib.js index f41edf9..366fd0f 100644 --- a/static/js/terminal/termlib.js +++ b/static/js/terminal/termlib.js @@ -1821,7 +1821,7 @@ Terminal.prototype = { var termOffset = 2 + this.conf.frameWidth; if (this.globals.hasSubDivs) { - for (var r = 0; r < this.conf.rows; r++) { + for (r = 0; r < this.conf.rows; r++) { s += '
<\/div>\n'; @@ -3299,10 +3299,5 @@ Terminal.prototype = { // initialize global data Terminal.prototype.globals._initGlobals(); -// global entities for backward compatibility with termlib 1.x applications -var TerminalDefaults = Terminal.prototype.Defaults; -var termDefaultHandler = Terminal.prototype.defaultHandler; -var TermGlobals = Terminal.prototype.globals; -var termKey = Terminal.prototype.globals.termKey; -var termDomKeyRef = Terminal.prototype.globals.termDomKeyRef; -// eof \ No newline at end of file +// eof +module.exports = Terminal;