Commit b74ab40e authored by Pan's avatar Pan

refine code

parent 00941628
<template>
<svg :class="svgClass" aria-hidden="true">
<svg :class="svgClass" aria-hidden="true" v-on="$listeners">
<use :xlink:href="iconName"/>
</svg>
</template>
......
<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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment