1.0.0 • Published 4 years ago

vue-mobile-hotel-calendar-jm v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

vue-mobile-hotel-calendar

基于vue2.x的移动端日历组件,适用于酒店预订的应用场景

安装

$ npm install vue-mobile-hotel-calendar -S

使用

html

<calendarv-if="calendarVisible" ref="calendar"></calendar>

js

import Calendar from 'vue-mobile-hotel-calendar'

触发

this.calendarVisible = true
this.$nextTick(() => {
  this.$refs.calendar.editDate()
})

属性

属性名说明类型可选值默认值
total被渲染出的月数,从当前月份开始Number-5
startText开始日期的描述String-入住
endText结束日期的描述String-退房

事件

事件名说明参数
change触发日期选中的回调(startDate, endDate, dayGap)
setStartDate选中开始日期的回调(startDate)
setEndDate选中结束日期的回调(endDate)

设计缺陷

未通过js动态计算日期,没有实现万年历的效果。只是针对于酒店预订类的业务,从当月开始,+n个月的日历渲染。

Git

vue-mobile-hotel-calendar

1.0.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago