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

两个页面两个日历组件的周视图和月视图切换问题 #271

Closed
liser1426 opened this issue Feb 26, 2020 · 5 comments
Closed

Comments

@liser1426
Copy link

BUG描述小程序的两个页面中分别有一个日历组件,当从页面一跳转到页面二,在返回到页面一时,页面一中的日历切换周视图和月视图效果无效,that.calendar.switchView('month').then(() => {
console.log('我进来了') });
该方法还可以调用,希望您能帮忙找找问题,两个日历我用了不同的ID,还是无法处理该问题

复现步骤

期望结果

实际结果

截图

@treadpit
Copy link
Owner

这样使用确实可能存在问题,我排查下

@liser1426
Copy link
Author

ok,谢谢了

@treadpit
Copy link
Owner

因设计问题调整较大,目前可尝试传入日历组件ID。

页面A:

<calendar id="c1"  calendarConfig="{{calendarConfig1}}" ></calendar>
页面B:

<calendar id="c2"  calendarConfig="{{calendarConfig2}}" ></calendar>

在调用方法时传对应日历指定 ID

this.calendar.switchView('week', '#c1').then(() => {})

this.calendar.switchView('', '#c2').then(() => {})

@liser1426
Copy link
Author

liser1426 commented Feb 29, 2020 via email

@liser1426
Copy link
Author

liser1426 commented Feb 29, 2020 via email

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

No branches or pull requests

2 participants