mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-08 20:24:04 +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/app-main');
|
||||||
require('../components/no-data');
|
require('../components/no-data');
|
||||||
|
|
||||||
|
// app runtime
|
||||||
|
window.AppRuntime = {};
|
||||||
|
|
||||||
|
// add DOMContentLoaded event
|
||||||
window.addEventListener('DOMContentLoaded', function (){
|
window.addEventListener('DOMContentLoaded', function (){
|
||||||
var app;
|
var app;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="fn-right">
|
<div class="fn-right">
|
||||||
<ul class="ui-command fn-clear">
|
<ul class="ui-command fn-clear">
|
||||||
<li v-for="cmd in command">
|
<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>
|
<i class="icon-play"></i>
|
||||||
{{ cmd.name }}
|
{{ cmd.name }}
|
||||||
</a>
|
</a>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<a v-el:expand-trigger title="更多" href="javascript:;">更多 <i class="icon-expand"></i></a>
|
<a v-el:expand-trigger title="更多" href="javascript:;">更多 <i class="icon-expand"></i></a>
|
||||||
<ul v-show="expandCommand" class="ui-command-popup">
|
<ul v-show="expandCommand" class="ui-command-popup">
|
||||||
<li v-for="moreCmd in moreCommand">
|
<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>
|
<i class="icon-play"></i>
|
||||||
{{ moreCmd.name }}
|
{{ moreCmd.name }}
|
||||||
</a>
|
</a>
|
||||||
|
@ -71,6 +71,20 @@ module.exports = Vue.component('app-main', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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 (){
|
setting: function (){
|
||||||
this.showSetting = true;
|
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