update files

This commit is contained in:
nuintun
2015-11-24 14:07:42 +08:00
parent 18027aa3ef
commit 9e10fc0d56
2 changed files with 11 additions and 4 deletions

View File

@@ -55,9 +55,6 @@ module.exports = Vue.component('app-main', {
setting: function (){
this.showSetting = true;
},
commandToggle: function (){
this.showMoreCommand = !this.showMoreCommand;
},
remove: function (){
this.projects.splice(this.activeIndex, 1);
this.activeIndex = 0;
@@ -73,5 +70,15 @@ module.exports = Vue.component('app-main', {
this.projects.$set(this.activeIndex, project);
this.$dispatch('save-configure');
}
},
created: function (){
var context = this;
document.addEventListener('click', function (event){
var target = event.target;
var trigger = context.$els.expandTrigger;
context.showMoreCommand = !!trigger.contains(target);
});
}
});