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

日历上面的上个月下个月怎么触发? #486

Open
Pentium286 opened this issue Aug 19, 2022 · 1 comment
Open

日历上面的上个月下个月怎么触发? #486

Pentium286 opened this issue Aug 19, 2022 · 1 comment
Assignees
Labels

Comments

@Pentium286
Copy link

Pentium286 commented Aug 19, 2022

问题描述
image

taro-vue3

<calendar class="calendar" :config="state.config" @whenChangeMonth="whenChangeMonth" />

这样没有反应

@Pentium286
Copy link
Author

src/components/wx_calendar/v2/index.js

import Taro from "@tarojs/taro"; // FIXME:taro里调用小程序原生组件

Taro.eventCenter.trigger(triggerEventName, { // FIXME:taro里调用小程序原生组件
  current: {
    year: +curYear,
    month: +curMonth
  },
  next: target
});

Taro.eventCenter.trigger('onSwipe', { // FIXME:taro里调用小程序原生组件
  current: {
    year: +curYear,
    month: +curMonth
  },
  next: target,
  type: triggerEventName
});

src/components/wx_calendar/v2/render.js

import Taro from "@tarojs/taro"; // FIXME:taro里调用小程序原生组件

Taro.eventCenter.trigger('afterCalendarRender', rst) // FIXME:taro里调用小程序原生组件

注意加到对应的事件下一行或者上一行

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