<!-- 日程组件 -->
<template>
  <div class="st-calendar">
    <ul>

      <li class="st-calendar-title">
        <ul>
          <li class="st-calendar-tli" v-for="item in weekInfo" :key="item.oid">
            {{ item.title }}
          </li>
        </ul>
      </li>
      <li class="st-calendar-list" v-for="(item, index) in signDaysData" :key="index">
        <ul>
          <li class="st-calendar-cli" v-for="(sitem, sindex) in item"  :key="sitem.day +  '' + sindex">

            <div class="st-calendar-clic st-calendar-disa" v-if="sitem.day==='0' || sitem.day===0">
              <div class="st-calendar-lit">-</div>
              <div class="st-calendar-lim">
              </div>
            </div>

            <div  class="st-calendar-clic" v-else v-bind:class="{ 'st-calendar-today': sitem.today }">
              <div class="st-calendar-lit">{{ sitem.day }}</div>
              <template v-if="sitem.html && sitem.html.length > 0">
                <div class="st-calendar-lim" v-html="sitem.html" @click="steerCalendarClick(sitem.data)">
                </div>
              </template>
              <template v-else>
                <div class="st-calendar-lim st-calendar-lie">
                  <span class="st-calendar-lil2">无签到记录</span>
                </div>
              </template>
             <!-- <div class="st-calendar-lim" v-if="sitem.data && sitem.data.sHtml" v-html="sitem.data.sHtml">
                &lt;!&ndash;<span class="st-calendar-lil1" v-for="ssitem in 4">17:55:44</span>&ndash;&gt;
              </div>
              <div class="st-calendar-lim st-calendar-lie" v-else>
                <span class="st-calendar-lil2">无签到记录</span>
              </div>-->
            </div>

          </li>
        </ul>
      </li>

    </ul>
  </div>
</template>
<script>
export default {
  props: ['signDaysData'],
  data () {
    return {
      weekInfo: [
        {oid: 0, title: '星期天'},
        {oid: 1, title: '星期一'},
        {oid: 2, title: '星期二'},
        {oid: 3, title: '星期三'},
        {oid: 4, title: '星期四'},
        {oid: 5, title: '星期五'},
        {oid: 6, title: '星期六'}
      ]
    }
  },
  methods: {
    steerCalendarClick (cData) {
      // window.console.log('您点击的签到数据：');
      // window.console.log(JSON.stringify(cData));
      this.$emit('steerCalendarClick', cData);
    }
  }
}
</script>
<style scoped>
</style>
