Fix Bug #492: 【门诊手术安排】关闭"手术计费"主弹窗后,项目字典选择列表依然残留悬浮在界面上
根因:el-popover 使用 :visible 受控模式,closeAllPopovers() 将 showPopover 设为 false 后,Vue 尚未完成 DOM 更新时 showChargeDialog 已被设为 false,导致弹窗组件被销毁 而 popover 的 visible 状态变更未传播到 DOM,弹窗消失但 popover 残留。 修复:在 closeChargeDialog 中使用 nextTick 等待 Vue 完成 popover 关闭的 DOM 更新后, 再设置 showChargeDialog = false 关闭主弹窗。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1416,9 +1416,12 @@ function closeChargeDialog() {
|
||||
if (prescriptionRef.value && prescriptionRef.value.closeAllPopovers) {
|
||||
prescriptionRef.value.closeAllPopovers()
|
||||
}
|
||||
showChargeDialog.value = false
|
||||
chargePatientInfo.value = {}
|
||||
chargeSurgeryInfo.value = {}
|
||||
// 等 Vue 完成 DOM 更新后再关闭弹窗,确保 popover 先消失
|
||||
nextTick(() => {
|
||||
showChargeDialog.value = false
|
||||
chargePatientInfo.value = {}
|
||||
chargeSurgeryInfo.value = {}
|
||||
})
|
||||
}
|
||||
|
||||
// 🔧 新增:标志位,用于区分是"打开"还是"刷新"
|
||||
|
||||
Reference in New Issue
Block a user