Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-12-12 17:04:26 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c4bfadefb6333c2db0bf57a700afe1d1f36925b8
c4bfadef
1 parent
92102492
history模式调整
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
src/components/common/hagerHeader.vue
src/router.js
src/components/common/hagerHeader.vue
View file @
c4bfade
<!--
* @Date: 2024-09-26 13:42:11
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-12-12 15:
01:0
3
* @LastEditTime: 2024-12-12 15:
28:5
3
* @FilePath: /hager/src/components/common/hagerHeader.vue
* @Description: 文件描述
-->
...
...
@@ -64,12 +64,12 @@
<div :class="[is_active === 'about' ? 'active' : '', 'item']" @click="goTo('/about')">关于海格</div>
<div :class="[is_active === 'contact' ? 'active' : '', 'item']" @click="goTo('/contact')">联系我们</div>
<div :class="[is_active === 'index' ? 'active' : '', 'item']" @click="goTo('/')">首页</div> -->
<a :class="[is_active === 'solution' ? 'active' : '', 'item']" :href="`${baseUrl}
#/solution/index`" @click
="goTo('/solution/index')">解决方案</a>
<a :class="[is_active === 'news' ? 'active' : '', 'item']" :href="`${baseUrl}
#/news`" @click
="goTo('/news')">新闻中心</a>
<a :class="[is_active === 'recruit' ? 'active' : '', 'item']" :href="`${baseUrl}
#/recruit`" @click
="goTo('/recruit')">招聘信息</a>
<a :class="[is_active === 'about' ? 'active' : '', 'item']" :href="`${baseUrl}
#/about`" @click
="goTo('/about')">关于海格</a>
<a :class="[is_active === 'contact' ? 'active' : '', 'item']" :href="`${baseUrl}
#/contact`" @click
="goTo('/contact')">联系我们</a>
<a :class="[is_active === 'index' ? 'active' : '', 'item']" :href="`${baseUrl}
#/`" @click
="goTo('/')">首页</a>
<a :class="[is_active === 'solution' ? 'active' : '', 'item']" :href="`${baseUrl}
/solution/index`" @click.prevent
="goTo('/solution/index')">解决方案</a>
<a :class="[is_active === 'news' ? 'active' : '', 'item']" :href="`${baseUrl}
/news`" @click.prevent
="goTo('/news')">新闻中心</a>
<a :class="[is_active === 'recruit' ? 'active' : '', 'item']" :href="`${baseUrl}
/recruit`" @click.prevent
="goTo('/recruit')">招聘信息</a>
<a :class="[is_active === 'about' ? 'active' : '', 'item']" :href="`${baseUrl}
/about`" @click.prevent
="goTo('/about')">关于海格</a>
<a :class="[is_active === 'contact' ? 'active' : '', 'item']" :href="`${baseUrl}
/contact`" @click.prevent
="goTo('/contact')">联系我们</a>
<a :class="[is_active === 'index' ? 'active' : '', 'item']" :href="`${baseUrl}
/`" @click.prevent
="goTo('/')">首页</a>
</div>
</el-col>
</el-row>
...
...
@@ -210,7 +210,7 @@ export default {
},
computed: {
baseUrl () {
return location.origin
+ location.pathname
;
return location.origin;
}
},
async mounted () {
...
...
src/router.js
View file @
c4bfade
...
...
@@ -12,8 +12,9 @@ import ConfigRouter from './route.js'
Vue
.
use
(
VueRouter
)
const
router
=
new
VueRouter
({
history
:
false
,
hashbang
:
true
,
// history: false,
// hashbang: true,
mode
:
'history'
,
base
:
'/'
,
routes
:
ConfigRouter
,
scrollBehavior
(
to
,
from
,
savedPosition
)
{
...
...
Please
register
or
login
to post a comment