mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-07 11:34:05 +08:00
update files
This commit is contained in:
parent
bc188752b4
commit
3b498fca42
@ -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;
|
||||
|
||||
|
@ -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:;">更多 <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>
|
||||
|
@ -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;
|
||||
},
|
||||
|
3
static/js/terminal/index.js
Normal file
3
static/js/terminal/index.js
Normal file
@ -0,0 +1,3 @@
|
||||
/**
|
||||
* Created by nuintun on 2015/11/24.
|
||||
*/
|
Loading…
x
Reference in New Issue
Block a user