WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2021-04-01 41ce4729b48cedc120b504bab76924f995bb47bb
forms/datePicker/CDateRangeAction.vue
@@ -95,9 +95,35 @@
            this.endDate = curDates[1];
        },
        handleStartDateChange(date) {
            if (date && this.endDate) {
                const startTime = new Date(date);
                const endTime = new Date(this.endDate);
                if (startTime > endTime) {
                    Taro.showToast({
                        title: '开始日期不能晚于结束日期!',
                        icon: 'none',
                        mask: true,
                        duration: 2000,
                    });
                    return;
                }
            }
            this.startDate = date;
        },
        handleEndDateChange(date) {
            if (date && this.startDate) {
                const startTime = new Date(this.startDate);
                const endTime = new Date(date);
                if (startTime > endTime) {
                    Taro.showToast({
                        title: '结束日期不能早于开始日期!',
                        icon: 'none',
                        mask: true,
                        duration: 2000,
                    });
                    return;
                }
            }
            this.endDate = date;
        },
        handleFinish() {