Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ycc-website
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Website
ycc-website
Commits
2e4f4cc2
Commit
2e4f4cc2
authored
Mar 03, 2022
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复document.title随着语言的切换没有变化的bug
parent
afbbc324
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
iconSelect.vue
src/components/iconSelect.vue
+3
-1
Header.vue
src/layout/MainPage/Header.vue
+3
-0
No files found.
src/components/iconSelect.vue
View file @
2e4f4cc2
...
@@ -38,8 +38,10 @@ export default Vue.extend({
...
@@ -38,8 +38,10 @@ export default Vue.extend({
this
.
$emit
(
'hidden'
,
true
)
this
.
$emit
(
'hidden'
,
true
)
window
.
sessionStorage
.
setItem
(
'language'
,
v
)
window
.
sessionStorage
.
setItem
(
'language'
,
v
)
this
.
$i18n
.
locale
=
v
===
'zh-CN'
?
'zh'
:
'en'
this
.
$i18n
.
locale
=
v
===
'zh-CN'
?
'zh'
:
'en'
document
.
title
=
`
${
this
.
$t
(
'lang.YUANLIAN'
)}
YCC——
${
this
.
$t
(
'lang.title'
,
)}
`
moment
.
locale
(
v
===
'zh-CN'
?
'zh-cn'
:
'en'
)
moment
.
locale
(
v
===
'zh-CN'
?
'zh-cn'
:
'en'
)
console
.
log
({...
this
.
$route
.
query
,
lang
:
v
})
this
.
$router
.
replace
({
path
:
this
.
$route
.
path
,
query
:
{
...
this
.
$route
.
query
,
lang
:
v
}})
this
.
$router
.
replace
({
path
:
this
.
$route
.
path
,
query
:
{
...
this
.
$route
.
query
,
lang
:
v
}})
}
}
},
},
...
...
src/layout/MainPage/Header.vue
View file @
2e4f4cc2
...
@@ -272,6 +272,9 @@ export default Vue.extend({
...
@@ -272,6 +272,9 @@ export default Vue.extend({
this
.
isTop
=
scrollY
<
70
?
true
:
false
this
.
isTop
=
scrollY
<
70
?
true
:
false
})
})
moment
.
locale
(
this
.
iconType
===
'zh-CN'
?
'zh-cn'
:
'en'
)
moment
.
locale
(
this
.
iconType
===
'zh-CN'
?
'zh-cn'
:
'en'
)
document
.
title
=
`
${
this
.
$t
(
'lang.YUANLIAN'
)}
YCC——
${
this
.
$t
(
'lang.title'
,
)}
`
},
},
watch
:
{
watch
:
{
$route
(
n
,
o
)
{
$route
(
n
,
o
)
{
...
...
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