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

View File

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

View File

@ -1,3 +1,3 @@
<label>{{label}}</label> <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> <a title="选择项目" href="javascript:;" class="icon-ellipsis" @click="open"></a>

View File

@ -26,9 +26,6 @@ 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,9 +34,6 @@ 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

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