瀏覽代碼

fix: 切换推导版本时清除所有视图状态

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
yangxiaohui 1 天之前
父節點
當前提交
ad082b8045
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      script/visualization/src/components/DerivationView.vue

+ 7 - 0
script/visualization/src/components/DerivationView.vue

@@ -1210,6 +1210,13 @@ watch(() => store.currentPostGraph, () => {
   nextTick(() => render())
 }, { immediate: true })
 
+// 监听推导版本切换,清除所有状态
+watch(() => store.selectedDerivationVersion, () => {
+  selectedNodeId.value = null
+  clearHighlightState()
+  store.clearSelection()  // 清除全局选中状态,影响其他视图
+})
+
 // 监听初始化配置变化,重新渲染
 watch(initConfig, () => {
   nextTick(() => render())