1.1.3 • Published 7 years ago

jk-calendar v1.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

vue日历组件,支持日期回显

安装

npm install jk-calendar -S

快速开始

<template>
    <div>
        <v-calendar :echotDate="echoDate" @getYearAndMonth="getYMD" @getDetail="getDe"></v-calendar>
    </div>
</template>
import vCalendar from 'jk-calendar'

export default {
  name:'Your Component Name',
  components: {
    vCalendar
  },
  data(){
    // 回显日期数据
    echoDate:[
      {
        year:2018,
        month:6,
        day:4
      }
    ]
  },
  methods:{
    getDe(val){
      // 点击后返回的详细日期
      console.log(val)
    },
    getYMD(val){
      // 点击后返回的年月
      console.log(val)
    }
  }
}

API

NametypeExample
echoDateArray{year:2018,month:6,day:4}...
getDetailevent子传父的详细日期(年月日)
getYearAndMonthevent子传父的日期(年月)

##更新日志 1.1.3: 修复回显日期的bug(现只回显当月的) 增加获取年月的方法

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago