Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

切换月份后再调用周视图和月视图的切换当前月份会更改 #480

Open
cywcd opened this issue May 18, 2022 · 0 comments
Open
Assignees
Labels

Comments

@cywcd
Copy link

cywcd commented May 18, 2022

问题描述
使用版本v2 最新版本
先切换月份后,再调用周视图和月视图的切换,当前月份会更改。

复现步骤

  1. 初始化日历当前月份,点击箭头切换到其他月份
  2. 点击自定义的按钮,切换周、月视图:
    周视图和月视图的切换调用如下:
    // 展开、收起,切换日历视图
 toggleDisplay() {
      const calendar = this.selectComponent('#calendar').calendar
      this.setData({
        isDisplay: !this.data.isDisplay
      })
      if(this.data.isDisplay) {
        calendar.switchView('month').then(() => {})
      } else {
        calendar.switchView('week').then(() => {})
      }
 }

期望结果
希望不在当前月份的时候,调用切换周、月视图不要更改当前的月份

实际结果
切换到非当前月份时,切换周、月视图,会更改当前的月份。

截图
image
展开示例图:月视图


image
展开示例图:周视图

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants