fix: 禁用层级拖动并移除相关UI控制
禁用useThinkFlow中的hierarchicalDragging选项以解决拖动行为问题,同时移除TopNav中对应的控制按钮以保持UI一致性
This commit is contained in:
@@ -146,16 +146,6 @@ const callAndClose = (fn: () => void) => {
|
||||
<span>{{ props.t('nav.center') }}</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
@click="props.config.hierarchicalDragging = !props.config.hierarchicalDragging"
|
||||
class="toolbar-btn flex-shrink-0"
|
||||
:class="props.config.hierarchicalDragging ? 'text-orange-500 bg-orange-50 border-orange-100' : 'text-slate-400 hover:text-slate-600'"
|
||||
:title="props.t('nav.hierarchicalDragging')"
|
||||
>
|
||||
<ArrowLeftRight class="w-3.5 h-3.5 md:w-4 h-4" />
|
||||
<span>{{ props.t('nav.hierarchicalDragging') }}</span>
|
||||
</button>
|
||||
|
||||
<div class="h-4 w-[1px] bg-slate-100 mx-1 flex-shrink-0"></div>
|
||||
|
||||
<button @click="props.onGenerateSummary" class="toolbar-btn text-orange-600 hover:bg-orange-50 border-orange-100 flex-shrink-0" :title="props.t('nav.summary')">
|
||||
|
||||
@@ -390,7 +390,7 @@ export function useThinkFlow({ t, locale }: { t: Translate; locale: Ref<string>
|
||||
backgroundVariant: BackgroundVariant.Lines,
|
||||
showControls: true,
|
||||
showMiniMap: true,
|
||||
hierarchicalDragging: true,
|
||||
hierarchicalDragging: false,
|
||||
snapToGrid: true,
|
||||
snapGrid: [16, 16] as [number, number],
|
||||
snapToAlignment: true,
|
||||
|
||||
Reference in New Issue
Block a user