更新记录
                                                                                                    
                                                    
                                                        0.1(2022-01-16)
                                                                                                                    
                                                                下载此版本
                                                            
                                                        
                                                    
                                                    1.0.1版本插件上传
2.支持多个日期范围选择
                                                                                                                                                
                                            
                                                                                                                                                        平台兼容性
                                                                                                                                                                                                                                                                                                                                uni-app
                                                                                                                                                                                                                                    
| Vue2 | 
Vue3 | 
Chrome | 
Safari | 
app-vue | 
app-nvue | 
Android | 
iOS | 
鸿蒙 | 
| √ | 
- | 
- | 
- | 
- | 
- | 
- | 
- | 
- | 
                                                                                                                                                            
| 微信小程序 | 
支付宝小程序 | 
抖音小程序 | 
百度小程序 | 
快手小程序 | 
京东小程序 | 
鸿蒙元服务 | 
QQ小程序 | 
飞书小程序 | 
快应用-华为 | 
快应用-联盟 | 
| √ | 
- | 
- | 
- | 
- | 
- | 
- | 
- | 
- | 
- | 
- | 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                            mr-calendar
组件功能
- 日历功能
 
- 向下滑动
 
- 禁用日期
 
- 双向绑定
 
- 类型
- 单选
 
- 多选
 
- 范围
 
- 多选范围
 
 
- 自定义日期
 
- 事件
- click事件
 
- close
 
- submit
 
 
组件API设计
mr-calendar Attributes
| 参数 | 
说明 | 
类型 | 
可选值 | 
默认值 | 
| visible | 
是否显示日历 | 
boolean | 
— | 
false | 
| type | 
日历类型 | 
string | 
range(范围)/multiple(多选)/single(单选)/multiple-range(多选范围) | 
single | 
| value / v-model | 
绑定值 | 
date/string(single) array(range/multiple) | 
— | 
— | 
| disabled | 
禁用(不显示确定按钮) | 
boolean | 
— | 
false | 
| disabledDate | 
设置禁用日期 参数为当前日期,要求返回 Boolean(function) | 
array/function | 
— | 
— | 
| customDate | 
设置自定义选中的日期,每个选中值的数据可为string(默认样式为右上角红色的点)或object,object方式,可为选中的日期添加自定义的文本跟样式,object属性具体参考下表(function的话只能返回object[],参数为当前日期) | 
array/function | 
— | 
— | 
| format | 
返回日期格式,如果为空范围date | 
string | 
YYYY/MM/DD/hh/mm/ss/a组合 | 
— | 
| title | 
日历标题 | 
 | 
— | 
请选择日期 | 
| drawer | 
是否弹出层弹出 | 
boolean | 
— | 
true | 
selectedDate
| 参数 | 
说明 | 
类型 | 
可选值 | 
默认值 | 
| cellClass | 
自定义cell类名 | 
string | 
— | 
— | 
| date | 
自定义日期(YYYY-MM-DD) | 
string | 
— | 
— | 
| top/center/bottom | 
显示的位置 | 
[] | 
— | 
— | 
| {top/center/bottom.class} | 
自定义类 | 
string | 
— | 
— | 
| {top /bottom.text} | 
自定义文本 | 
string | 
— | 
— | 
const customDate = [
    {
        cellClass: 'custom-cell',
        date: '2022-01-16',
        top: [
            {
                class: 'custom-cell-top-1',
                text: '6'
            }
            ]
    }
    ]
mr-calendar Events
| 事件名称 | 
说明 | 
回调参数 | 
| change | 
选中值改变时候触发 | 
选中的值 | 
| close | 
关闭后触发 | 
— | 
| submit | 
点确定是触发 | 
选中的值 | 
| click | 
单元格点击事件 | 
选中单元格的数据{ isDisabled: '是否禁用', year, month, day, date, time, format, virtual: '是否是虚拟日期(上下个月的日期)', isToday, customDate: '自定义日期数据'} | 
//使用示例
<template>
    <view>
        <!-- 日历组件demo -->
        <mr-calendar ref="calendar" :visible.sync="show" :disabledDate="disabledDate" v-model="date" type="multiple-range"
            :custom-date="customDate" :drawer="drawer" format="YYYY-MM-DD" @click="calclick" @change="daychange"
            @submit="submit">
        </mr-calendar>
    </view>
</template>
<script>
    import mrCalendar from '@/components/mr-calendar/mr-calendar';
    export default {
        components: {
            mrCalendar
        },
        data() {
            return {
                show: true,
                drawer: false,
                date: '',
                customDate: [{
                    cellClass: 'custom-cell',
                    date: '2022-01-24',
                    top: [{
                            class: 'custom-cell-top-1',
                            text: '①'
                        },
                        // {
                        //  class: 'custom-cell-top-2',
                        //  text: '6'
                        // }
                    ]
                }]
            }
        },
        methods: {
            disabledDate(date) {
                const start = new Date('2022/1/10').getTime();
                const end = new Date('2022/6/30').getTime();
                return date.getTime() <= start || date.getTime() >= end;
            },
            submit(e) {
                console.log(e, 'eeee')
            },
            calclick(e) {
                console.log(e, 'calclick')
            },
            daychange(e) {
                console.log(e, 'daychange')
            },
        }
    }
</script>