Ver código fonte

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

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

Co-Authored-By: Claude <noreply@anthropic.com>
yangxiaohui 1 dia atrás
pai
commit
ad082b8045

+ 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())