update files

This commit is contained in:
nuintun 2015-11-23 23:23:40 +08:00
parent f33ddb479b
commit 9771e79e10
6 changed files with 14 additions and 4 deletions

View File

@ -85,7 +85,7 @@ function verifyConfigure(configure){
&& command.value && typeof command.value === 'string';
});
if (commandValid) {
if (!commandValid) {
return false;
}
} else {

View File

@ -185,6 +185,7 @@ a:hover {
background-color: #f57527;
}
header {
height: 24px;
padding: 3px 6px;
position: relative;
-webkit-app-region: drag;

View File

@ -46,6 +46,8 @@ module.exports = Vue.component('app-configure', {
this.showPopup = !this.showPopup;
if (!this.showPopup) {
this.name = '';
this.path = '';
this.submitError = '';
// clean error
@ -62,6 +64,8 @@ module.exports = Vue.component('app-configure', {
this.showPopup = false;
this.configure.projects.push({ name: this.name, path: this.path, env: [], command: [] });
this.name = '';
this.path = '';
this.submitError = '';
// clean error

View File

@ -3,7 +3,7 @@
:project="project"
:unique-projects.sync="uniqueProjects">
</project-configure>
<div class="ui-project-stage">
<div v-show="project.name && project.path" class="ui-project-stage">
<div class="ui-control-bar fn-clear">
<div class="ui-control-operate fn-left">
<a title="删除项目" href="javascript:;" @click="remove"><i class="icon-trash"></i></a>

View File

@ -37,7 +37,12 @@ module.exports = Vue.component('app-main', {
},
computed: {
project: function (){
return util.clone(this.projects[this.activeIndex]);
return util.clone(this.projects[this.activeIndex]) || {
name: '',
path: '',
env: [],
command: []
};
},
command: function (){
return this.project.command.slice(0, 3);

View File

@ -1,4 +1,4 @@
<ul>
<ul v-show="configure.projects.length">
<li v-for="(index, project) in configure.projects">
<a href="javascript:;" :class="{ active: activeIndex === index }" :title="project.name" @click="select(index)">
<i class="icon-folder"></i>{{ project.name }}