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
ce0ac0c6
Commit
ce0ac0c6
authored
Mar 02, 2022
by
chenqikuai
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
15d50d4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Header.vue
src/layout/MainPage/Header.vue
+7
-3
No files found.
src/layout/MainPage/Header.vue
View file @
ce0ac0c6
...
@@ -238,8 +238,12 @@ export default Vue.extend({
...
@@ -238,8 +238,12 @@ export default Vue.extend({
mounted
()
{
mounted
()
{
const
scrollY
=
window
.
scrollY
const
scrollY
=
window
.
scrollY
const
type
=
this
.
$route
.
query
as
any
const
type
=
this
.
$route
.
query
as
any
this
.
iconType
=
type
.
lang
||
'zh-CN'
this
.
iconType
=
window
.
sessionStorage
.
setItem
(
'language'
,
this
.
iconType
)
type
.
lang
||
window
.
sessionStorage
.
getItem
(
'language'
)
||
'zh-CN'
window
.
sessionStorage
.
setItem
(
'language'
,
window
.
sessionStorage
.
getItem
(
'language'
)
||
this
.
iconType
,
)
this
.
$i18n
.
locale
=
this
.
iconType
===
'zh-CN'
?
'zh'
:
'en'
this
.
$i18n
.
locale
=
this
.
iconType
===
'zh-CN'
?
'zh'
:
'en'
this
.
isTop
=
scrollY
<
70
?
true
:
false
this
.
isTop
=
scrollY
<
70
?
true
:
false
window
.
addEventListener
(
'scroll'
,
()
=>
{
window
.
addEventListener
(
'scroll'
,
()
=>
{
...
@@ -251,7 +255,7 @@ export default Vue.extend({
...
@@ -251,7 +255,7 @@ export default Vue.extend({
$route
(
n
,
o
)
{
$route
(
n
,
o
)
{
const
scrollY
=
window
.
scrollY
const
scrollY
=
window
.
scrollY
this
.
iconType
=
this
.
iconType
=
n
.
query
.
lang
||
window
.
sessionStorage
.
getItem
(
'language'
)
||
'zh-CN'
window
.
sessionStorage
.
getItem
(
'language'
)
||
n
.
query
.
lang
||
'zh-CN'
this
.
isTop
=
scrollY
<
70
?
true
:
false
this
.
isTop
=
scrollY
<
70
?
true
:
false
window
.
addEventListener
(
'scroll'
,
()
=>
{
window
.
addEventListener
(
'scroll'
,
()
=>
{
const
scrollY
=
window
.
scrollY
const
scrollY
=
window
.
scrollY
...
...
chenqikuai
@chenqikuai
mentioned in commit
748f7ae1
·
Mar 03, 2022
mentioned in commit
748f7ae1
mentioned in commit 748f7ae18ac2f8eb14ee7c2865eaea786342a520
Toggle commit list
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