Skip to content

Commit

Permalink
fix: 🐛 修复监听 props 值的写法
Browse files Browse the repository at this point in the history
  • Loading branch information
dizuncainiao committed Aug 14, 2023
1 parent 4e547eb commit 2473af0
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@ export default defineComponent({
})
// 监听父组件传入的参数,更新 params
watch(props.extraParams, val => {
params.value = {
...params.value,
...val
watch(
() => props.extraParams,
val => {
params.value = {
...params.value,
...val
}
}
})
)
const dateText = computed(() => getDateText(params.value))
Expand Down

0 comments on commit 2473af0

Please sign in to comment.