fixes: Stop help shortcut when modal is opened

This commit is contained in:
AkiraFukushima 2018-08-24 00:17:47 +09:00
parent 7e0a0510da
commit 58b5fb1dc9
1 changed files with 9 additions and 3 deletions

View File

@ -5,7 +5,7 @@
:element-loading-text="$t('message.loading')"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
v-shortkey="{help: ['h']}"
v-shortkey="shortcutEnabled ? {help: ['h']} : {}"
@shortkey="handleKey"
>
<side-menu></side-menu>
@ -21,7 +21,7 @@
</template>
<script>
import { mapState } from 'vuex'
import { mapState, mapGetters } from 'vuex'
import SideMenu from './TimelineSpace/SideMenu'
import HeaderMenu from './TimelineSpace/HeaderMenu'
import Contents from './TimelineSpace/Contents'
@ -42,7 +42,13 @@ export default {
...mapState({
loading: state => state.TimelineSpace.loading,
collapse: state => state.TimelineSpace.SideMenu.collapse
})
}),
...mapGetters('TimelineSpace/Modals', [
'modalOpened'
]),
shortcutEnabled: function () {
return !this.modalOpened
}
},
created () {
this.$store.commit('TimelineSpace/changeLoading', true)