-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ [feature] add feature of caption customized(#31)
- Loading branch information
1 parent
fb2c2ef
commit daf0b98
Showing
8 changed files
with
366 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
|
||
/** | ||
* 默认属性 | ||
*/ | ||
export const defaultProps = { | ||
isPopup: true, | ||
isOpen: false, | ||
theme: 'default', | ||
value: new Date(), | ||
min: new Date(1970, 0, 1), | ||
max: new Date(2050, 0, 1), | ||
showHeader: true, | ||
showCaption: false, | ||
dateConfig: { | ||
'year': { | ||
format: 'YYYY', | ||
caption: 'Year', | ||
step: 1, | ||
}, | ||
'month': { | ||
format: 'M', | ||
caption: 'Mon', | ||
step: 1, | ||
}, | ||
'date': { | ||
format: 'D', | ||
caption: 'Day', | ||
step: 1, | ||
}, | ||
}, | ||
headerFormat: 'YYYY/MM/DD', | ||
confirmText: '完成', | ||
cancelText: '取消', | ||
onSelect: () => {}, | ||
onCancel: () => {}, | ||
}; | ||
|
||
/** | ||
* 日期配置 | ||
*/ | ||
export const dateConfigMap = { | ||
'year': { | ||
format: 'YYYY', | ||
caption: 'Year', | ||
step: 1, | ||
}, | ||
'month': { | ||
format: 'M', | ||
caption: 'Mon', | ||
step: 1, | ||
}, | ||
'date': { | ||
format: 'D', | ||
caption: 'Day', | ||
step: 1, | ||
}, | ||
'hour': { | ||
format: 'hh', | ||
caption: 'Hour', | ||
step: 1, | ||
}, | ||
'minute': { | ||
format: 'mm', | ||
caption: 'Min', | ||
step: 1, | ||
}, | ||
'second': { | ||
format: 'hh', | ||
caption: 'Sec', | ||
step: 1, | ||
}, | ||
}; | ||
|
||
|
||
|
Oops, something went wrong.