Skip to content

Commit

Permalink
fix: not work when jump
Browse files Browse the repository at this point in the history
  • Loading branch information
todrfu committed Oct 8, 2020
1 parent b82ec69 commit 01e1977
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Binary file removed .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@ dist/
example/

# vscode config
.vscode/
.vscode/
.DS_Store
4 changes: 3 additions & 1 deletion src/component/v2/plugins/preset/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,16 @@ export default () => {
methods(component) {
return {
jump: dateInfo => {
if (Object.prototype.toString.call(dateInfo) !== '[object Object]')
return
const updatedRenderData = calcJumpData({
dateInfo,
component
})
const existCalendarData = getCalendarData('calendar', component)
const config = getCalendarConfig(component)
if (config.autoChoosedWhenJump) {
const target = updatedRenderData.dates[dateInfo.id]
const target = updatedRenderData.dates[dateInfo.date - 1]
if (!updatedRenderData.selectedDates) {
updatedRenderData.selectedDates = [target]
} else {
Expand Down

0 comments on commit 01e1977

Please sign in to comment.