bm-vue-calendar

1.0.6 • Public • Published

bm-vue-calendar

bm-vue-calendar是一款简单小巧的事件日历组件,针对Vue2开发。样式美观,且响应式。

依赖

  • vue: ^2.0.0

使用方法

安装

 npm install bm-vue-calendar --save

入口 Main.js

import 'bm-vue-calendar/dist/style.css' //1.1.10之后的版本,css被放在了单独的文件中,方便替换
import BMVueCalendar from 'bm-vue-calendar'
Vue.use(BMVueCalendar, {locale: 'zh'}) //可以设置语言,支持中文和英文

用法示例

<template>
  <div id="app">
    <bm-vue-calendar @selectDay="test"></bm-vue-calendar>
    <div>你选择的时间是:{{curDate}}</div>
  </div>
</template>
 
<script>
export default {
  name: 'app',
  data () {
    return {
      curDate: ''
    }
  },
  methods: {
    test (date) {
      this.curDate = date
    }
  }
}
</script>

API

// 下个月
this.$EventCalendar.nextMonth()
// 上个月
this.$EventCalendar.preMonth()

感谢

感谢原控件作者:https://github.com/GeoffZhu/vue-event-calendar

Readme

Keywords

Package Sidebar

Install

npm i bm-vue-calendar

Weekly Downloads

1

Version

1.0.6

License

none

Last publish

Collaborators

  • zhengguorong