|
@@ -8,6 +8,7 @@ import { fetchWithTimeout } from './fetch';
|
|
|
|
|
|
import type { SorterResult } from 'ant-design-vue/es/table/interface';
|
|
|
import type { GlobalToken } from 'ant-design-vue/es/theme';
|
|
|
+import type { Dayjs } from 'dayjs';
|
|
|
import type { ApiResponse, PageSorts } from '@/types';
|
|
|
|
|
|
export const request = async <T>(url: string, init: RequestInit = {}, timeout?: number): Promise<T> => {
|
|
@@ -272,3 +273,7 @@ export const isEmptyVal = (value: unknown) => {
|
|
|
export const isNotEmptyVal = (value: unknown) => {
|
|
|
return value !== undefined && value !== null;
|
|
|
};
|
|
|
+
|
|
|
+export const disabledDate = (current: Dayjs) => {
|
|
|
+ return current > dayjs().endOf('day');
|
|
|
+};
|