perf: fixed eslint errors

This commit is contained in:
Pan 2019-02-01 14:09:29 +08:00
parent 3b9abde89a
commit 6e42b4c896
3 changed files with 18 additions and 19 deletions

View file

@ -1,6 +1,6 @@
<template>
<!-- eslint-disable vue/require-component-is-->
<!-- eslint-disable vue/require-component-is -->
<component v-bind="linkProps(to)">
<slot/>
</component>
@ -17,11 +17,8 @@ export default {
}
},
methods: {
isExternalLink(routePath) {
return isExternal(routePath)
},
linkProps(url) {
if (this.isExternalLink(url)) {
if (isExternal(url)) {
return {
is: 'a',
href: url,

View file

@ -14,20 +14,22 @@
<item v-if="item.meta" :icon="item.meta.icon" :title="generateTitle(item.meta.title)" />
</template>
<template v-for="child in item.children" v-if="!child.hidden">
<sidebar-item
v-if="child.children&&child.children.length>0"
:is-nest="true"
:item="child"
:key="child.path"
:base-path="resolvePath(child.path)"
class="nest-menu" />
<template v-for="child in item.children">
<template v-if="!child.hidden">
<sidebar-item
v-if="child.children&&child.children.length>0"
:is-nest="true"
:item="child"
:key="child.path"
:base-path="resolvePath(child.path)"
class="nest-menu" />
<app-link v-else :to="resolvePath(child.path)" :key="child.name">
<el-menu-item :index="resolvePath(child.path)">
<item v-if="child.meta" :icon="child.meta.icon" :title="generateTitle(child.meta.title)" />
</el-menu-item>
</app-link>
<app-link v-else :to="resolvePath(child.path)" :key="child.name">
<el-menu-item :index="resolvePath(child.path)">
<item v-if="child.meta" :icon="child.meta.icon" :title="generateTitle(child.meta.title)" />
</el-menu-item>
</app-link>
</template>
</template>
</el-submenu>

View file

@ -46,7 +46,7 @@
</el-table-column>
<el-table-column align="center" label="Drag" width="80">
<template slot-scope="scope">
<template slot-scope="{}">
<svg-icon class="drag-handler" icon-class="drag"/>
</template>
</el-table-column>