mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-09-10 21:30:14 +08:00
add external-link demo
This commit is contained in:
parent
92012a6691
commit
82db233def
1
src/icons/svg/link.svg
Normal file
1
src/icons/svg/link.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1534846208920" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2941" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M912 1008.512H15.488V112h448.256v96H111.488v704.512H816V560.256h96z" p-id="2942"></path><path d="M918.208 37.888l67.904 67.904L545.984 545.92 478.08 478.08z" p-id="2943"></path><path d="M1007.168 310.656h-96V112h-208V16h304z" p-id="2944"></path></svg>
|
After Width: | Height: | Size: 637 B |
@ -60,7 +60,8 @@ export default {
|
|||||||
exportZip: 'Export Zip',
|
exportZip: 'Export Zip',
|
||||||
theme: 'Theme',
|
theme: 'Theme',
|
||||||
clipboardDemo: 'Clipboard',
|
clipboardDemo: 'Clipboard',
|
||||||
i18n: 'I18n'
|
i18n: 'I18n',
|
||||||
|
externalLink: 'External Link'
|
||||||
},
|
},
|
||||||
navbar: {
|
navbar: {
|
||||||
logOut: 'Log Out',
|
logOut: 'Log Out',
|
||||||
|
@ -60,7 +60,8 @@ export default {
|
|||||||
exportZip: 'Export Zip',
|
exportZip: 'Export Zip',
|
||||||
theme: '换肤',
|
theme: '换肤',
|
||||||
clipboardDemo: 'Clipboard',
|
clipboardDemo: 'Clipboard',
|
||||||
i18n: '国际化'
|
i18n: '国际化',
|
||||||
|
externalLink: '外链'
|
||||||
},
|
},
|
||||||
navbar: {
|
navbar: {
|
||||||
logOut: '退出登录',
|
logOut: '退出登录',
|
||||||
|
@ -322,5 +322,16 @@ export const asyncRouterMap = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
path: 'external-link',
|
||||||
|
component: Layout,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'https://github.com/PanJiaChen/vue-element-admin',
|
||||||
|
meta: { title: 'externalLink', icon: 'link' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
{ path: '*', redirect: '/404', hidden: true }
|
{ path: '*', redirect: '/404', hidden: true }
|
||||||
]
|
]
|
||||||
|
@ -1,11 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="!item.hidden&&item.children" class="menu-wrapper">
|
<div v-if="!item.hidden&&item.children" class="menu-wrapper">
|
||||||
|
|
||||||
<router-link v-if="hasOneShowingChild(item.children) && !onlyOneChild.children&&!item.alwaysShow" :to="resolvePath(onlyOneChild.path)">
|
<template v-if="hasOneShowingChild(item.children) && !onlyOneChild.children&&!item.alwaysShow">
|
||||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
<a v-if="isExternalLink(onlyOneChild.path)" :href="onlyOneChild.path" target="blank">
|
||||||
<item v-if="onlyOneChild.meta" :icon="onlyOneChild.meta.icon" :title="generateTitle(onlyOneChild.meta.title)" />
|
apple
|
||||||
</el-menu-item>
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||||
</router-link>
|
<item v-if="onlyOneChild.meta" :icon="onlyOneChild.meta.icon" :title="generateTitle(onlyOneChild.meta.title)" />
|
||||||
|
</el-menu-item>
|
||||||
|
</a>
|
||||||
|
<router-link v-else :to="resolvePath(onlyOneChild.path)">
|
||||||
|
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||||
|
<item v-if="onlyOneChild.meta" :icon="onlyOneChild.meta.icon" :title="generateTitle(onlyOneChild.meta.title)" />
|
||||||
|
</el-menu-item>
|
||||||
|
</router-link>
|
||||||
|
</template>
|
||||||
|
|
||||||
<el-submenu v-else :index="item.name||item.path">
|
<el-submenu v-else :index="item.name||item.path">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user