update files

This commit is contained in:
Nuintun 2015-11-20 16:45:19 +08:00
parent d280e911e7
commit b31cda4eab
6 changed files with 6 additions and 9 deletions

View File

@ -17,7 +17,7 @@
</div>
<div class="ui-popup-content">
<div v-show="submitError" class="ui-submit-tips">{{ submitError }}</div>
<form @submit.prevent="addProject">
<form @submit.prevent="addProject" @focusin="focus">
<ul>
<li is="project-base" :name.sync="name" :path.sync="path"></li>
<li class="ui-popup-control">

View File

@ -28,6 +28,9 @@ module.exports = Vue.component('app-configure', {
}
},
methods: {
focus: function (){
this.submitError = '';
},
appConfigure: function (command, configure){
ipc.send('app-configure', command, configure);
},

View File

@ -1,3 +1,3 @@
<label>{{label}}</label>
<input type="text" :title="path" :placeholder="label" v-model="path" lazy @focus="focus"/>&nbsp;
<input type="text" :title="path" :placeholder="label" v-model="path" lazy/>&nbsp;
<a title="选择项目" href="javascript:;" class="icon-ellipsis" @click="open"></a>

View File

@ -26,9 +26,6 @@ module.exports = Vue.component('directory', {
methods: {
open: function (){
ipc.send('open-directory', this.path, this._uid);
},
focus: function (){
this.$dispatch('directory-input-focus');
}
},
created: function (){

View File

@ -34,9 +34,6 @@ module.exports = Vue.component('project-base', {
}
},
events: {
'directory-input-focus': function (){
this.pathError = '';
},
'clean-error': function (){
this.nameError = '';
this.pathError = '';

View File

@ -6,7 +6,7 @@
<label class="fn-invisible">&emsp;&emsp;&emsp;&emsp;&emsp;</label>
<span><i class="icon-expand"></i>{{ nameError }}</span>
</li>
<li>
<li @focusin="focus('pathError')">
<directory label="项目路径" :path.sync="path"></directory>
</li>
<li v-show="pathError" class="ui-item-error">