Skip to content

Commit

Permalink
Merge pull request #433 from treadpit/hotfix
Browse files Browse the repository at this point in the history
fix: #432
  • Loading branch information
todrfu authored May 7, 2021
2 parents efcf47a + 17a5e83 commit a8667b4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/component/v2/plugins/preset/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,15 @@ export default () => {
},
setCalendarConfig(config) {
return new Promise((resolve, reject) => {
if (!component || !component.config) {
if (!component || !component.data.config) {
reject('异常:未找到组件配置信息')
return
}
let conf = { ...component.config, ...config }
component.config = conf
setCalendarData('calendar.config', conf)
setCalendarData({ config: conf }, component)
.then(resolve)
.catch(reject)
})
},
cancelSelectedDates(cancelDates = []) {
Expand Down

0 comments on commit a8667b4

Please sign in to comment.