Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
office-web-js
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
office-web-js
Commits
44ac2c4e
Commit
44ac2c4e
authored
Jan 12, 2023
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 标题栏跟随页面变化
parent
e9ba7df6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
src/main.js
+7
-0
src/router/index.js
+11
-0
No files found.
src/main.js
View file @
44ac2c4e
...
...
@@ -7,6 +7,13 @@ import './styles/index.scss'
Vue
.
config
.
productionTip
=
false
const
title
=
document
.
title
router
.
afterEach
((
to
)
=>
{
if
(
to
.
meta
?.
title
)
{
document
.
title
=
`
${
to
.
meta
.
title
}
-
${
title
}
`
}
})
new
Vue
({
router
,
store
,
...
...
src/router/index.js
View file @
44ac2c4e
...
...
@@ -12,6 +12,9 @@ import ContactPage from '@/views/Home/ContactPage.vue'
Vue
.
use
(
VueRouter
)
/**
* @type {import('vue-router').RouteConfig}
*/
const
routes
=
[
{
path
:
'/'
,
...
...
@@ -21,41 +24,49 @@ const routes = [
path
:
'/'
,
name
:
'IndexPage'
,
component
:
IndexPage
,
meta
:
{
title
:
'首页'
},
},
{
path
:
'/about'
,
name
:
'AboutPage'
,
component
:
AboutPage
,
meta
:
{
title
:
'关于晶闪'
},
},
{
path
:
'/colorful'
,
name
:
'ColorfulPage'
,
component
:
ColorfulPage
,
meta
:
{
title
:
'多彩晶闪'
},
},
{
path
:
'/culture'
,
name
:
'CulturePage'
,
component
:
CulturePage
,
meta
:
{
title
:
'企业文化'
},
},
{
path
:
'/join-us'
,
name
:
'JoinUsPage'
,
component
:
JoinUsPage
,
meta
:
{
title
:
'加入我们'
},
},
{
path
:
'/supplier-apply'
,
name
:
'SupplierApplyPage'
,
component
:
SupplierApplyPage
,
meta
:
{
title
:
'申请加入'
},
},
{
path
:
'/supplier-report'
,
name
:
'SupplierReportPage'
,
component
:
SupplierReportPage
,
meta
:
{
title
:
'供应商举报信'
},
},
{
path
:
'/contact'
,
name
:
'ContactPage'
,
component
:
ContactPage
,
meta
:
{
title
:
'联系我们'
},
},
],
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment