修复打印预览里面 币种 默认不显示情况

This commit is contained in:
浅念
2025-10-24 16:00:14 +08:00
parent a70ad7a65c
commit 37e75014d0
2 changed files with 24 additions and 18 deletions
+21 -15
View File
@@ -185,20 +185,26 @@
}
})
})
loadCurrencyOptions()
// 设置默认币种
if (props.defaultCurrency) {
selectedCurrency.value = props.defaultCurrency
} else {
selectedCurrency.value = 'USD'
}
// 监听 visible 变化,加载币种选项
watch(
() => props.visible,
(newVisible) => {
if (newVisible) {
loadCurrencyOptions()
// 设置默认币种
if (props.defaultCurrency) {
selectedCurrency.value = props.defaultCurrency
} else {
selectedCurrency.value = 'USD'
}
}
}
)
// watch(
// () => props.visible,
// (newVisible) => {
// if (newVisible) {
// loadCurrencyOptions()
// // 设置默认币种
// if (props.defaultCurrency) {
// selectedCurrency.value = props.defaultCurrency
// } else {
// selectedCurrency.value = 'USD'
// }
// }
// }
// )
</script>