update files

This commit is contained in:
nuintun 2015-11-24 15:25:20 +08:00
parent bc188752b4
commit 3b498fca42
4 changed files with 23 additions and 2 deletions

View File

@ -14,6 +14,10 @@ require('../components/app-nav');
require('../components/app-main');
require('../components/no-data');
// app runtime
window.AppRuntime = {};
// add DOMContentLoaded event
window.addEventListener('DOMContentLoaded', function (){
var app;

View File

@ -12,7 +12,7 @@
<div class="fn-right">
<ul class="ui-command fn-clear">
<li v-for="cmd in command">
<a :title="cmd.name" href="javascript:;">
<a :title="cmd.name" href="javascript:;" @click="exec(cmd.name, cmd.value)">
<i class="icon-play"></i>
{{ cmd.name }}
</a>
@ -21,7 +21,7 @@
<a v-el:expand-trigger title="更多" href="javascript:;">更多&nbsp;<i class="icon-expand"></i></a>
<ul v-show="expandCommand" class="ui-command-popup">
<li v-for="moreCmd in moreCommand">
<a :title="moreCmd.name" href="javascript:;">
<a :title="moreCmd.name" href="javascript:;" @click="exec(moreCmd.name, moreCmd.value)">
<i class="icon-play"></i>
{{ moreCmd.name }}
</a>

View File

@ -71,6 +71,20 @@ module.exports = Vue.component('app-main', {
}
},
methods: {
isRunning: function (){
},
exec: function (name, command){
console.log('run %s: %s', name, command);
if (!window.AppRuntime[this.project.name]) {
window.AppRuntime[this.project.name] = {
name: name,
command: command,
terminal: ''
}
}
},
setting: function (){
this.showSetting = true;
},

View File

@ -0,0 +1,3 @@
/**
* Created by nuintun on 2015/11/24.
*/