This commit is contained in:
2024-09-10 10:49:08 +08:00
parent b5fd06b800
commit dd4f5938da
6391 changed files with 722800 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import dayjs from 'dayjs' //时间格式库
import infoBox from '@/commons/utils/infoBox.js'
// 时间校验 用于筛选 开始 时间不能大于结束 开始结束时间必选 时间 返回值 true 和 false
export const startAndEndTime = (start, end) => {
if (!start || !end) {
infoBox.showToast('请选择开始或结束时间')
return false
}
if (dayjs(start).isAfter(end)) {
infoBox.showToast('开始时间不能大于结束时间')
return false
}
return true
}