1.1.5 • Published 5 months ago

react-h5-comcalendar v1.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

React-H5-Calendar组件使用文档

1. 安装组件

yarn add react-h5-comcalendar # 或者 npm install react-h5-comcalendar

2. 引入组件

import Calendar from "react-h5-comcalendar";

3. 引入样式

import 'react-h5-comcalendar/lib/styles.less';

5. 使用组件

<Calendar visible={visible}></Calendar>

6. 配置项

属性默认参数说明类型
visiblefalse是否显示Boolean
themeColor#3D7DE7主题颜色(16进制)String
selectBgColor#E9F3FD选中背景颜色(16进制)String
modalCancel()=> {}点击取消Function
ok()=> {}点击确定Function
dateClick()=> {}点击日期Function
defaultDate[]默认选中的日期Array
typeday日历类型String
showToDaytrue是否显示今天Boolean
showLunartrue是否显示农历Boolean
calendarTypeShowtrue是否显示日历类型Boolean
typeList"day", "week", "month"日历类型Array
title日期选择标题String
okText确定标题String
cancelText取消标题String
maskClosetrue是否点击遮罩层关闭Boolean

swiperContainer高度 = calendar_day高度+20px * 6 calendar_day高度 = 60px

7. 插槽

<Calendar visible={visible}
  todayRender={(date) => {}}, // 自定义今天按钮
  cancelRender={() => {}}, // 自定义取消按钮
  prevYearrRender={() => {}}, // 自定义上一年按钮
  prevMonthRender={() => {}}, // 自定义上一月按钮
  nextMonthRender={()=> {}}, // 自定义下一月按钮
  nextYearRender={()=> {}}, // 自定义下一年按钮
  okRender={() => {}}, // 自定义确定按钮
  itemRender={() => {}}, // 自定义日期按钮
>
</Calendar>
1.1.5

5 months ago

1.1.4

5 months ago

1.1.2

5 months ago

1.1.1

5 months ago

1.1.0

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago