fromMixin.js
629 Bytes
let mixin = {
data () {
return {
pickerOptionsStart: {
// 禁止选择
disabledDate: time => {
let endDateVal = this.form.endTime;
if (endDateVal) {
return time.getTime() > new Date(endDateVal).getTime();
}
}
},
pickerOptionsEnd: {
disabledDate: time => {
let beginDateVal = this.form.startTime;
if (beginDateVal) {
return (
time.getTime() <
new Date(beginDateVal).getTime()
);
}
}
}
}
},
methods: {
}
}
export default mixin