提交 6e42b4c8 编写于 作者: P Pan

perf: fixed eslint errors

上级 3b9abde8
<template> <template>
<!-- eslint-disable vue/require-component-is--> <!-- eslint-disable vue/require-component-is -->
<component v-bind="linkProps(to)"> <component v-bind="linkProps(to)">
<slot/> <slot/>
</component> </component>
...@@ -17,11 +17,8 @@ export default { ...@@ -17,11 +17,8 @@ export default {
} }
}, },
methods: { methods: {
isExternalLink(routePath) {
return isExternal(routePath)
},
linkProps(url) { linkProps(url) {
if (this.isExternalLink(url)) { if (isExternal(url)) {
return { return {
is: 'a', is: 'a',
href: url, href: url,
......
...@@ -14,20 +14,22 @@ ...@@ -14,20 +14,22 @@
<item v-if="item.meta" :icon="item.meta.icon" :title="generateTitle(item.meta.title)" /> <item v-if="item.meta" :icon="item.meta.icon" :title="generateTitle(item.meta.title)" />
</template> </template>
<template v-for="child in item.children" v-if="!child.hidden"> <template v-for="child in item.children">
<sidebar-item <template v-if="!child.hidden">
v-if="child.children&&child.children.length>0" <sidebar-item
:is-nest="true" v-if="child.children&&child.children.length>0"
:item="child" :is-nest="true"
:key="child.path" :item="child"
:base-path="resolvePath(child.path)" :key="child.path"
class="nest-menu" /> :base-path="resolvePath(child.path)"
class="nest-menu" />
<app-link v-else :to="resolvePath(child.path)" :key="child.name"> <app-link v-else :to="resolvePath(child.path)" :key="child.name">
<el-menu-item :index="resolvePath(child.path)"> <el-menu-item :index="resolvePath(child.path)">
<item v-if="child.meta" :icon="child.meta.icon" :title="generateTitle(child.meta.title)" /> <item v-if="child.meta" :icon="child.meta.icon" :title="generateTitle(child.meta.title)" />
</el-menu-item> </el-menu-item>
</app-link> </app-link>
</template>
</template> </template>
</el-submenu> </el-submenu>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="Drag" width="80"> <el-table-column align="center" label="Drag" width="80">
<template slot-scope="scope"> <template slot-scope="{}">
<svg-icon class="drag-handler" icon-class="drag"/> <svg-icon class="drag-handler" icon-class="drag"/>
</template> </template>
</el-table-column> </el-table-column>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册