Skip to content

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
elunez committed Mar 9, 2020
1 parent fa00320 commit 57cd250
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/assets/icons/svg/doc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/svg/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/icons/svg/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/components/Doc/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<div>
<svg-icon icon-class="doc" @click="click" />
</div>
</template>

<script>
export default {
name: 'Doc',
methods: {
click() {
window.open('https://docs.auauz.net/guide/', '_blank')
}
}
}
</script>
2 changes: 1 addition & 1 deletion src/components/Github/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<svg-icon icon-class="github" @click="click" />
<svg-icon icon-class="download" @click="click" />
</div>
</template>

Expand Down
15 changes: 8 additions & 7 deletions src/layout/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
<template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" />

<el-tooltip content="源码地址" effect="dark" placement="bottom">
<el-tooltip content="源码下载" effect="dark" placement="bottom">
<Github class="right-menu-item hover-effect" />
</el-tooltip>

<el-tooltip content="项目文档" effect="dark" placement="bottom">
<Doc class="right-menu-item hover-effect" />
</el-tooltip>

<el-tooltip content="全屏缩放" effect="dark" placement="bottom">
<screenfull id="screenfull" class="right-menu-item hover-effect" />
</el-tooltip>
Expand All @@ -28,11 +32,6 @@
<i class="el-icon-caret-bottom" />
</div>
<el-dropdown-menu slot="dropdown">
<a target="_blank" href="https://docs.auauz.net/">
<el-dropdown-item>
项目文档
</el-dropdown-item>
</a>
<span style="display:block;" @click="show = true">
<el-dropdown-item>
布局设置
Expand All @@ -59,6 +58,7 @@ import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb'
import Hamburger from '@/components/Hamburger'
import Github from '@/components/Github'
import Doc from '@/components/Doc'
import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
Expand All @@ -71,7 +71,8 @@ export default {
Screenfull,
SizeSelect,
Search,
Github
Github,
Doc
},
data() {
return {
Expand Down

0 comments on commit 57cd250

Please sign in to comment.