[update 首页] 翻译
This commit is contained in:
@@ -44,6 +44,12 @@ export default {
|
||||
type: Array,
|
||||
required: false,
|
||||
default: () => []
|
||||
},
|
||||
// 是否返回区间,只选择一侧,另一侧会返回一个minDate或maxDate
|
||||
returnInterval: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -112,7 +118,14 @@ export default {
|
||||
},
|
||||
// 触发change事件
|
||||
triggerChange () {
|
||||
this.$emit('change', [this.startDate || minDate, this.endDate || maxDate])
|
||||
const startDate = this.startDate || minDate
|
||||
const endDate = this.endDate || maxDate
|
||||
// 是否一侧为空时,返回最大日期或最小日期
|
||||
if (this.returnInterval) {
|
||||
this.$emit('change', [startDate, endDate])
|
||||
} else {
|
||||
this.$emit('change', [this.startDate, this.endDate])
|
||||
}
|
||||
},
|
||||
// 记录最后一次点击的日期
|
||||
clickCalendarDate (val) {
|
||||
|
||||
Reference in New Issue
Block a user