<template>
  <div>
    <co-header fixed title="datebar">
      <fallback slot="left"></fallback>
    </co-header>
    <div class="page-databar co-wrapper">
        <co-datebar v-on:click="clickDayFun" @changeYM="changeYM" :day="day"></co-datebar>
    </div>
  </div>
</template>

<script type="es6">
  export default {
    data() {
      return {day: '2'};
    },
    methods: {
      clickDayFun: function(e) {
        this.day = e.$this.data + '';
        this.$toast(e.$this.year + '/' + e.$this.data);// 获取当前点击的日期信息
      },

      changeYM: function(data) {
        console.log(data);
      }
    }
  };
</script>
