fix: opacity
This commit is contained in:
parent
588ae49f5f
commit
83e8a89f22
|
|
@ -42,9 +42,7 @@ const FileTreeNode: Component<{
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
>
|
>
|
||||||
<Show when={isDir}>
|
<Show when={isDir}>
|
||||||
<span class="mr-1 text-gray-400">
|
<span class="mr-1 text-gray-400">{isExpanded() ? "📂" : "📁"}</span>
|
||||||
{isExpanded() ? "📂" : "📁"}
|
|
||||||
</span>
|
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={!isDir}>
|
<Show when={!isDir}>
|
||||||
<span class="mr-1 text-gray-400">📄</span>
|
<span class="mr-1 text-gray-400">📄</span>
|
||||||
|
|
@ -135,7 +133,8 @@ export const Sidebar: Component<SidebarProps> = (props) => {
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
const updateHeadings = () => {
|
const updateHeadings = () => {
|
||||||
const pathname = location.pathname;
|
const pathname = location.pathname;
|
||||||
const headings = pathHeadings()[pathname] || pathHeadings()[`${pathname}.md`];
|
const headings =
|
||||||
|
pathHeadings()[pathname] || pathHeadings()[`${pathname}.md`];
|
||||||
setCurrentFileHeadings(headings || []);
|
setCurrentFileHeadings(headings || []);
|
||||||
};
|
};
|
||||||
updateHeadings();
|
updateHeadings();
|
||||||
|
|
@ -145,7 +144,7 @@ export const Sidebar: Component<SidebarProps> = (props) => {
|
||||||
<Show when={props.isOpen}>
|
<Show when={props.isOpen}>
|
||||||
{/* 遮罩层 */}
|
{/* 遮罩层 */}
|
||||||
<div
|
<div
|
||||||
class="fixed inset-0 bg-black bg-opacity-50 z-40"
|
class="fixed inset-0 bg-black/50 z-40"
|
||||||
onClick={props.onClose}
|
onClick={props.onClose}
|
||||||
/>
|
/>
|
||||||
{/* 侧边栏 */}
|
{/* 侧边栏 */}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue