dayS.vue 1.25 KB
<template>
    <keep-alive>
        <component :emitData="emitData" :is="reportVal" :key="reportVal"></component>
    </keep-alive>
</template>

<script>
// import ipageOption from '../common/option/optionMall.vue';
import dayCount from './day_count';
import dayDetail from './day_detail';
export default {
    props: {
      propparam: {
        type: Object,
        default: () => {}
      }
    },
    data() {
        return {
            reportVal:'count',
            emitData:{}
        }
    },
    components: {
        // ipageOption,
        count:dayCount,
        detail:dayDetail
    },
    watch: {
      propparam: {
        handler: "refreshHandle",
        immediate: true
      }
    },
    methods: {
        refreshHandle(data){
          this.emitData = data;
        },
        // reportData(emitData){
          // console.log(emitData)
          // if(emitData.dateType=='custom'){
          //   emitData.dateType = 'month'
          // }
          // if('day' == emitData.dateType){
          //   this.emitData = emitData;
          // }else{
          //   this.$router.push({name:'ipagemall'+emitData.dateType,params:emitData});
          // }
        // }
    },
    created() {

    },
    mounted() {

    }
}
</script>

<style scoped>

</style>