<template>
  <div class="myproject">
    <calendar  :initdate='initdate' :dateColor='dateColor' :getTime='getTime' :durMonDay='durMonDay'/>
    <!-- <calend :optionConfig='optionConfig'/> -->
    <!-- <label @click='change'>点击</label> -->
  </div>
</template>
<script>
/**
 * module:调用日历组件的demo
 * author:lwt
 */
import calendar from '../../src/components/calendar/calendar'
export default {
  name: 'Myproject',
  props: {
  },
  components: {
    calendar
  },
  data () {
    return {
      initdate: '2019-01-11', // 设置默认选中日期,格式：YYYY-MM-DD
      dateColor: { '2019-01-22': 'red', '2019-01-09': 'purple', '2019-01-31': 'green', '2019-01-29': 'pink' } // 需标记的日期和颜色
    }
  },
  computed: {

  },
  created () {

  },
  mounted () {

  },
  beforeDestroy () {
  },
  methods: {
    change: function () {
      this.parkey = { 'b1': '5656545', 'b2': '2555', 'b3': '4455' }
      this.mode = [
        {
          style: { color: 'blue' },
          tds: [
            {
              bindkey: '工程jk名称', style: { width: '50%', fontWeight: 'bold' }
            },
            {
              bindkey: '@{b1}', style: { }
            }
          ]
        }
      ]
      // console.log(this.parkey)
    },
    getTime: function (data) { // 设置点击具体日期的回调
      // console.log('da:' + data)
    },
    durMonDay: function (data) { // 设置点击加减年月日期的回调
      // console.log('dur:' + data)
    }
  }
}
</script>

<style lang="scss">
  // .myproject{
  //   margin-top: 100px;
  // }
</style>
