feat(directory): add a scroll to top button

This commit is contained in:
Haoyu Xu
2023-06-24 00:57:24 -04:00
parent eea45abbd6
commit a44c91b572
5 changed files with 186 additions and 24 deletions

View File

@@ -31,6 +31,7 @@ import Popup from '@/component/popup';
import ReturnButton from '@/component/return_button';
import Border from '@/component/border';
import CharIcon from '@/component/char_icon';
import ToTopButton from '@/component/totop_button';
const currentYear = new Date().getFullYear()
@@ -132,6 +133,7 @@ export default function Root() {
</section>
</section>
<HeaderButton />
<ToTopButton />
<Outlet />
<ScrollRestoration />
</main>
@@ -305,7 +307,7 @@ function HeaderButton() {
list.push({
name: key,
value: null,
type: "group",
type: "date",
})
value.forEach((item) => {
list.push({