Skip to content

Conversation

@ah-smile
Copy link

@ah-smile ah-smile commented Aug 29, 2025

Types of changes

  • New feature
  • Bug fix
  • Enhancement
  • Component style change
  • Typescript definition change
  • Documentation change
  • Coding style change
  • Refactoring
  • Test cases
  • Continuous integration
  • Breaking change
  • Others

Background and context

Calendar 组件在v-modelmodelValue值改变时日历面板不会更新

Solution

问题:初始化时使用了一个新的变量 pageShowDate 渲染日历面板导致外层响应式丢失
解决方案:watch监听 modelValue 值变化时重新赋值给 pageShowDate

How is the change tested?

新增 Calendar 组件 modelValue 属性响应式相关单元测试
修复前:改变 modelValue 值日历面板未更新
image

修复后:单元测试通过,功能正常
image

Changelog

Component Changelog(CN) Changelog(EN) Related issues
Calendar 修复 modelValue 属性丢失响应式bug fix modelValue prop not working

Checklist:

  • Test suite passes (npm run test)
  • Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
  • Changes are submitted to the appropriate branch (e.g. features should be submitted to feature branch and others
    should be submitted to main branch)

Other information

@codesandbox
Copy link

codesandbox bot commented Aug 29, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant