| | |
| | | :index="item[pathKey]"> |
| | | <template slot="title"> |
| | | <div style="display: flex"> |
| | | <icon-show :name="item[iconKey]" class="iconShowSpan"></icon-show> |
| | | <icon-show :name="item[iconKey]" class="iconShowSpan" :style="{ height: iconSize, width: iconSize }"></icon-show> |
| | | <span slot="title" |
| | | :class="{'el-menu--display':collapse && first}">{{ generateTitle(item) }}</span> |
| | | </div> |
| | |
| | | :index="child[pathKey],cindex" |
| | | @click="open(child)"> |
| | | <div style="display: flex"> |
| | | <icon-show :name="child[iconKey]" class="iconShowSpan"></icon-show> |
| | | <icon-show :name="child[iconKey]" class="iconShowSpan" :style="{ height: iconSize, width: iconSize }"></icon-show> |
| | | <span slot="title">{{ generateTitle(child) }}</span> |
| | | </div> |
| | | </el-menu-item> |
| | |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["roles"]), |
| | | iconSize() { |
| | | return this.collapse ? '20px' : '16px'; |
| | | }, |
| | | labelKey() { |
| | | return this.props.label || this.config.propsDefault.label; |
| | | }, |
| | |
| | | .iconShowSpan{ |
| | | display: inline-block; |
| | | margin-top: -2px; |
| | | width: 16px !important; |
| | | height: 16px !important; |
| | | margin-right: 10px; |
| | | color: #eeeeea; |
| | | } |
| | | |
| | | </style> |
| | | |
| | | |