Skip to content

Commit

Permalink
移动视图布局按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
youxiurui committed Sep 4, 2023
1 parent cac30b7 commit 2e9dbd1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/home/header/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { Switch, Match, For } from "solid-js"
import { Dynamic } from "solid-js/web"
import { useT } from "~/hooks"
import { getMainColor, LayoutType, layout, setLayout } from "~/store"
// 将视图布局按钮悬浮在视口10px
import "./menu.css"

const layouts = {
list: FaSolidListUl,
Expand All @@ -22,7 +24,7 @@ const layouts = {
export const Layout = () => {
const t = useT()
return (
<>
<div class="menu">
<Menu>
<MenuTrigger
as={IconButton}
Expand Down Expand Up @@ -63,6 +65,6 @@ export const Layout = () => {
</For>
</MenuContent>
</Menu>
</>
</div>
)
}
5 changes: 5 additions & 0 deletions src/pages/home/header/menu.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.menu {
position: fixed;
right: 10px;
top: 150px;
}

0 comments on commit 2e9dbd1

Please sign in to comment.