客户查询添加操作功能
This commit is contained in:
@@ -45,14 +45,15 @@ export default function Appbar(props: { admin: Admin }) {
|
||||
return () => document.removeEventListener("mousedown", handleClickOutside)
|
||||
}, [])
|
||||
|
||||
// 根据路径生成面包屑
|
||||
const generateBreadcrumbs = () => {
|
||||
const paths = pathname.split("/").filter(Boolean)
|
||||
|
||||
const hiddenSegments = ["client"]
|
||||
const filteredPaths = paths.filter(path => !hiddenSegments.includes(path))
|
||||
const breadcrumbs = [
|
||||
{ path: "/", label: "首页" },
|
||||
...paths.map((path, index) => {
|
||||
const url = `/${paths.slice(0, index + 1).join("/")}`
|
||||
...filteredPaths.map((path, index) => {
|
||||
const originalIndex = paths.findIndex(p => p === path)
|
||||
const url = `/${paths.slice(0, originalIndex + 1).join("/")}`
|
||||
const label = getBreadcrumbLabel(path)
|
||||
return { path: url, label }
|
||||
}),
|
||||
@@ -67,7 +68,7 @@ export default function Appbar(props: { admin: Admin }) {
|
||||
content: "内容管理",
|
||||
articles: "文章管理",
|
||||
media: "媒体库",
|
||||
user: "用户管理",
|
||||
user: "客户认领",
|
||||
roles: "角色权限",
|
||||
settings: "系统设置",
|
||||
logs: "系统日志",
|
||||
|
||||
Reference in New Issue
Block a user