update files

This commit is contained in:
Nuintun 2015-11-20 16:34:41 +08:00
parent 5950b48276
commit d280e911e7
4 changed files with 8 additions and 2 deletions

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
<li> <li>
<label>项目名称:</label> <label>项目名称:</label>
<input type="text" v-model="name" placeholder="项目名称"/> <input type="text" v-model="name" placeholder="项目名称" lazy @focus="focus('nameError')"/>
</li> </li>
<li v-show="nameError" class="ui-item-error"> <li v-show="nameError" class="ui-item-error">
<label class="fn-invisible">&emsp;&emsp;&emsp;&emsp;&emsp;</label> <label class="fn-invisible">&emsp;&emsp;&emsp;&emsp;&emsp;</label>