update files

This commit is contained in:
nuintun 2015-11-24 18:48:08 +08:00
parent e8bbc3ebd5
commit bc67b1c0d1
3 changed files with 14 additions and 9 deletions

View File

@ -31,5 +31,5 @@
</ul>
</div>
</div>
<div class="ui-project-terminal"></div>
<div v-el:terminal class="ui-project-terminal"></div>
</div>

View File

@ -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,

View File

@ -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 id="' + divPrefix + r + '" style="position:absolute; top:'
+ (termOffset + r * this.conf.rowHeight) + 'px; left: ' + termOffset + 'px;" class="'
+ this.conf.fontClass + '"><\/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
// eof
module.exports = Terminal;