时间显示到秒 & 表格之间的跳转页面

This commit is contained in:
Eamon
2026-05-13 14:57:27 +08:00
parent bc29a025b0
commit 284b0d6afe
25 changed files with 442 additions and 240 deletions

View File

@@ -18,11 +18,9 @@ import type { Admin } from "@/models/admin"
export default function Appbar(props: { admin: Admin }) {
const router = useRouter()
const [showDropdown, setShowDropdown] = useState(false)
const [showNotifications, setShowNotifications] = useState(false)
const pathname = usePathname()
const dropdownRef = useRef<HTMLDivElement>(null)
const notificationRef = useRef<HTMLDivElement>(null)
// 处理点击外部关闭下拉菜单
useEffect(() => {
@@ -33,12 +31,6 @@ export default function Appbar(props: { admin: Admin }) {
) {
setShowDropdown(false)
}
if (
notificationRef.current &&
!notificationRef.current.contains(event.target as Node)
) {
setShowNotifications(false)
}
}
document.addEventListener("mousedown", handleClickOutside)
@@ -51,7 +43,7 @@ export default function Appbar(props: { admin: Admin }) {
const filteredPaths = paths.filter(path => !hiddenSegments.includes(path))
const breadcrumbs = [
{ path: "/", label: "首页" },
...filteredPaths.map((path, index) => {
...filteredPaths.map(path => {
const originalIndex = paths.findIndex(p => p === path)
const url = `/${paths.slice(0, originalIndex + 1).join("/")}`
const label = getBreadcrumbLabel(path)