1.1.2 • Published 5 years ago

ow-calendar v1.1.2

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

ow-calendar

Build Status npm version Coverage Status

安装

NPM

npm i ow-calendar -S

YARN

yarn add ow-calendear

使用方法

全局引用

import Vue from 'vue';
import owCalendar from 'ow-calendar';

Vue.use(owCalendar);

组件内引用

在组件内

import owCalendar from 'ow-calendar/src/lib/ow-calendar';
export default {
  components: {
    owCalendar,
  },
};

Api

props

属性说明类型默认值
show-month-numbers要展示多少个月份Number, String12
start-date开始的日期Date今天
disabled-date不可选的日期Array
multiple开启多选模式Booleanfalse
transition过渡效果Stringpop-fade
need-choice-days至少选择的天数,与 multiple 配合使用Number,String0
max-choice-days最多选择天数,与 multiple 配合使用Number,String15
info-text提示文案,与 need-choice-days 配合使用String当选择的日期小于 need-choice-days 所设置时:文案显示:请至少选择 needChoiceDays 天 needChoiceDays - 1 晚当选择的日期大于等于 need-choice-days 所设置时:无文案
format-type显示的日期格式yyyy/MM/dd ps:月份需要大写

Event:

事件名说明返回值
confirm点击保存时触发单选模式下:只有一个 Date;多选模式下: 开始时间,结束时间,选择的天数
multiple-choice-end选完第二个日期时触发(可在此处修改 info-text)同上
close弹窗关闭时触发

DEMO 演示

本地预览

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build
1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago