mirror of
https://github.com/nuintun/command-manager.git
synced 2025-06-09 21:14:06 +08:00
update files
This commit is contained in:
parent
18027aa3ef
commit
9e10fc0d56
@ -18,7 +18,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li v-if="moreCommand.length" class="ui-command-more">
|
||||
<a href="javascript:;" @click="commandToggle">更多 <i class="icon-expand"></i></a>
|
||||
<a v-el:expand-trigger href="javascript:;">更多 <i class="icon-expand"></i></a>
|
||||
<ul v-show="showMoreCommand" class="ui-command-popup">
|
||||
<li v-for="moreCmd in moreCommand">
|
||||
<a :title="moreCmd.name" href="javascript:;">
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user