Fix Bug #446: 【手术管理-门诊手术安排】临时医嘱生成后界面非法关闭且按钮名称/功能显示不一致
修复 isSignedProp 父组件状态变化未同步到子组件本地 isSigned ref 的问题。 ref(props.isSignedProp) 仅在组件初始化时读取一次,父组件后续更新 temporarySigned 时子组件的 isSigned 不会自动更新,导致按钮文本和签名状态显示不一致。 添加 watch 监听 isSignedProp 变化,确保父子组件签名状态同步。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -312,6 +312,13 @@ const getMethodCodeDict = computed(() => {
|
||||
|
||||
// 响应式数据 - isSigned 从父组件传入的 prop 初始化
|
||||
const isSigned = ref(props.isSignedProp)
|
||||
|
||||
// 🔧 修复 Bug #446: 同步父组件 isSignedProp 的变化到本地 isSigned
|
||||
// ref(props.isSignedProp) 只在初始化时读取一次,父组件后续更新不会自动同步
|
||||
watch(() => props.isSignedProp, (newVal) => {
|
||||
isSigned.value = newVal
|
||||
})
|
||||
|
||||
const signatureTime = ref('')
|
||||
const showSignDialog = ref(false)
|
||||
const signPassword = ref('')
|
||||
|
||||
Reference in New Issue
Block a user