mirror of
https://github.com/nuintun/command-manager.git
synced 2025-10-20 01:27:47 +08:00
update files
This commit is contained in:
@@ -1,21 +1,28 @@
|
||||
<project-configure :project="project" :unique-projects.sync="uniqueProjects"></project-configure>
|
||||
<div class="ui-project-stage fn-hide">
|
||||
<project-configure :show.sync="showSetting" :project="project" :unique-projects.sync="uniqueProjects">
|
||||
</project-configure>
|
||||
<div class="ui-project-stage">
|
||||
<div class="ui-control-bar fn-clear">
|
||||
<div class="ui-control-operate fn-left">
|
||||
<a title="删除项目" href="javascript:;"><i class="icon-trash"></i></a>
|
||||
<a title="设置项目" href="javascript:;"><i class="icon-gear"></i></a>
|
||||
<a title="删除项目" href="javascript:;" @click="remove"><i class="icon-trash"></i></a>
|
||||
<a title="设置项目" href="javascript:;" @click="setting"><i class="icon-gear"></i></a>
|
||||
</div>
|
||||
<div class="fn-right">
|
||||
<ul class="ui-command fn-clear">
|
||||
<li><a href="javascript:;"><i class="icon-play"></i>命令1</a></li>
|
||||
<li><a href="javascript:;"><i class="icon-stop"></i>命令2</a></li>
|
||||
<li><a href="javascript:;"><i class="icon-play"></i>命令3</a></li>
|
||||
<li class="ui-command-more">
|
||||
<li v-for="cmd in comand">
|
||||
<a href="javascript:;">
|
||||
<i class="icon-play"></i>
|
||||
{{ cmd.name }}
|
||||
</a>
|
||||
</li>
|
||||
<li v-if="moreCommand.length" class="ui-command-more">
|
||||
<a href="javascript:;">更多 <i class="icon-expand"></i></a>
|
||||
<ul class="ui-command-popup fn-hide">
|
||||
<li><a href="javascript:;"><i class="icon-play"></i>命令4</a></li>
|
||||
<li><a href="javascript:;"><i class="icon-stop"></i>命令5</a></li>
|
||||
<li><a href="javascript:;"><i class="icon-play"></i>命令6</a></li>
|
||||
<li v-for="moreCmd in moreCommand">
|
||||
<a href="javascript:;">
|
||||
<i class="icon-play"></i>
|
||||
{{ moreCmd.name }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -5,7 +5,6 @@
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var ipc = require('ipc-renderer');
|
||||
var Vue = require('../../vue/vue');
|
||||
|
||||
require('../project-configure');
|
||||
@@ -29,11 +28,18 @@ module.exports = Vue.component('app-main', {
|
||||
}
|
||||
},
|
||||
data: function (){
|
||||
return {};
|
||||
return {
|
||||
showSetting: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
project: function (){
|
||||
var project = this.projects[this.activeIndex];
|
||||
var project = this.projects[this.activeIndex] || {
|
||||
name: '',
|
||||
path: '',
|
||||
env: [],
|
||||
command: []
|
||||
};
|
||||
|
||||
if (!project.env) {
|
||||
project.env = [];
|
||||
@@ -44,11 +50,22 @@ module.exports = Vue.component('app-main', {
|
||||
}
|
||||
|
||||
return JSON.parse(JSON.stringify(project));
|
||||
},
|
||||
command: function (){
|
||||
console.log(this.project.command.slice(0, 3));
|
||||
return this.project.command.slice(0, 3);
|
||||
},
|
||||
moreCommand: function (){
|
||||
return this.project.command.slice(3);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setting: function (){
|
||||
this.showSetting = true;
|
||||
},
|
||||
remove: function (){
|
||||
this.projects.splice(this.activeIndex, 1);
|
||||
this.activeIndex = 0;
|
||||
this.$dispatch('save-configure');
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user