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

将事件数据改为方法从后台获取后前端日历有事件的时间不显示圆圈了 #99

Open
oxtiger opened this issue Jun 19, 2018 · 4 comments

Comments

@oxtiger
Copy link

oxtiger commented Jun 19, 2018

大家有遇到这个bug吗

@WeipingFu
Copy link

我也遇到了,请问解决了吗?

@WeipingFu
Copy link

我这个是日期不对,解决了

@oxtiger
Copy link
Author

oxtiger commented Jul 24, 2018

能给我看看你的代码吗,我的咋不行

@WeipingFu
Copy link

<vue-event-calendar :events="events" @month-changed="handleMonthChange" @day-changed="handleDayChange"></vue-event-calendar>
data () {
  return {
     events: []
  };
},
methods: {
  async getEvents () {
    let data = await Request.getEvents();
    // 处理data,让其符合events的格式
    let events = data.map(d => {
       //  转换数据格式 ...
       return {
           date: d.date,
           title: d.title,
           desc: d.description
           // ...
       };
    });
    this.events = events;
  }
},
mounted () {
  this.getEvents().then(() => 
      this.$EventCalendar.toDate(moment().format('YYYY/MM/DD'))
  );
}

大概就是这样,你看看你是不是数据格式处理上有点问题?

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

No branches or pull requests

2 participants