Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
todrfu committed Oct 12, 2020
2 parents ac9a14c + 6978ab8 commit 38c92b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions docs/v2/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,9 @@ calendar.chooseDateArea(['2020-10-20', '2020-10-30'])
节假日数据来源:[国务院办公厅_政府信息公开专栏](http://www.gov.cn/zhengce/content/2019-11/21/content_5454164.htm),目前仅支持了 `2020年份` 的数据,其他数据可按需自行补充 `/plugins/holidays/holidays-map.js`
:::
## 显示法定节假日班/休情况
## 节假日
### 显示法定节假日班/休情况
配置日历config:
Expand All @@ -299,13 +301,13 @@ calendarConfig: {
}
```
## 获取当前年份节假日信息
### 获取当前年份节假日信息
```js
calendar.getHolidaysOfCurrentYear()
```
## 获取指定年份节假日信息
### 获取指定年份节假日信息
```js
const year = 2020
Expand Down
5 changes: 3 additions & 2 deletions src/component/v2/plugins/week.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Description: 周视图
* @Date: 2020-10-08 21:22:09*
* @Last Modified by: drfu
* @Last Modified time: 2020-10-11 14:13:53
* @Last Modified time: 2020-10-12 14:39:45
* */

import { renderCalendar } from '../render'
Expand Down Expand Up @@ -414,7 +414,8 @@ export default () => {
const waitRenderData = this.methods(
component
).__calcDatesWhenSwitchView(view, target)
const { data, config } = waitRenderData
const { data, config } = waitRenderData || {}
if (!data) return logger.warn('当前状态不能切换为周视图')
return renderCalendar.call(component, data, config)
}
}
Expand Down

0 comments on commit 38c92b9

Please sign in to comment.