mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-12 12:26:54 +08:00
feat: 增加可选性隐藏功能
- 目前可以隐藏 侧边栏,导航栏,发布按钮
This commit is contained in:
@@ -15,7 +15,7 @@ import {
|
||||
useMergeRefs,
|
||||
useRole,
|
||||
} from '@floating-ui/react'
|
||||
|
||||
import { useSearchParams } from 'next/navigation'
|
||||
import type { OffsetOptions, Placement } from '@floating-ui/react'
|
||||
import cn from '@/utils/classnames'
|
||||
export type PortalToFollowElemOptions = {
|
||||
@@ -139,6 +139,12 @@ export const PortalToFollowElemTrigger = (
|
||||
)
|
||||
}
|
||||
|
||||
// 检测是否开启 publish 功能
|
||||
const searchParams = useSearchParams()
|
||||
const publishParam = searchParams.get('publish')
|
||||
const showPublish = !publishParam || publishParam === '1'
|
||||
if (!showPublish) return null
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
|
||||
Reference in New Issue
Block a user