WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2021-04-14 5904eefcaf45cefa39a979cebc54e1446211f378
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() {
@@ -113,6 +139,7 @@
        const $cFilter = $(this.$refs.floadLayer).parents('.c-filter');
        if ($cFilter.length > 0) {
            $cFilter.eq(0).after(this.$refs.floadLayer);
            $cFilter.parent().css('transform', 'translate(0,0)');
        }
    },
};