1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

Add default icon to run a Report or Process by default (#382)

This commit is contained in:
elsiosanchez 2020-03-11 20:58:07 -04:00 committed by GitHub
parent d8f4b7e89c
commit 2c586f6a7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 2 deletions

View File

@ -1,5 +1,6 @@
<template>
<div class="container-submenu-mobile container-context-menu">
<svg-icon v-if="isPanelTypeMobile" :icon-class="iconDefault" @click="runAction(actions[0])" />
<right-menu>
<el-menu
ref="contextMenu"
@ -126,6 +127,30 @@ export default {
components: {
RightMenu
},
mixins: [contextMixin]
mixins: [contextMixin],
computed: {
isPanelTypeMobile() {
console.log(this.panelType, this.$route.meta.type)
if (this.$route.meta.type === 'process' || this.$route.meta.type === 'report') {
return true
}
return false
},
iconDefault() {
if (this.$route.meta.type === 'process') {
return 'component'
}
return 'skill'
}
}
}
</script>
<style scoped>
.svg-icon {
width: 1em;
height: 2em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
</style>

View File

@ -106,7 +106,7 @@ export default {
.container-submenu-mobile {
position: absolute;
height: 39px !important;
width: 39px !important;
width: 55px !important;
right: 0;
top: 0;
}