CalendarPanel
Extends:
React.Component → CalendarPanel
melon-calendar 日期选择主面板
Constructor Summary
Public Constructor | ||
public |
constructor(props: Object) 构造函数 |
Method Summary
Public Methods | ||
public |
componentWillReceiveProps(nextProps: Object) 组件每次更新属性时判断是否需要同步状态 |
|
public |
onDateChange(e: Object) 选择某一天时触发 |
|
public |
render(): React.Element 渲染 |
|
public |
shouldComponentUpdate(nextProps: Object, nextState: Object): bool 判断是否需要更新,性能优化 |
Protected Methods | ||
protected |
onHeaderClick(e: Object) 点击 Header 切换日期、年/月选择 |
|
protected |
onPagerChange(e: Object) 月份翻页器改变 |
|
protected |
年/月选择改变的事件 |
Public Constructors
Public Methods
public componentWillReceiveProps(nextProps: Object) source
组件每次更新属性时判断是否需要同步状态
Params:
Name | Type | Attribute | Description |
nextProps | Object | 新属性 |
public shouldComponentUpdate(nextProps: Object, nextState: Object): bool source
判断是否需要更新,性能优化
Return:
bool | 是否需要更新 |
Protected Methods
protected onHeaderClick(e: Object) source
点击 Header 切换日期、年/月选择
Params:
Name | Type | Attribute | Description |
e | Object | 事件对象 |