@keyblade/pro-components 1.13.8-alpha.2 → 1.13.8-alpha.20
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.
- package/es/components.d.ts +5 -0
- package/es/global-props.d.ts +13 -0
- package/es/global-props.js +4 -0
- package/es/index.d.ts +7 -1
- package/es/index.js +31 -22
- package/es/inerface.d.ts +2 -0
- package/es/pro-calendar/calendar.vue.d.ts +75 -0
- package/es/pro-calendar/calendar.vue.js +158 -0
- package/es/pro-calendar/calendar.vue3.js +5 -0
- package/es/pro-calendar/enum.d.ts +6 -0
- package/es/pro-calendar/enum.js +4 -0
- package/es/pro-calendar/header.vue.d.ts +27 -0
- package/es/pro-calendar/header.vue.js +135 -0
- package/es/pro-calendar/header.vue2.js +4 -0
- package/es/pro-calendar/hooks/useCellClassName.d.ts +12 -0
- package/es/pro-calendar/hooks/useCellClassName.js +41 -0
- package/es/pro-calendar/index.d.ts +118 -0
- package/es/pro-calendar/index.js +11 -0
- package/es/pro-calendar/inerface.d.ts +87 -0
- package/es/pro-calendar/month.d.ts +5 -0
- package/es/pro-calendar/month.js +43 -0
- package/es/pro-calendar/month.vue.d.ts +22 -0
- package/es/pro-calendar/month.vue.js +127 -0
- package/es/pro-calendar/month.vue2.js +4 -0
- package/es/pro-calendar/week.vue.d.ts +3 -0
- package/es/pro-calendar/week.vue.js +34 -0
- package/es/pro-calendar/week.vue2.js +4 -0
- package/es/pro-calendar/year.vue.d.ts +3 -0
- package/es/pro-calendar/year.vue.js +112 -0
- package/es/pro-calendar/year.vue2.js +4 -0
- package/es/pro-date-range-picker/index.d.ts +8 -8
- package/es/pro-date-range-picker/{type.d.ts → inerface.d.ts} +5 -1
- package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +1 -1
- package/es/pro-date-range-picker/pro-date-range-picker.vue.js +3 -3
- package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +70 -56
- package/es/pro-footer-bar/index.d.ts +38 -0
- package/es/pro-footer-bar/index.js +11 -0
- package/es/pro-footer-bar/index.vue.d.ts +24 -0
- package/es/pro-footer-bar/index.vue.js +7 -0
- package/es/pro-footer-bar/index.vue2.js +44 -0
- package/es/pro-footer-bar/inerface.d.ts +7 -0
- package/es/pro-form-group/index.d.ts +43 -0
- package/es/pro-form-group/index.js +12 -0
- package/es/pro-form-group/index.vue.d.ts +28 -0
- package/es/pro-form-group/index.vue.js +7 -0
- package/es/pro-form-group/index.vue2.js +43 -0
- package/es/pro-image-upload/image-upload.vue.d.ts +1 -1
- package/es/pro-image-upload/index.d.ts +3 -3
- package/es/pro-layout/hooks.d.ts +1 -1
- package/es/pro-layout/hooks.js +84 -84
- package/es/pro-layout/pro-layout.vue.js +35 -37
- package/es/pro-menu/index.d.ts +11 -80
- package/es/pro-menu/interface.d.ts +19 -0
- package/es/pro-menu/menu-item.vue.d.ts +25 -0
- package/es/pro-menu/menu-item.vue.js +35 -0
- package/es/pro-menu/menu-item.vue2.js +4 -0
- package/es/pro-menu/pro-menu-item.vue.d.ts +7 -0
- package/es/pro-menu/pro-menu-item.vue.js +63 -0
- package/es/pro-menu/pro-menu-item.vue2.js +4 -0
- package/es/pro-menu/pro-menu.vue.d.ts +7 -55
- package/es/pro-menu/pro-menu.vue.js +28 -114
- package/es/pro-menu/sub-menu.vue.d.ts +22 -0
- package/es/pro-menu/sub-menu.vue.js +54 -0
- package/es/pro-menu/sub-menu.vue2.js +4 -0
- package/es/pro-menu/util.d.ts +9 -0
- package/es/pro-menu/util.js +7 -0
- package/es/pro-page-container/index.d.ts +36 -130
- package/es/pro-page-container/index.js +7 -6
- package/es/pro-page-container/inerface.d.ts +12 -0
- package/es/pro-page-container/pro-page-container.vue.d.ts +21 -79
- package/es/pro-page-container/pro-page-container.vue.js +38 -36
- package/es/pro-table/index.d.ts +7 -5
- package/es/pro-table/index.js +5 -4
- package/es/pro-table/index.vue.d.ts +10 -3
- package/es/pro-table/index.vue.js +30 -20
- package/es/pro-table/index.vue3.js +5 -0
- package/es/pro-table/interface.d.ts +1 -0
- package/es/pro-textarea/index.d.ts +25 -0
- package/es/pro-textarea/index.js +11 -0
- package/es/pro-textarea/index.vue.d.ts +4 -0
- package/es/pro-textarea/index.vue.js +7 -0
- package/es/pro-textarea/index.vue2.js +40 -0
- package/es/pro-textarea/inerface.d.ts +43 -0
- package/es/style.css +1 -1
- package/package.json +1 -1
- package/es/pro-table/index.vue2.js +0 -4
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { ArcoOptions } from '@arco-design/web-vue/es/_utils/types';
|
|
3
|
+
import { default as _ProCalendar } from './calendar.vue';
|
|
4
|
+
import { ProCalendarProps } from './inerface';
|
|
5
|
+
declare const ProCalendar: {
|
|
6
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./inerface').IProCalendarProps> & Readonly<{
|
|
7
|
+
onChange?: ((date: Date) => any) | undefined;
|
|
8
|
+
"onUpdate:modelValue"?: ((date: Date) => any) | undefined;
|
|
9
|
+
onPanelChange?: ((date: Date) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
change: (date: Date) => any;
|
|
12
|
+
"update:modelValue": (date: Date) => any;
|
|
13
|
+
panelChange: (date: Date) => any;
|
|
14
|
+
}, import('vue').PublicProps, {
|
|
15
|
+
header: boolean | {
|
|
16
|
+
hideLeft?: boolean;
|
|
17
|
+
hideRight?: boolean;
|
|
18
|
+
};
|
|
19
|
+
dayStartOfWeek: 0 | 1;
|
|
20
|
+
modes: (import("./enum").EMode.month | import("./enum").EMode.year)[];
|
|
21
|
+
defaultMode: import("./enum").EMode.month | import("./enum").EMode.year;
|
|
22
|
+
allowSelect: boolean;
|
|
23
|
+
panelTodayBtn: boolean;
|
|
24
|
+
isWeek: boolean;
|
|
25
|
+
panel: boolean;
|
|
26
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
27
|
+
P: {};
|
|
28
|
+
B: {};
|
|
29
|
+
D: {};
|
|
30
|
+
C: {};
|
|
31
|
+
M: {};
|
|
32
|
+
Defaults: {};
|
|
33
|
+
}, Readonly<import('./inerface').IProCalendarProps> & Readonly<{
|
|
34
|
+
onChange?: ((date: Date) => any) | undefined;
|
|
35
|
+
"onUpdate:modelValue"?: ((date: Date) => any) | undefined;
|
|
36
|
+
onPanelChange?: ((date: Date) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, {
|
|
38
|
+
header: boolean | {
|
|
39
|
+
hideLeft?: boolean;
|
|
40
|
+
hideRight?: boolean;
|
|
41
|
+
};
|
|
42
|
+
dayStartOfWeek: 0 | 1;
|
|
43
|
+
modes: (import("./enum").EMode.month | import("./enum").EMode.year)[];
|
|
44
|
+
defaultMode: import("./enum").EMode.month | import("./enum").EMode.year;
|
|
45
|
+
allowSelect: boolean;
|
|
46
|
+
panelTodayBtn: boolean;
|
|
47
|
+
isWeek: boolean;
|
|
48
|
+
panel: boolean;
|
|
49
|
+
}>;
|
|
50
|
+
__isFragment?: never;
|
|
51
|
+
__isTeleport?: never;
|
|
52
|
+
__isSuspense?: never;
|
|
53
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./inerface').IProCalendarProps> & Readonly<{
|
|
54
|
+
onChange?: ((date: Date) => any) | undefined;
|
|
55
|
+
"onUpdate:modelValue"?: ((date: Date) => any) | undefined;
|
|
56
|
+
onPanelChange?: ((date: Date) => any) | undefined;
|
|
57
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
58
|
+
change: (date: Date) => any;
|
|
59
|
+
"update:modelValue": (date: Date) => any;
|
|
60
|
+
panelChange: (date: Date) => any;
|
|
61
|
+
}, string, {
|
|
62
|
+
header: boolean | {
|
|
63
|
+
hideLeft?: boolean;
|
|
64
|
+
hideRight?: boolean;
|
|
65
|
+
};
|
|
66
|
+
dayStartOfWeek: 0 | 1;
|
|
67
|
+
modes: (import("./enum").EMode.month | import("./enum").EMode.year)[];
|
|
68
|
+
defaultMode: import("./enum").EMode.month | import("./enum").EMode.year;
|
|
69
|
+
allowSelect: boolean;
|
|
70
|
+
panelTodayBtn: boolean;
|
|
71
|
+
isWeek: boolean;
|
|
72
|
+
panel: boolean;
|
|
73
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
74
|
+
$slots: Readonly<{
|
|
75
|
+
default?: (props: {
|
|
76
|
+
year: string;
|
|
77
|
+
month: string;
|
|
78
|
+
date?: string;
|
|
79
|
+
value: {
|
|
80
|
+
year: number;
|
|
81
|
+
month: number;
|
|
82
|
+
date?: number;
|
|
83
|
+
};
|
|
84
|
+
}) => any;
|
|
85
|
+
header?: (props: {
|
|
86
|
+
year: string;
|
|
87
|
+
month: string;
|
|
88
|
+
value: {
|
|
89
|
+
year: number;
|
|
90
|
+
month: number;
|
|
91
|
+
};
|
|
92
|
+
}) => any;
|
|
93
|
+
}> & {
|
|
94
|
+
default?: (props: {
|
|
95
|
+
year: string;
|
|
96
|
+
month: string;
|
|
97
|
+
date?: string;
|
|
98
|
+
value: {
|
|
99
|
+
year: number;
|
|
100
|
+
month: number;
|
|
101
|
+
date?: number;
|
|
102
|
+
};
|
|
103
|
+
}) => any;
|
|
104
|
+
header?: (props: {
|
|
105
|
+
year: string;
|
|
106
|
+
month: string;
|
|
107
|
+
value: {
|
|
108
|
+
year: number;
|
|
109
|
+
month: number;
|
|
110
|
+
};
|
|
111
|
+
}) => any;
|
|
112
|
+
};
|
|
113
|
+
}) & {
|
|
114
|
+
install: (app: App, options?: ArcoOptions) => void;
|
|
115
|
+
};
|
|
116
|
+
export type CalendarInstance = InstanceType<typeof _ProCalendar>;
|
|
117
|
+
export type { ProCalendarProps };
|
|
118
|
+
export default ProCalendar;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { setGlobalConfig as a } from "@arco-design/web-vue/es/_utils/global-config";
|
|
2
|
+
import r from "./calendar.vue.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
const l = Object.assign(r, {
|
|
5
|
+
install: (o, t) => {
|
|
6
|
+
a(o, t), o.component("KbProCalendar", r);
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
l as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
2
|
+
import { EMode } from './enum';
|
|
3
|
+
/**
|
|
4
|
+
* @zh 隐藏头部
|
|
5
|
+
*/
|
|
6
|
+
type IHeaderProps = boolean | {
|
|
7
|
+
hideLeft?: boolean;
|
|
8
|
+
hideRight?: boolean;
|
|
9
|
+
};
|
|
10
|
+
interface IProCalendarBase {
|
|
11
|
+
/** 0:周末开始 | 1:周一开始 */
|
|
12
|
+
dayStartOfWeek?: 0 | 1;
|
|
13
|
+
isWeek?: boolean;
|
|
14
|
+
panel?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface IProCalendarSub extends IProCalendarBase {
|
|
17
|
+
value: Dayjs;
|
|
18
|
+
pageData?: any[];
|
|
19
|
+
pageShowDate: Dayjs;
|
|
20
|
+
/** 选择 */
|
|
21
|
+
selectHandler: (time: Dayjs, disabled: boolean) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface IProCalendarHeader extends IProCalendarBase {
|
|
24
|
+
/** 模式 */
|
|
25
|
+
mode?: EMode.month | EMode.year;
|
|
26
|
+
modes?: (EMode.month | EMode.year)[];
|
|
27
|
+
headerType?: string;
|
|
28
|
+
pageShowDate: Dayjs;
|
|
29
|
+
move: (time: Dayjs) => void;
|
|
30
|
+
/** 年变化 */
|
|
31
|
+
onYearChange: (year: number) => void;
|
|
32
|
+
/** 月变化 */
|
|
33
|
+
onMonthChange: (month: number) => void;
|
|
34
|
+
onChangePageShowDate: (type: 'prev' | 'next', unit: EMode) => void;
|
|
35
|
+
onModeChange: (value: any, ev: Event) => void;
|
|
36
|
+
headerValueFormat: string;
|
|
37
|
+
header?: IHeaderProps;
|
|
38
|
+
}
|
|
39
|
+
export interface IProCalendarYear extends IProCalendarSub {
|
|
40
|
+
/** 模式 */
|
|
41
|
+
mode: EMode.month | EMode.year;
|
|
42
|
+
}
|
|
43
|
+
/** 月 */
|
|
44
|
+
export interface IProCalendarMonth extends IProCalendarSub {
|
|
45
|
+
cell?: boolean;
|
|
46
|
+
current?: number;
|
|
47
|
+
/** 模式 */
|
|
48
|
+
mode?: EMode;
|
|
49
|
+
}
|
|
50
|
+
/** 星期 */
|
|
51
|
+
export interface IProCalendarWeek extends IProCalendarSub {
|
|
52
|
+
/** 模式 */
|
|
53
|
+
mode?: EMode;
|
|
54
|
+
}
|
|
55
|
+
export interface IProCalendarProps extends IProCalendarBase {
|
|
56
|
+
/**
|
|
57
|
+
* @zh 绑定值
|
|
58
|
+
* @en Value
|
|
59
|
+
*/
|
|
60
|
+
modelValue?: Date;
|
|
61
|
+
/**
|
|
62
|
+
* @zh 默认值(非受控状态)
|
|
63
|
+
* @en Default value (uncontrolled state)
|
|
64
|
+
*/
|
|
65
|
+
defaultValue?: Date;
|
|
66
|
+
/**
|
|
67
|
+
* @zh 模式
|
|
68
|
+
* @en Mode
|
|
69
|
+
*/
|
|
70
|
+
mode?: EMode.month | EMode.year;
|
|
71
|
+
/**
|
|
72
|
+
* @zh 默认模式
|
|
73
|
+
* @en Default Mode
|
|
74
|
+
*/
|
|
75
|
+
defaultMode?: EMode.month | EMode.year;
|
|
76
|
+
/**
|
|
77
|
+
* @zh 显示的模式
|
|
78
|
+
* @en Displayed mode
|
|
79
|
+
*/
|
|
80
|
+
modes?: (EMode.month | EMode.year)[];
|
|
81
|
+
header?: IHeaderProps;
|
|
82
|
+
allowSelect?: boolean;
|
|
83
|
+
panelWidth?: number;
|
|
84
|
+
panelTodayBtn?: boolean;
|
|
85
|
+
}
|
|
86
|
+
export type ProCalendarProps = Partial<IProCalendarProps>;
|
|
87
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { methods as o } from "@arco-design/web-vue/es/_utils/date";
|
|
2
|
+
const l = 42, d = (r) => ({
|
|
3
|
+
year: r.year(),
|
|
4
|
+
month: r.month() + 1,
|
|
5
|
+
date: r.date(),
|
|
6
|
+
day: r.day(),
|
|
7
|
+
time: r
|
|
8
|
+
}), f = (r) => ({
|
|
9
|
+
start: d(o.startOf(r, "month")),
|
|
10
|
+
end: d(o.endOf(r, "month")),
|
|
11
|
+
days: r.daysInMonth()
|
|
12
|
+
});
|
|
13
|
+
function h(r, { dayStartOfWeek: y = 0, isWeek: i }) {
|
|
14
|
+
const e = f(r), n = Array(l).fill(null).map(() => ({})), a = y === 0 ? e.start.day : (e.start.day || 7) - 1;
|
|
15
|
+
n[a] = {
|
|
16
|
+
...e.start,
|
|
17
|
+
isCurrent: !0
|
|
18
|
+
};
|
|
19
|
+
for (let t = 0; t < a; t++)
|
|
20
|
+
n[a - t - 1] = {
|
|
21
|
+
...d(o.subtract(e.start.time, t + 1, "day")),
|
|
22
|
+
isPrev: !0
|
|
23
|
+
};
|
|
24
|
+
for (let t = 0; t < l - a - 1; t++)
|
|
25
|
+
n[a + t + 1] = {
|
|
26
|
+
...d(o.add(e.start.time, t + 1, "day")),
|
|
27
|
+
isCurrent: t < e.days,
|
|
28
|
+
isNext: t >= e.days - 1
|
|
29
|
+
};
|
|
30
|
+
const s = Array(6).fill(null).map(() => []);
|
|
31
|
+
for (let t = 0; t < 6; t++)
|
|
32
|
+
if (s[t] = n.slice(t * 7, 7 * (t + 1)), i) {
|
|
33
|
+
const u = s[t][0].time, c = [...s[t]];
|
|
34
|
+
s[t].unshift({
|
|
35
|
+
weekRows: c,
|
|
36
|
+
weekOfYear: u.week()
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return s;
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
h as getAllDaysByTime
|
|
43
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IProCalendarMonth } from './inerface';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
default?(_: {
|
|
6
|
+
year: any;
|
|
7
|
+
month: any;
|
|
8
|
+
date: any;
|
|
9
|
+
}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: HTMLDivElement;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<IProCalendarMonth, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IProCalendarMonth> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { defineComponent as C, useSlots as D, computed as f, createElementBlock as s, openBlock as n, normalizeClass as o, unref as r, createVNode as O, createElementVNode as i, Fragment as m, renderList as y, createCommentVNode as V, renderSlot as B, createTextVNode as N, toDisplayString as k } from "vue";
|
|
2
|
+
import "dayjs";
|
|
3
|
+
import { dayjs as Y } from "@arco-design/web-vue/es/_utils/date";
|
|
4
|
+
import { padStart as H } from "@arco-design/web-vue/es/_utils/pad";
|
|
5
|
+
import T from "./week.vue.js";
|
|
6
|
+
import b from "./hooks/useCellClassName.js";
|
|
7
|
+
import { getPrefixCls as E } from "@arco-design/web-vue/es/_utils/global-config";
|
|
8
|
+
import { getAllDaysByTime as F } from "./month.js";
|
|
9
|
+
const M = ["onClick"], R = ["onClick"], J = /* @__PURE__ */ C({
|
|
10
|
+
__name: "month",
|
|
11
|
+
props: {
|
|
12
|
+
cell: { type: Boolean },
|
|
13
|
+
current: {},
|
|
14
|
+
mode: {},
|
|
15
|
+
value: {},
|
|
16
|
+
pageData: {},
|
|
17
|
+
pageShowDate: {},
|
|
18
|
+
selectHandler: { type: Function },
|
|
19
|
+
dayStartOfWeek: {},
|
|
20
|
+
isWeek: { type: Boolean },
|
|
21
|
+
panel: { type: Boolean }
|
|
22
|
+
},
|
|
23
|
+
setup(v) {
|
|
24
|
+
const l = v, w = D(), t = E("calendar"), h = l.pageShowDate.year(), g = f(
|
|
25
|
+
() => b({
|
|
26
|
+
prefixCls: t,
|
|
27
|
+
mergedValue: l.value,
|
|
28
|
+
panel: !1,
|
|
29
|
+
innerMode: l.mode,
|
|
30
|
+
rangeValues: [],
|
|
31
|
+
hoverRangeValues: [],
|
|
32
|
+
isSameTime: (e, d) => e.isSame(d, "day")
|
|
33
|
+
})
|
|
34
|
+
);
|
|
35
|
+
function c(e) {
|
|
36
|
+
const d = l.value.year(), p = l.value.month() + 1, u = l.value.week();
|
|
37
|
+
return l.value && e.weekRows.find(
|
|
38
|
+
(a) => a.year === d && a.month === p
|
|
39
|
+
) && u === e.weekOfYear;
|
|
40
|
+
}
|
|
41
|
+
const $ = f(() => typeof l.current == "number" ? F(
|
|
42
|
+
Y(`${h}-${H(l.current + 1, 2, "0")}-01`),
|
|
43
|
+
{
|
|
44
|
+
dayStartOfWeek: l.dayStartOfWeek || 0,
|
|
45
|
+
isWeek: l.isWeek
|
|
46
|
+
}
|
|
47
|
+
) : l.pageData);
|
|
48
|
+
return (e, d) => (n(), s("div", {
|
|
49
|
+
class: o(e.cell ? `${r(t)}-month-cell` : `${r(t)}-month`)
|
|
50
|
+
}, [
|
|
51
|
+
O(T, {
|
|
52
|
+
value: e.value,
|
|
53
|
+
"select-handler": e.selectHandler,
|
|
54
|
+
"day-start-of-week": e.dayStartOfWeek,
|
|
55
|
+
"is-week": e.isWeek,
|
|
56
|
+
panel: e.panel,
|
|
57
|
+
mode: e.mode,
|
|
58
|
+
"page-show-date": e.pageShowDate,
|
|
59
|
+
"page-data": e.pageData
|
|
60
|
+
}, null, 8, ["value", "select-handler", "day-start-of-week", "is-week", "panel", "mode", "page-show-date", "page-data"]),
|
|
61
|
+
i("div", {
|
|
62
|
+
class: o(`${r(t)}-month-cell-body`)
|
|
63
|
+
}, [
|
|
64
|
+
(n(!0), s(m, null, y($.value, (p, u) => (n(), s("div", {
|
|
65
|
+
key: u,
|
|
66
|
+
class: o([
|
|
67
|
+
`${r(t)}-month-row`,
|
|
68
|
+
{
|
|
69
|
+
[`${r(t)}-row-week`]: e.isWeek
|
|
70
|
+
}
|
|
71
|
+
])
|
|
72
|
+
}, [
|
|
73
|
+
(n(!0), s(m, null, y(p, (a, S) => (n(), s("div", {
|
|
74
|
+
key: S,
|
|
75
|
+
class: o(g.value(a, !1)),
|
|
76
|
+
onClick: (W) => a.time && !e.isWeek ? e.selectHandler(a.time, !1) : void 0
|
|
77
|
+
}, [
|
|
78
|
+
a.time ? (n(), s(m, { key: 0 }, [
|
|
79
|
+
r(w).default ? B(e.$slots, "default", {
|
|
80
|
+
key: 0,
|
|
81
|
+
year: a.year,
|
|
82
|
+
month: a.month,
|
|
83
|
+
date: a.date
|
|
84
|
+
}) : (n(), s("div", {
|
|
85
|
+
key: 1,
|
|
86
|
+
class: o(`${r(t)}-date`),
|
|
87
|
+
onClick: (W) => e.isWeek ? void 0 : e.selectHandler(a.time, !1)
|
|
88
|
+
}, [
|
|
89
|
+
i("div", {
|
|
90
|
+
class: o(`${r(t)}-date-value`)
|
|
91
|
+
}, [
|
|
92
|
+
e.panel ? (n(), s(m, { key: 0 }, [
|
|
93
|
+
N(k(a.date), 1)
|
|
94
|
+
], 64)) : (n(), s("div", {
|
|
95
|
+
key: 1,
|
|
96
|
+
class: o(`${r(t)}-date-circle`)
|
|
97
|
+
}, k(a.date), 3))
|
|
98
|
+
], 2)
|
|
99
|
+
], 10, R))
|
|
100
|
+
], 64)) : "weekOfYear" in a ? (n(), s("div", {
|
|
101
|
+
key: 1,
|
|
102
|
+
class: o([
|
|
103
|
+
`${r(t)}-cell`,
|
|
104
|
+
`${r(t)}-cell-week`,
|
|
105
|
+
{
|
|
106
|
+
[`${r(t)}-cell-selected-week`]: c(a),
|
|
107
|
+
[`${r(t)}-cell-in-range`]: c(a)
|
|
108
|
+
}
|
|
109
|
+
])
|
|
110
|
+
}, [
|
|
111
|
+
i("div", {
|
|
112
|
+
class: o(`${r(t)}-date`)
|
|
113
|
+
}, [
|
|
114
|
+
i("div", {
|
|
115
|
+
class: o(`${r(t)}-date-value`)
|
|
116
|
+
}, k(a.weekOfYear), 3)
|
|
117
|
+
], 2)
|
|
118
|
+
], 2)) : V("", !0)
|
|
119
|
+
], 10, M))), 128))
|
|
120
|
+
], 2))), 128))
|
|
121
|
+
], 2)
|
|
122
|
+
], 2));
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
export {
|
|
126
|
+
J as default
|
|
127
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IProCalendarWeek } from './inerface';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<IProCalendarWeek, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IProCalendarWeek> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as u, computed as m, createElementBlock as a, openBlock as n, normalizeClass as l, unref as t, Fragment as c, renderList as f, toDisplayString as y } from "vue";
|
|
2
|
+
import { getPrefixCls as k } from "@arco-design/web-vue/es/_utils/global-config";
|
|
3
|
+
import { useI18n as h } from "@arco-design/web-vue/es/locale";
|
|
4
|
+
import { EMode as g } from "./enum.js";
|
|
5
|
+
const W = /* @__PURE__ */ u({
|
|
6
|
+
__name: "week",
|
|
7
|
+
props: {
|
|
8
|
+
mode: {},
|
|
9
|
+
value: {},
|
|
10
|
+
pageData: {},
|
|
11
|
+
pageShowDate: {},
|
|
12
|
+
selectHandler: { type: Function },
|
|
13
|
+
dayStartOfWeek: {},
|
|
14
|
+
isWeek: { type: Boolean },
|
|
15
|
+
panel: { type: Boolean }
|
|
16
|
+
},
|
|
17
|
+
setup(i) {
|
|
18
|
+
const s = i, r = k("calendar-week-list"), { t: d } = h(), p = m(() => {
|
|
19
|
+
const e = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
|
|
20
|
+
return s.dayStartOfWeek === 0 ? e.unshift("sunday") : e.push("sunday"), s.isWeek && e.unshift("self"), e;
|
|
21
|
+
});
|
|
22
|
+
return (e, w) => (n(), a("div", {
|
|
23
|
+
class: l(t(r))
|
|
24
|
+
}, [
|
|
25
|
+
(n(!0), a(c, null, f(p.value, (o) => (n(), a("div", {
|
|
26
|
+
key: o,
|
|
27
|
+
class: l(`${t(r)}-item`)
|
|
28
|
+
}, y(t(d)(`calendar.week.${e.panel || e.mode === t(g).year ? "short" : "long"}.${o}`)), 3))), 128))
|
|
29
|
+
], 2));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
W as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IProCalendarYear } from './inerface';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<IProCalendarYear, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IProCalendarYear> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { defineComponent as C, computed as m, createElementBlock as l, openBlock as n, normalizeClass as o, unref as t, Fragment as c, renderList as f, createElementVNode as v, toDisplayString as h, createVNode as D } from "vue";
|
|
2
|
+
import "dayjs";
|
|
3
|
+
import { padStart as N } from "@arco-design/web-vue/es/_utils/pad";
|
|
4
|
+
import { dayjs as b } from "@arco-design/web-vue/es/_utils/date";
|
|
5
|
+
import V from "./month.vue.js";
|
|
6
|
+
import B from "./hooks/useCellClassName.js";
|
|
7
|
+
import { getPrefixCls as H } from "@arco-design/web-vue/es/_utils/global-config";
|
|
8
|
+
import { useI18n as M } from "@arco-design/web-vue/es/locale";
|
|
9
|
+
const O = ["onClick"], G = /* @__PURE__ */ C({
|
|
10
|
+
__name: "year",
|
|
11
|
+
props: {
|
|
12
|
+
mode: {},
|
|
13
|
+
value: {},
|
|
14
|
+
pageData: {},
|
|
15
|
+
pageShowDate: {},
|
|
16
|
+
selectHandler: { type: Function },
|
|
17
|
+
dayStartOfWeek: {},
|
|
18
|
+
isWeek: { type: Boolean },
|
|
19
|
+
panel: { type: Boolean }
|
|
20
|
+
},
|
|
21
|
+
setup(y) {
|
|
22
|
+
const i = [
|
|
23
|
+
"January",
|
|
24
|
+
"February",
|
|
25
|
+
"March",
|
|
26
|
+
"April",
|
|
27
|
+
"May",
|
|
28
|
+
"June",
|
|
29
|
+
"July",
|
|
30
|
+
"August",
|
|
31
|
+
"September",
|
|
32
|
+
"October",
|
|
33
|
+
"November",
|
|
34
|
+
"December"
|
|
35
|
+
].map((e, a) => ({
|
|
36
|
+
name: e,
|
|
37
|
+
value: a
|
|
38
|
+
})), u = y, r = H("calendar"), { t: d } = M(), g = m(
|
|
39
|
+
() => B({
|
|
40
|
+
prefixCls: r,
|
|
41
|
+
mergedValue: u.value,
|
|
42
|
+
panel: !1,
|
|
43
|
+
innerMode: u.mode,
|
|
44
|
+
rangeValues: [],
|
|
45
|
+
hoverRangeValues: [],
|
|
46
|
+
isSameTime: (e, a) => e.isSame(a, "month")
|
|
47
|
+
})
|
|
48
|
+
), k = m(() => u.pageShowDate.year());
|
|
49
|
+
function p(e) {
|
|
50
|
+
return b(
|
|
51
|
+
`${k.value}-${N(e + 1, 2, "0")}-01`
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
const w = m(() => {
|
|
55
|
+
if (u.panel) {
|
|
56
|
+
const e = [];
|
|
57
|
+
for (let a = 0; a < 4; a++)
|
|
58
|
+
e.push(i.slice(a * 3, 3 * (a + 1)));
|
|
59
|
+
return e;
|
|
60
|
+
} else {
|
|
61
|
+
const e = [];
|
|
62
|
+
for (let a = 0; a < 3; a++)
|
|
63
|
+
e.push(i.slice(a * 4, 4 * (a + 1)));
|
|
64
|
+
return e;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return (e, a) => (n(), l("div", {
|
|
68
|
+
class: o(`${t(r)}-year`)
|
|
69
|
+
}, [
|
|
70
|
+
(n(!0), l(c, null, f(w.value, (S, $) => (n(), l("div", {
|
|
71
|
+
key: $,
|
|
72
|
+
class: o(`${t(r)}-year-row`)
|
|
73
|
+
}, [
|
|
74
|
+
(n(!0), l(c, null, f(S, (s) => (n(), l("div", {
|
|
75
|
+
key: s.value,
|
|
76
|
+
class: o(g.value({ ...s, time: p(s.value) }, !1))
|
|
77
|
+
}, [
|
|
78
|
+
e.panel ? (n(), l("div", {
|
|
79
|
+
key: 0,
|
|
80
|
+
class: o(`${t(r)}-date`),
|
|
81
|
+
onClick: () => e.selectHandler(p(s.value), !1)
|
|
82
|
+
}, [
|
|
83
|
+
v("div", {
|
|
84
|
+
class: o(`${t(r)}-date-value`)
|
|
85
|
+
}, h(t(d)(`calendar.month.short.${s.name}`)), 3)
|
|
86
|
+
], 10, O)) : (n(), l("div", {
|
|
87
|
+
key: 1,
|
|
88
|
+
class: o(`${t(r)}-month-with-days`)
|
|
89
|
+
}, [
|
|
90
|
+
v("div", {
|
|
91
|
+
class: o(`${t(r)}-month-title`)
|
|
92
|
+
}, h(t(d)(`calendar.month.long.${s.name}`)), 3),
|
|
93
|
+
D(V, {
|
|
94
|
+
"page-show-date": e.pageShowDate,
|
|
95
|
+
"page-data": e.pageData,
|
|
96
|
+
"day-start-of-week": e.dayStartOfWeek,
|
|
97
|
+
"select-handler": e.selectHandler,
|
|
98
|
+
"is-week": e.isWeek,
|
|
99
|
+
cell: !0,
|
|
100
|
+
current: s.value,
|
|
101
|
+
value: e.value,
|
|
102
|
+
mode: e.mode
|
|
103
|
+
}, null, 8, ["page-show-date", "page-data", "day-start-of-week", "select-handler", "is-week", "current", "value", "mode"])
|
|
104
|
+
], 2))
|
|
105
|
+
], 2))), 128))
|
|
106
|
+
], 2))), 128))
|
|
107
|
+
], 2));
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
export {
|
|
111
|
+
G as default
|
|
112
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
declare const ProDateRangePicker: {
|
|
3
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./
|
|
4
|
-
"onUpdate:modelValue"?: ((value: import('./
|
|
3
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./inerface').IProDateRangePickerProps> & Readonly<{
|
|
4
|
+
"onUpdate:modelValue"?: ((value: import('./inerface').IModelValue) => any) | undefined;
|
|
5
5
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
6
|
-
"update:modelValue": (value: import('./
|
|
6
|
+
"update:modelValue": (value: import('./inerface').IModelValue) => any;
|
|
7
7
|
}, import('vue').PublicProps, {
|
|
8
8
|
hideLabel: boolean;
|
|
9
9
|
startField: string;
|
|
@@ -21,8 +21,8 @@ declare const ProDateRangePicker: {
|
|
|
21
21
|
C: {};
|
|
22
22
|
M: {};
|
|
23
23
|
Defaults: {};
|
|
24
|
-
}, Readonly<import('./
|
|
25
|
-
"onUpdate:modelValue"?: ((value: import('./
|
|
24
|
+
}, Readonly<import('./inerface').IProDateRangePickerProps> & Readonly<{
|
|
25
|
+
"onUpdate:modelValue"?: ((value: import('./inerface').IModelValue) => any) | undefined;
|
|
26
26
|
}>, {}, {}, {}, {}, {
|
|
27
27
|
hideLabel: boolean;
|
|
28
28
|
startField: string;
|
|
@@ -34,10 +34,10 @@ declare const ProDateRangePicker: {
|
|
|
34
34
|
__isFragment?: never;
|
|
35
35
|
__isTeleport?: never;
|
|
36
36
|
__isSuspense?: never;
|
|
37
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('./
|
|
38
|
-
"onUpdate:modelValue"?: ((value: import('./
|
|
37
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('./inerface').IProDateRangePickerProps> & Readonly<{
|
|
38
|
+
"onUpdate:modelValue"?: ((value: import('./inerface').IModelValue) => any) | undefined;
|
|
39
39
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
40
|
-
"update:modelValue": (value: import('./
|
|
40
|
+
"update:modelValue": (value: import('./inerface').IModelValue) => any;
|
|
41
41
|
}, string, {
|
|
42
42
|
hideLabel: boolean;
|
|
43
43
|
startField: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatePickerInstance, FormItemInstance } from '@arco-design/web-vue';
|
|
1
|
+
import { DatePickerInstance, FormItemInstance, TimePickerInstance } from '@arco-design/web-vue';
|
|
2
2
|
export interface IModelValue {
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
}
|
|
@@ -18,5 +18,9 @@ export interface IProDateRangePickerProps {
|
|
|
18
18
|
intraday?: boolean;
|
|
19
19
|
hideLabel?: boolean;
|
|
20
20
|
formItemProps?: FormItemInstance;
|
|
21
|
+
/** 日期选择器配置 */
|
|
21
22
|
datePickerProps?: DatePickerInstance;
|
|
23
|
+
/** 时间选择器配置 */
|
|
24
|
+
timePickerProps?: TimePickerInstance['$props'];
|
|
22
25
|
}
|
|
26
|
+
export type ProDateRangePickerProps = Partial<IProDateRangePickerProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IModelValue, IProDateRangePickerProps } from './
|
|
1
|
+
import { IModelValue, IProDateRangePickerProps } from './inerface';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<IProDateRangePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
3
|
"update:modelValue": (value: IModelValue) => any;
|
|
4
4
|
}, string, import('vue').PublicProps, Readonly<IProDateRangePickerProps> & Readonly<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./pro-date-range-picker.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-72bf5f26"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|