feat(Calendar): add readonly prop (#7115)

This commit is contained in:
neverland
2020-09-05 15:04:16 +08:00
committed by GitHub
parent e7deea7195
commit afb8ac5443
4 changed files with 29 additions and 0 deletions
+5
View File
@@ -27,6 +27,7 @@ export default createComponent({
title: String,
color: String,
value: Boolean,
readonly: Boolean,
formatter: Function,
confirmText: String,
rangePrompt: String,
@@ -338,6 +339,10 @@ export default createComponent({
},
select(date, complete) {
if (this.readonly) {
return;
}
const emit = (date) => {
this.currentDate = date;
this.$emit('select', copyDates(this.currentDate));