@peng_kai/kit 0.3.0-beta.28 → 0.3.0-beta.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,14 +3,14 @@ import dayjs, { type Dayjs } from '../../../libs/dayjs';
|
|
|
3
3
|
import { type ComponentProps } from 'vue-component-type-helpers'
|
|
4
4
|
|
|
5
5
|
export const antdRangePickerPresets = [
|
|
6
|
-
{ label: '今天', key: 'today', value
|
|
7
|
-
{ label: '昨天', key: 'yesterday', value
|
|
8
|
-
{ label: '本月', key: 'thisMonth', value
|
|
9
|
-
{ label: '上个月', key: 'lastMonth', value
|
|
10
|
-
{ label: '近3个月', key: 'last3months', value
|
|
11
|
-
{ label: '近半年', key: 'last6months', value
|
|
12
|
-
{ label: '今年', key: '
|
|
13
|
-
] as { label: string; key: string; value: [Dayjs, Dayjs] }[]
|
|
6
|
+
{ label: '今天', key: 'today', get value() {return [dayjs().startOf('day'), dayjs().endOf('day')] } },
|
|
7
|
+
{ label: '昨天', key: 'yesterday', get value() { return [dayjs().subtract(1, 'day').startOf('day'), dayjs().subtract(1, 'day').endOf('day')] } },
|
|
8
|
+
{ label: '本月', key: 'thisMonth', get value() { return [dayjs().startOf('month'), dayjs().endOf('month')] } },
|
|
9
|
+
{ label: '上个月', key: 'lastMonth', get value() { return [dayjs().subtract(1, 'month').startOf('month'), dayjs().subtract(1, 'month').endOf('month')] } },
|
|
10
|
+
{ label: '近3个月', key: 'last3months', get value() { return [dayjs().subtract(2, 'month').startOf('month'), dayjs().endOf('month')] } },
|
|
11
|
+
{ label: '近半年', key: 'last6months', get value() { return [dayjs().subtract(5, 'month').startOf('month'), dayjs().endOf('month')] } },
|
|
12
|
+
{ label: '今年', key: 'thisYear', get value() { return [dayjs().startOf('year'), dayjs().endOf('month')] } },
|
|
13
|
+
] as unknown as { label: string; key: string; value: [Dayjs, Dayjs] }[]
|
|
14
14
|
|
|
15
15
|
export const antdRangePickerShowTimeProps: ComponentProps<typeof RangePicker> = {
|
|
16
16
|
presets: antdRangePickerPresets,
|