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
c27d10b4
Commit
c27d10b4
authored
Jan 13, 2023
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 跳转页面后滚动到最顶部
parent
b0524de0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
53 deletions
+53
-53
package-lock.json
+43
-41
src/components/HomePageFooter.vue
+3
-12
src/views/Home/HomePageWrapper.vue
+7
-0
No files found.
package-lock.json
View file @
c27d10b4
...
...
@@ -1969,6 +1969,49 @@
"webpack-merge"
:
"^5.7.3"
,
"webpack-virtual-modules"
:
"^0.4.2"
,
"whatwg-fetch"
:
"^3.6.2"
},
"dependencies"
:
{
"@vue/vue-loader-v15"
:
{
"version"
:
"npm:vue-loader@15.10.1"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.1.tgz"
,
"integrity"
:
"sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA=="
,
"dev"
:
true
,
"requires"
:
{
"@vue/component-compiler-utils"
:
"^3.1.0"
,
"hash-sum"
:
"^1.0.2"
,
"loader-utils"
:
"^1.1.0"
,
"vue-hot-reload-api"
:
"^2.3.0"
,
"vue-style-loader"
:
"^4.1.0"
},
"dependencies"
:
{
"hash-sum"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz"
,
"integrity"
:
"sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA=="
,
"dev"
:
true
}
}
},
"json5"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/json5/-/json5-1.0.2.tgz"
,
"integrity"
:
"sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA=="
,
"dev"
:
true
,
"requires"
:
{
"minimist"
:
"^1.2.0"
}
},
"loader-utils"
:
{
"version"
:
"1.4.2"
,
"resolved"
:
"https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz"
,
"integrity"
:
"sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg=="
,
"dev"
:
true
,
"requires"
:
{
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^1.0.1"
}
}
}
},
"@vue/cli-shared-utils"
:
{
...
...
@@ -2133,47 +2176,6 @@
}
}
},
"@vue/vue-loader-v15"
:
{
"version"
:
"npm:vue-loader@15.10.1"
,
"resolved"
:
"https://registry.npmmirror.com/vue-loader/-/vue-loader-15.10.1.tgz"
,
"integrity"
:
"sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA=="
,
"dev"
:
true
,
"requires"
:
{
"@vue/component-compiler-utils"
:
"^3.1.0"
,
"hash-sum"
:
"^1.0.2"
,
"loader-utils"
:
"^1.1.0"
,
"vue-hot-reload-api"
:
"^2.3.0"
,
"vue-style-loader"
:
"^4.1.0"
},
"dependencies"
:
{
"hash-sum"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmmirror.com/hash-sum/-/hash-sum-1.0.2.tgz"
,
"integrity"
:
"sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA=="
,
"dev"
:
true
},
"json5"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz"
,
"integrity"
:
"sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA=="
,
"dev"
:
true
,
"requires"
:
{
"minimist"
:
"^1.2.0"
}
},
"loader-utils"
:
{
"version"
:
"1.4.2"
,
"resolved"
:
"https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.2.tgz"
,
"integrity"
:
"sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg=="
,
"dev"
:
true
,
"requires"
:
{
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^1.0.1"
}
}
}
},
"@vue/web-component-wrapper"
:
{
"version"
:
"1.3.0"
,
"resolved"
:
"https://registry.npmmirror.com/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz"
,
...
...
src/components/HomePageFooter.vue
View file @
c27d10b4
...
...
@@ -8,12 +8,9 @@
class=
"footer-link-item footer-title underline-title"
:class=
"
{ active: isRouteActive(l) }"
>
<router-link
class=
"footer-link"
:to=
"l.route"
@
click=
"onLinkClicked"
>
{{
l
.
title
}}
</router-link
>
<router-link
class=
"footer-link"
:to=
"l.route"
>
{{
l
.
title
}}
</router-link>
</li>
</ul>
<div
class=
"footer-text"
>
...
...
@@ -60,12 +57,6 @@ export default {
return
nav
.
children
.
some
((
e
)
=>
e
.
route
===
path
)
}
},
onLinkClicked
()
{
window
.
scrollTo
({
top
:
0
,
behavior
:
'smooth'
,
})
},
},
}
</
script
>
...
...
src/views/Home/HomePageWrapper.vue
View file @
c27d10b4
...
...
@@ -14,6 +14,13 @@ import HomePageFooter from '@/components/HomePageFooter.vue'
export
default
{
name
:
'HomePage'
,
components
:
{
HomePageHeader
,
HomePageFooter
},
beforeRouteUpdate
(
to
,
from
,
next
)
{
window
.
scrollTo
({
top
:
0
,
behavior
:
'smooth'
,
})
next
()
},
}
</
script
>
<
style
lang=
"scss"
>
...
...
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