<template>
  <div id="app">
    <button @click="handleClick">测试</button>
    <upaas-datetime @on-change="handleConfirm" yearRow="{value}年" format="YYYY-MM" :show.sync='showDateTime' ></upaas-datetime>
  </div>
</template>
<script>
  import DateTime from 'muse-ui/datetime';

  export default {
    data(){
      return {
        showDateTime:false
      };
    },
    components:{
      'upaas-datetime':DateTime
    },
    methods:{
      handleConfirm(value){
        alert(value);
      },

      handleClick(i){
        this.showDateTime = true;
      },
      handleChange(){},
    },
    mounted(){
      // this.$nextTick(()=>{
      //   console.log(this.$refs.datetime.picker && this.$refs.datetime.picker.show({}));
      // });
    }

  }

</script>
<style lang="less">
  #app .vux-label{
    display:inline-block;
  }
</style>
