fix(search): 修复搜索页计划书弹窗无法关闭的问题
- 添加缺失的 handlePlanClose 事件处理函数 - 关闭时清空 selectedProduct 避免数据残留 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Showing
1 changed file
with
11 additions
and
0 deletions
| ... | @@ -482,6 +482,17 @@ const openPlanPopup = (productId) => { | ... | @@ -482,6 +482,17 @@ const openPlanPopup = (productId) => { |
| 482 | showPlanPopup.value = true | 482 | showPlanPopup.value = true |
| 483 | } | 483 | } |
| 484 | 484 | ||
| 485 | +/** | ||
| 486 | + * 处理计划书弹窗关闭 | ||
| 487 | + * | ||
| 488 | + * @description 关闭弹窗并清空选中的产品 | ||
| 489 | + */ | ||
| 490 | +const handlePlanClose = () => { | ||
| 491 | + console.log('[Search] 关闭计划书弹窗') | ||
| 492 | + showPlanPopup.value = false | ||
| 493 | + selectedProduct.value = null | ||
| 494 | +} | ||
| 495 | + | ||
| 485 | // 使用 composable 统一处理计划书提交后逻辑 | 496 | // 使用 composable 统一处理计划书提交后逻辑 |
| 486 | const { handlePlanSubmit } = usePlanSubmit({ | 497 | const { handlePlanSubmit } = usePlanSubmit({ |
| 487 | getPopupState: () => showPlanPopup.value, | 498 | getPopupState: () => showPlanPopup.value, | ... | ... |
-
Please register or login to post a comment