@aplus-frontend/ui 0.4.11 → 0.4.12
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/src/ap-field/date-range/index.vue.mjs +65 -57
- package/es/src/ap-field/hooks/use-default-presets.d.ts +7 -4
- package/es/src/ap-field/hooks/use-default-presets.mjs +24 -13
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +2 -0
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +109 -127
- package/es/src/business/ap-ladder/index.d.ts +1 -0
- package/es/src/business/ap-ladder/useWatchEllipsis.d.ts +3 -0
- package/es/src/business/ap-ladder/useWatchEllipsis.mjs +35 -0
- package/es/src/config-provider/hooks/use-locale.mjs +7 -7
- package/es/src/full-screen/index.vue.d.ts +2 -2
- package/es/src/full-screen/index.vue.mjs +19 -18
- package/es/src/hooks/useFullScreen.mjs +12 -11
- package/es/src/utils/data-range-persets.d.ts +23 -40
- package/es/src/utils/data-range-persets.mjs +95 -102
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/hooks/use-default-presets.d.ts +7 -4
- package/lib/src/ap-field/hooks/use-default-presets.js +1 -1
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +2 -0
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
- package/lib/src/business/ap-ladder/index.d.ts +1 -0
- package/lib/src/business/ap-ladder/useWatchEllipsis.d.ts +3 -0
- package/lib/src/business/ap-ladder/useWatchEllipsis.js +1 -0
- package/lib/src/config-provider/hooks/use-locale.js +1 -1
- package/lib/src/full-screen/index.vue.d.ts +2 -2
- package/lib/src/full-screen/index.vue.js +1 -1
- package/lib/src/hooks/useFullScreen.js +1 -1
- package/lib/src/utils/data-range-persets.d.ts +23 -40
- package/lib/src/utils/data-range-persets.js +1 -1
- package/package.json +2 -2
- package/theme/ap-form/ap-form-item.css +1 -1
- package/theme/ap-form/ap-form-item.less +1 -1
- package/theme/ap-form/index.css +4 -1
- package/theme/ap-form/search-form.css +4 -1
- package/theme/ap-form/search-form.less +5 -0
- package/theme/ap-table/ap-table.css +4 -1
- package/theme/ap-table-modal/index.css +4 -1
- package/theme/editable-table/index.css +4 -1
- package/theme/index.css +4 -1
|
@@ -5,82 +5,65 @@ type Timezone = LiteralUnion<ZoneAlias, string>;
|
|
|
5
5
|
/**
|
|
6
6
|
* 指定时区格式化
|
|
7
7
|
* @param {Timezone} [timezone] - 时区
|
|
8
|
+
* @param {number} [currentDate] - 当前时间
|
|
8
9
|
*/
|
|
9
|
-
export declare const presetsGetTimezoneFormat: (timezone?: Timezone) => dayjs.Dayjs;
|
|
10
|
+
export declare const presetsGetTimezoneFormat: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs;
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
+
* 根据时区获取今天
|
|
12
13
|
* @param {Timezone} [timezone] - 时区
|
|
14
|
+
* @param {number} [currentDate] - 当前时间
|
|
13
15
|
*/
|
|
14
|
-
export declare const presetsGetToday: (timezone?: Timezone) =>
|
|
15
|
-
label: string;
|
|
16
|
-
value: dayjs.Dayjs[];
|
|
17
|
-
};
|
|
16
|
+
export declare const presetsGetToday: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
18
|
+
* 根据时区获取昨天
|
|
20
19
|
* @param {Timezone} [timezone] - 时区
|
|
20
|
+
* @param {number} [currentDate] - 当前时间
|
|
21
21
|
*/
|
|
22
|
-
export declare const presetsGetYesterday: (timezone?: Timezone) =>
|
|
23
|
-
label: string;
|
|
24
|
-
value: dayjs.Dayjs[];
|
|
25
|
-
};
|
|
22
|
+
export declare const presetsGetYesterday: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
26
23
|
/**
|
|
27
24
|
* 根据时区获取本周
|
|
28
25
|
* @param {Timezone} [timezone] - 时区
|
|
26
|
+
* @param {number} [currentDate] - 当前时间
|
|
29
27
|
*/
|
|
30
|
-
export declare const presetsGetThisWeek: (timezone?: Timezone) =>
|
|
31
|
-
label: string;
|
|
32
|
-
value: dayjs.Dayjs[];
|
|
33
|
-
};
|
|
28
|
+
export declare const presetsGetThisWeek: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
34
29
|
/**
|
|
35
30
|
* 根据时区获取上周
|
|
36
31
|
* @param {Timezone} [timezone] - 时区
|
|
32
|
+
* @param {number} [currentDate] - 当前时间
|
|
37
33
|
*/
|
|
38
|
-
export declare const presetsGetLastWeek: (timezone?: Timezone) =>
|
|
39
|
-
label: string;
|
|
40
|
-
value: dayjs.Dayjs[];
|
|
41
|
-
};
|
|
34
|
+
export declare const presetsGetLastWeek: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
42
35
|
/**
|
|
43
36
|
* 根据时区获取本月
|
|
44
37
|
* @param {Timezone} [timezone] - 时区
|
|
38
|
+
* @param {number} [currentDate] - 当前时间
|
|
45
39
|
*/
|
|
46
|
-
export declare const presetsGetThisMonth: (timezone?: Timezone) =>
|
|
47
|
-
label: string;
|
|
48
|
-
value: dayjs.Dayjs[];
|
|
49
|
-
};
|
|
40
|
+
export declare const presetsGetThisMonth: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
50
41
|
/**
|
|
51
42
|
* 根据时区获取上月
|
|
52
43
|
* @param {Timezone} [timezone] - 时区
|
|
44
|
+
* @param {number} [currentDate] - 当前时间
|
|
53
45
|
*/
|
|
54
|
-
export declare const presetsGetLastMonth: (timezone?: Timezone) =>
|
|
55
|
-
label: string;
|
|
56
|
-
value: dayjs.Dayjs[];
|
|
57
|
-
};
|
|
46
|
+
export declare const presetsGetLastMonth: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
58
47
|
/**
|
|
59
48
|
* 根据时区获取今年
|
|
60
49
|
* @param {Timezone} [timezone] - 时区
|
|
50
|
+
* @param {number} [currentDate] - 当前时间
|
|
61
51
|
*/
|
|
62
|
-
export declare const presetsGetThisYear: (timezone?: Timezone) =>
|
|
63
|
-
label: string;
|
|
64
|
-
value: dayjs.Dayjs[];
|
|
65
|
-
};
|
|
52
|
+
export declare const presetsGetThisYear: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
66
53
|
/**
|
|
67
54
|
* 根据时区获取去年
|
|
68
55
|
* @param {Timezone} [timezone] - 时区
|
|
56
|
+
* @param {number} [currentDate] - 当前时间
|
|
69
57
|
*/
|
|
70
|
-
export declare const presetsGetLastYear: (timezone?: Timezone) =>
|
|
71
|
-
label: string;
|
|
72
|
-
value: dayjs.Dayjs[];
|
|
73
|
-
};
|
|
58
|
+
export declare const presetsGetLastYear: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
74
59
|
/**
|
|
75
60
|
* 根据时区获取近x天
|
|
76
61
|
* @param {number} day - 天数
|
|
77
62
|
* @param {Timezone} [timezone] - 时区
|
|
63
|
+
* @param {number} [currentDate] - 当前时间
|
|
78
64
|
*/
|
|
79
|
-
export declare const presetsGetLastXDays: (day: number, timezone?: Timezone) =>
|
|
80
|
-
|
|
81
|
-
value: dayjs.Dayjs[];
|
|
82
|
-
};
|
|
83
|
-
export declare const presetsDefault: (timezone?: Timezone) => {
|
|
65
|
+
export declare const presetsGetLastXDays: (day: number, timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
66
|
+
export declare const presetsDefault: (timezone?: Timezone, currentDate?: number, t?: (path: string, option?: any) => string) => {
|
|
84
67
|
label: string;
|
|
85
68
|
value: dayjs.Dayjs[];
|
|
86
69
|
}[];
|
|
@@ -1,107 +1,100 @@
|
|
|
1
|
-
import { getTimeFormatToZone as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
y(t),
|
|
88
|
-
O(t),
|
|
89
|
-
u(t),
|
|
90
|
-
m(t),
|
|
91
|
-
p(t),
|
|
92
|
-
f(7, t),
|
|
93
|
-
f(30, t)
|
|
1
|
+
import { getTimeFormatToZone as n, userTimezone as o } from "@aplus-frontend/utils";
|
|
2
|
+
import d from "dayjs";
|
|
3
|
+
const s = (t, a = d().valueOf()) => d(n(a, t ?? o)), y = (t, a) => {
|
|
4
|
+
const e = s(t, a);
|
|
5
|
+
return [e.startOf("day"), e.endOf("day")];
|
|
6
|
+
}, l = (t, a) => {
|
|
7
|
+
const e = s(t, a);
|
|
8
|
+
return [
|
|
9
|
+
e.startOf("day").subtract(1, "day").startOf("day"),
|
|
10
|
+
e.endOf("day").subtract(1, "day").endOf("day")
|
|
11
|
+
];
|
|
12
|
+
}, O = (t, a) => {
|
|
13
|
+
const e = s(t, a);
|
|
14
|
+
return [
|
|
15
|
+
e.startOf("week").startOf("day"),
|
|
16
|
+
e.endOf("week").endOf("day")
|
|
17
|
+
];
|
|
18
|
+
}, m = (t, a) => {
|
|
19
|
+
const e = s(t, a);
|
|
20
|
+
return [
|
|
21
|
+
e.subtract(1, "week").startOf("week").startOf("day"),
|
|
22
|
+
e.subtract(1, "week").endOf("week").endOf("day")
|
|
23
|
+
];
|
|
24
|
+
}, u = (t, a) => {
|
|
25
|
+
const e = s(t, a);
|
|
26
|
+
return [
|
|
27
|
+
e.startOf("month").startOf("day"),
|
|
28
|
+
e.endOf("month").endOf("day")
|
|
29
|
+
];
|
|
30
|
+
}, c = (t, a) => {
|
|
31
|
+
const e = s(t, a);
|
|
32
|
+
return [
|
|
33
|
+
e.subtract(1, "month").startOf("month").startOf("day"),
|
|
34
|
+
e.subtract(1, "month").endOf("month").endOf("day")
|
|
35
|
+
];
|
|
36
|
+
}, b = (t, a) => {
|
|
37
|
+
const e = s(t, a);
|
|
38
|
+
return [
|
|
39
|
+
e.startOf("year").startOf("day"),
|
|
40
|
+
e.endOf("year").endOf("day")
|
|
41
|
+
];
|
|
42
|
+
}, T = (t, a) => {
|
|
43
|
+
const e = s(t, a);
|
|
44
|
+
return [
|
|
45
|
+
e.subtract(1, "year").startOf("year").startOf("day"),
|
|
46
|
+
e.subtract(1, "year").endOf("year").endOf("day")
|
|
47
|
+
];
|
|
48
|
+
}, f = (t, a, e) => {
|
|
49
|
+
const r = s(a, e);
|
|
50
|
+
return [
|
|
51
|
+
r.subtract(t - 1, "day").startOf("day"),
|
|
52
|
+
r.endOf("day")
|
|
53
|
+
];
|
|
54
|
+
}, h = (t, a, e) => [
|
|
55
|
+
{
|
|
56
|
+
label: e ? e("ap.field.today") : "今天",
|
|
57
|
+
value: y(t, a)
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: e ? e("ap.field.yesterday") : "昨天",
|
|
61
|
+
value: l(t, a)
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
label: e ? e("ap.field.thisWeek") : "本周",
|
|
65
|
+
value: O(t, a)
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: e ? e("ap.field.lastWeek") : "上周",
|
|
69
|
+
value: m(t, a)
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: e ? e("ap.field.thisMonth") : "本月",
|
|
73
|
+
value: u(t, a)
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: e ? e("ap.field.lastMonth") : "上月",
|
|
77
|
+
value: c(t, a)
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
label: e ? e("ap.field.lastXDays", { day: 7 }) : "近7天",
|
|
81
|
+
value: f(7, t, a)
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: e ? e("ap.field.lastXDays", { day: 30 }) : "近30天",
|
|
85
|
+
value: f(30, t, a)
|
|
86
|
+
}
|
|
94
87
|
];
|
|
95
88
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
89
|
+
h as presetsDefault,
|
|
90
|
+
c as presetsGetLastMonth,
|
|
91
|
+
m as presetsGetLastWeek,
|
|
99
92
|
f as presetsGetLastXDays,
|
|
100
|
-
|
|
101
|
-
|
|
93
|
+
T as presetsGetLastYear,
|
|
94
|
+
u as presetsGetThisMonth,
|
|
102
95
|
O as presetsGetThisWeek,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
96
|
+
b as presetsGetThisYear,
|
|
97
|
+
s as presetsGetTimezoneFormat,
|
|
98
|
+
y as presetsGetToday,
|
|
99
|
+
l as presetsGetYesterday
|
|
107
100
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../date/constant.js");require("../../hooks/index.js");const u=require("lodash-unified"),d=require("dayjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../date/constant.js");require("../../hooks/index.js");const u=require("lodash-unified"),d=require("dayjs"),h=require("@aplus-frontend/antdv"),q=require("../date/helper.js"),E=require("@ant-design/icons-vue"),I=require("../../utils/index.js"),D=require("@aplus-frontend/utils"),U=require("../hooks/use-default-placeholder.js"),j=require("../hooks/use-default-presets.js"),H=require("../hooks/use-date-timezone.js"),K=require("../../hooks/useControllableValue.js"),L=e.defineComponent({__name:"index",props:{mode:{default:"edit"},class:{},style:{},id:{},defaultPickerValue:{},placeholder:{},disabled:{type:[Boolean,Array],default:void 0},disabledTime:{},ranges:{},separator:{type:[Object,String,Number,Boolean,null,Array],default:void 0},allowEmpty:{},onCalendarChange:{},onFocus:{},onBlur:{},onMousedown:{},onMouseup:{},onMouseenter:{},onMouseleave:{},onClick:{},direction:{},autocomplete:{},activePickerIndex:{},dateRender:{},panelRender:{},dropdownClassName:{},dropdownAlign:{},popupStyle:{},transitionName:{},allowClear:{type:Boolean,default:!0},autofocus:{type:Boolean,default:void 0},tabindex:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},inputReadOnly:{type:Boolean,default:void 0},suffixIcon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},clearIcon:{type:[Object,String,Number,Boolean,null,Array],default:void 0},getPopupContainer:{},inputRender:{},onOpenChange:{},onContextmenu:{},onKeydown:{},role:{},name:{},picker:{},prefixCls:{},disabledDate:{},monthCellRender:{},locale:{},size:{},bordered:{type:Boolean,default:void 0},showTime:{type:Boolean,default:void 0},showNow:{type:Boolean,default:void 0},order:{type:Boolean,default:void 0},defaultOpenValue:{},showHour:{type:Boolean,default:void 0},showMinute:{type:Boolean,default:void 0},showSecond:{type:Boolean,default:void 0},use12Hours:{type:Boolean,default:void 0},hourStep:{},minuteStep:{},secondStep:{},hideDisabledOptions:{type:Boolean,default:void 0},disabledHours:{},disabledMinutes:{},disabledSeconds:{},valueFormat:{},emptyText:{default:"--"},value:{},defaultValue:{},onChange:{},onOk:{},format:{default:"Y-D"},timezone:{},readModeSeparator:{},presets:{type:[Array,Boolean]}},emits:["update:value"],setup(T,{emit:P}){const t=T,O=P,k=e.useSlots(),s=e.computed(()=>v.ApFieldDatePresetFormats.indexOf(t.format)>-1),c=e.computed(()=>s.value?v.PRESET_FORMAT_MAP[t.format]:t.format),{value:y,updateValue:S}=K.useControllableValue(t,O),M=U.useDefaultPlaceholder("DateRange",t),{currentTimezone:i}=H.useDateTimezone(t),{presets:b,changeCurrentDate:w}=j.useDefaultPresets({...t,timezone:i}),f=(n,a,r=!0)=>q.formatDayWithTimezone(i.value)(n,a,r),g=e.computed(()=>{var l,o;const n=e.unref(y);if(u.isNil(n)||!(n!=null&&n.length))return n;const a=i.value?D.getTimeFormatToZone(e.unref(y)[0],i.value):(l=e.unref(y))==null?void 0:l[0],r=t.timezone?D.getTimeFormatToZone(e.unref(y)[1],i.value):(o=e.unref(y))==null?void 0:o[1];return[d(a),d(r)]}),F=e.computed(()=>e.unref(s)?t.picker??v.PRESET_FORMAT_PICK_MAP[t.format]:t.picker),A=e.computed(()=>{const n=e.unref(s)?v.PRESET_FORMAT_TIME_MAP[t.format]:{};return{...I.omitUndefined(u.omit(t,["value","onUpdate:value","onChange","onOk","format","mode","presets"])),placeholder:e.unref(M),presets:e.unref(b),...n}});function N(n){if(!n){S(n);return}let a=u.isString(n[0])?d(n[0]):n[0],r=u.isString(n[1])?d(n[1]):n[1];const l=e.unref(s)?e.unref(c):void 0;S([f(a,l),f(r,l,!1)])}function R(n){var m;const a=u.isString(n[0])?d(n[0]):n[0],r=u.isString(n[1])?d(n[1]):n[1],l=e.unref(s)?e.unref(c):void 0,o=n[0]?f(a,l):null,p=n[1]?f(r,l,!1):null;(m=t.onOk)==null||m.call(t,[o,p])}function _(n){var a;n&&w(),(a=t.onOpenChange)==null||a.call(t,n)}function x(n,a){var B,C;if(u.isNil(n)){(B=t.onChange)==null||B.call(t,n,a);return}const r=u.isString(n[0])?d(n[0]):n[0],l=u.isString(n[1])?d(n[1]):n[1],o=e.unref(s)?e.unref(c):void 0,p=n[0]?f(r,o):null,m=n[1]?f(l,o,!1):null;(C=t.onChange)==null||C.call(t,[p,m],a)}const V=e.computed(()=>{var r;const n=t.readModeSeparator;if(n)return e.isVNode(n)||u.isFunction(n)?t.readModeSeparator:e.createVNode(e.Fragment,null,[t.readModeSeparator]);const a=(r=k.readModeSeparator)==null?void 0:r.call(k);return a?e.createVNode(e.Fragment,null,[a]):E.SwapRightOutlined});return(n,a)=>{var r,l;return n.mode==="read"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString((r=g.value[0])==null?void 0:r.format(c.value))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.value))),e.createTextVNode(" "+e.toDisplayString((l=g.value[1])==null?void 0:l.format(c.value)),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(n.emptyText),1)],64))],64)):(e.openBlock(),e.createBlock(e.unref(h.InputGroup),{key:1,compact:"",style:e.normalizeStyle({display:Array.isArray(t.timezone)&&t.timezone.length?"flex":"block"})},{default:e.withCtx(()=>[Array.isArray(t.timezone)&&t.timezone.length?(e.openBlock(),e.createBlock(e.unref(h.Select),{key:0,value:e.unref(i),"onUpdate:value":a[0]||(a[0]=o=>e.isRef(i)?i.value=o:null),"default-active-first-option":"","dropdown-match-select-width":!1},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timezone,o=>(e.openBlock(),e.createBlock(e.unref(h.SelectOption),{key:o==null?void 0:o.value,value:o==null?void 0:o.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((o==null?void 0:o.label)??(o==null?void 0:o.value)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])):e.createCommentVNode("",!0),e.createVNode(e.unref(h.DatePicker).RangePicker,e.mergeProps(A.value,{value:g.value,picker:F.value,format:c.value,"onUpdate:value":N,onChange:x,onOk:R,onOpenChange:_}),e.createSlots({_:2},[e.renderList(e.unref(u.omit)(n.$slots,"readModeSeparator"),(o,p)=>({name:p,fn:e.withCtx(m=>[e.renderSlot(n.$slots,p,e.normalizeProps(e.guardReactiveProps(m||{})))])}))]),1040,["value","picker","format"])]),_:3},8,["style"]))}}});exports.default=L;
|
|
@@ -6,7 +6,10 @@ import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
|
|
|
6
6
|
export declare const useDefaultPresets: (props: BasicApFieldProps<{
|
|
7
7
|
presets?: ApFieldDateRangeProps["presets"];
|
|
8
8
|
timezone?: Ref<ZoneAlias | undefined>;
|
|
9
|
-
}>) =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
}>) => {
|
|
10
|
+
presets: ComputedRef<{
|
|
11
|
+
label: VueNode;
|
|
12
|
+
value: Dayjs[];
|
|
13
|
+
}[] | undefined>;
|
|
14
|
+
changeCurrentDate: () => void;
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),v=require("../../utils/data-range-persets.js"),c=require("dayjs");require("../../config-provider/index.js");const D=require("../../config-provider/hooks/use-locale.js"),d=e=>{const r=s.ref(c().valueOf()),{t:i}=D.useLocale();return{presets:s.computed(()=>{var a,t,l;return e.presets===!0?v.presetsDefault((a=e==null?void 0:e.timezone)==null?void 0:a.value,r.value,i):(l=(t=e==null?void 0:e.presets)==null?void 0:t.map)==null?void 0:l.call(t,u=>{var n;return{label:u.label,value:(n=u==null?void 0:u.value)==null?void 0:n.filter(f=>f!==null)}})}),changeCurrentDate:()=>{r.value=c().valueOf()}}};exports.useDefaultPresets=d;
|
|
@@ -10,6 +10,7 @@ declare function __VLS_template(): {
|
|
|
10
10
|
attrs: Partial<{}>;
|
|
11
11
|
slots: Readonly<ApLadderSlots> & ApLadderSlots;
|
|
12
12
|
refs: {
|
|
13
|
+
wrapperRef: HTMLDivElement;
|
|
13
14
|
valueRefs: HTMLSpanElement;
|
|
14
15
|
};
|
|
15
16
|
rootEl: HTMLDivElement;
|
|
@@ -95,6 +96,7 @@ declare const __VLS_component: DefineComponent<ApLadderProps, {}, {}, {}, {}, Co
|
|
|
95
96
|
tooltipLabelStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
96
97
|
tooltipValueStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
97
98
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
99
|
+
wrapperRef: HTMLDivElement;
|
|
98
100
|
valueRefs: HTMLSpanElement;
|
|
99
101
|
}, HTMLDivElement>;
|
|
100
102
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const v=require("./interface.js");require("./HelpMessageIcon.vue.js");const u=require("./useWatchEllipsis.js"),N=require("../../config-provider/hooks/use-namespace.js"),D=require("../../config-provider/hooks/use-global-config.js"),m=require("./HelpMessageIcon.vue2.js"),P={key:1},w={key:0},A={key:1},M={key:0},O=["onClick"],L={key:0},T={key:1},$=e.defineComponent({name:"ApLadder",__name:"ApLadder",props:{major:{default:""},minor:{default:""},majorColor:{default:""},majorStyles:{type:[Boolean,null,String,Object,Array],default:void 0},minorColor:{default:""},minorStyles:{type:[Boolean,null,String,Object,Array],default:void 0},layout:{default:"vertical"},tooltip:{type:Boolean,default:!0},labelValues:{default:()=>[]},labelAlign:{default:"right"},labelStyles:{type:[Boolean,null,String,Object,Array],default:void 0},valueStyles:{type:[Boolean,null,String,Object,Array],default:void 0},linkStyles:{type:[Boolean,null,String,Object,Array],default:void 0},unitStyles:{type:[Boolean,null,String,Object,Array],default:void 0},tooltipProps:{default:()=>({title:void 0,align:{},arrowPointAtCenter:!1,arrow:!0,autoAdjustOverflow:!0,color:"",destroyTooltipOnHide:!1,getPopupContainer:()=>document.body,mouseEnterDelay:.1,mouseLeaveDelay:.1,overlayClassName:"",overlayStyle:{},overlayInnerStyle:{},placement:"top",trigger:"hover"})},tooltipLabelStyles:{type:[Boolean,null,String,Object,Array],default:void 0},tooltipValueStyles:{type:[Boolean,null,String,Object,Array],default:void 0}},setup(g){const y=e.useSlots(),o=g,{b:C,e:r,m:b}=N.useNamespace("ap-ladder"),h=D.useGlobalConfig("uiMode","aplus"),s=e.ref([]),d=e.ref(),E=u.useWatchEllipsis(d);function V(l){var i;const n=(i=s.value)==null?void 0:i[l];return n?getComputedStyle(n).color:void 0}const _=e.computed(()=>o.labelValues.length===0),z=e.computed(()=>o.labelValues.length>0),f=e.computed(()=>o.majorColor?{color:`${o.majorColor}`}:{}),k=e.computed(()=>o.minorColor?{color:`${o.minorColor}`}:{}),p=l=>l==null||typeof l=="string"&&l.trim()==="",a=(l,n={})=>{const t={rawValue:n.rawValue,precision:n.precision===void 0?2:n.precision,thousand:n.thousand,thousandSeparator:n.thousandSeparator||",",currency:n.currency,percent:n.percent};if(l===null||typeof l=="object"||typeof l=="function"||typeof l>"u")return"--";if(typeof l=="boolean")return l;if(p(l))return"--";if(t.rawValue)return l;if(typeof l=="number"){if(t.percent)return`${l.toFixed(t.precision)}%`;if(t.currency)return l.toLocaleString(v.locales[t.currency],{style:"currency",currency:t.currency});if(t.thousand){const[i,S]=l.toFixed(t.precision).split(".");return`${i.replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${t.thousandSeparator}`)}.${S}`}return l.toFixed(t.precision)}return l},B=e.computed(()=>y.title?!0:o.tooltip&&e.unref(E)),j=l=>{l.link&&window.open(l.link,"_blank"),typeof l.handleClickLink=="function"&&l.handleClickLink()};return(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapperRef",ref:d,class:e.normalizeClass([e.unref(C)(),`${e.unref(b)(e.unref(h))}`])},[_.value?(e.openBlock(),e.createBlock(e.unref(c.Tooltip),e.normalizeProps(e.mergeProps({key:0},{...o.tooltipProps})),e.createSlots({default:e.withCtx(()=>[!p(l.major)||!p(l.minor)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.layout==="vertical"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(r)("major"),e.unref(r)("ellipsis"),e.unref(u.ellipsisElementCls)]),style:e.normalizeStyle([l.majorStyles,f.value])},e.toDisplayString(a(l.major)),7),e.createElementVNode("div",{class:e.normalizeClass([e.unref(r)("minor"),e.unref(r)("ellipsis"),e.unref(u.ellipsisElementCls)]),style:e.normalizeStyle([l.minorStyles,k.value])},e.toDisplayString(a(l.minor)),7)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(r)("ellipsis"),e.unref(u.ellipsisElementCls)])},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(r)("major")]),style:e.normalizeStyle([l.majorStyles,f.value])},e.toDisplayString(a(l.major)),7),e.createElementVNode("span",{class:e.normalizeClass([e.unref(r)("minor")]),style:e.normalizeStyle([l.minorStyles,k.value])},e.toDisplayString(a(l.minor)),7)],2))],64)):(e.openBlock(),e.createElementBlock("div",P,e.toDisplayString("--")))]),_:2},[B.value?{name:"title",fn:e.withCtx(()=>[y.title?e.renderSlot(l.$slots,"title",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.tooltipProps.title?(e.openBlock(),e.createElementBlock("div",w,e.toDisplayString(o.tooltipProps.title),1)):(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("div",null,e.toDisplayString(a(l.major)),1),e.createElementVNode("div",null,e.toDisplayString(a(l.minor)),1)]))],64))]),key:"0"}:void 0]),1040)):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(e.unref(c.Tooltip),e.normalizeProps(e.mergeProps({key:1},{...o.tooltipProps})),e.createSlots({default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.labelValues,(t,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:e.normalizeClass([e.unref(r)("cross-bar")])},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(r)("ellipsis"),e.unref(u.ellipsisElementCls)]),style:e.normalizeStyle({color:V(i)})},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(r)("label")),style:e.normalizeStyle([l.labelStyles,t.labelStyles,t.labelColor?{color:t.labelColor}:void 0,{textAlign:t.labelAlign||l.labelAlign}])},[e.createTextVNode(e.toDisplayString(t.label),1),t.label?(e.openBlock(),e.createElementBlock("span",M,":")):e.createCommentVNode("",!0)],6),e.isVNode(t.value)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),{key:0,ref_for:!0,ref_key:"valueRefs",ref:s,style:{display:"inline-block"}},null,512)):typeof t.value=="function"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value()),{key:1,ref_for:!0,ref_key:"valueRefs",ref:s,style:{display:"inline-block"}},null,512)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[p(t.link)?(e.openBlock(),e.createElementBlock("span",{key:1,ref_for:!0,ref_key:"valueRefs",ref:s,class:e.normalizeClass(e.unref(r)("value")),style:e.normalizeStyle([l.valueStyles,t.valueStyles,t.valueColor?{color:t.valueColor}:void 0])},e.toDisplayString(a(t.value,{...t})),7)):(e.openBlock(),e.createElementBlock("span",{key:0,ref_for:!0,ref_key:"valueRefs",ref:s,class:e.normalizeClass(e.unref(r)("link")),style:e.normalizeStyle([l.linkStyles,t.linkStyles,t.linkColor?{color:t.linkColor}:void 0]),onClick:S=>j(t)},e.toDisplayString(a(t.value,{...t})),15,O))],64)),t.unit?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(r)("unit")),style:e.normalizeStyle([l.unitStyles,t.unitStyles,t.unitColor?{color:t.unitColor}:void 0])},e.toDisplayString(t.unit),7)):e.createCommentVNode("",!0)],6),t.helpMessage?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(r)("help-message")])},[e.isVNode(t.helpMessage)?(e.openBlock(),e.createBlock(e.unref(c.Tooltip),e.mergeProps({key:0,ref_for:!0},{...t.helpMessageTooltipProps}),{title:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.helpMessage)))]),default:e.withCtx(()=>[e.createVNode(m.default,{lv:t},null,8,["lv"])]),_:2},1040)):typeof t.helpMessage=="function"?(e.openBlock(),e.createBlock(e.unref(c.Tooltip),e.mergeProps({key:1,ref_for:!0},{...t.helpMessageTooltipProps}),{title:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.helpMessage())))]),default:e.withCtx(()=>[e.createVNode(m.default,{lv:t},null,8,["lv"])]),_:2},1040)):(e.openBlock(),e.createBlock(e.unref(c.Tooltip),e.mergeProps({key:2,ref_for:!0},{...t.helpMessageTooltipProps},{placement:"bottom",title:t.helpMessage}),{default:e.withCtx(()=>[e.createVNode(m.default,{lv:t},null,8,["lv"])]),_:2},1040,["title"]))],2)):e.createCommentVNode("",!0)],2))),128))]),_:2},[B.value?{name:"title",fn:e.withCtx(()=>[y.title?e.renderSlot(l.$slots,"title",{key:0}):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[o.tooltipProps.title?(e.openBlock(),e.createElementBlock("div",L,e.toDisplayString(o.tooltipProps.title),1)):(e.openBlock(),e.createElementBlock("div",T,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.labelValues,(t,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,style:{"word-break":"break-all"}},[t.label?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle([l.tooltipLabelStyles,t.tooltipLabelStyles])},e.toDisplayString(t.label)+":",5)):e.createCommentVNode("",!0),e.isVNode(t.value)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),{key:1,style:{display:"inline-block"}})):typeof t.value=="function"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value()),{key:2,style:{display:"inline-block"}})):(e.openBlock(),e.createElementBlock("span",{key:3,style:e.normalizeStyle([l.tooltipValueStyles,t.tooltipValueStyles])},e.toDisplayString(a(t.value,{...t})),5))]))),128))]))],64))]),key:"0"}:void 0]),1040)):e.createCommentVNode("",!0)],2))}});exports.default=$;
|
|
@@ -88,6 +88,7 @@ declare const ApLadder: {
|
|
|
88
88
|
tooltipLabelStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
89
89
|
tooltipValueStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
90
90
|
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
91
|
+
wrapperRef: HTMLDivElement;
|
|
91
92
|
valueRefs: HTMLSpanElement;
|
|
92
93
|
}, HTMLDivElement, ComponentProvideOptions, {
|
|
93
94
|
P: {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@vueuse/core"),c=require("vue"),l=new WeakMap;let r;const n="ap-ladder-is-ellipsised";function a(i){const t=i.querySelectorAll(`.${n}`);let e=!1;return t.forEach(s=>{s.clientWidth<s.scrollWidth&&(e=!0)}),e}o.isClient&&(r=new ResizeObserver(i=>{for(const t of i){const e=t.target;if(l.has(e)){const s=a(e);l.get(e).value=s}}}));const u=i=>{const t=c.ref(!1);return c.watch(()=>i.value,(e,s)=>{e&&r.observe(e),s&&r.unobserve(s),e&&l.set(e,t),s&&l.delete(s),e&&(t.value=a(e))},{flush:"post",immediate:!0}),t};exports.ellipsisElementCls=n;exports.useWatchEllipsis=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),a=require("lodash-unified");require("../../locale/index.js");const d=require("../../locale/lang/zh-cn.js"),o=e=>(t,n)=>c(t,n,r.unref(e)),c=(e,t,n)=>a.get(n,e,e).replace(/\{(\w+)\}/g,(f,u)=>`${(t==null?void 0:t[u])??`{${u}}`}`),l=e=>{const t=r.computed(()=>r.unref(e).name),n=r.isRef(e)?e:r.ref(e);return{lang:t,locale:n,t:o(e)}},s=Symbol("localeContextKey"),i=e=>{const t=e||r.inject(s,r.ref());return l(r.computed(()=>(t==null?void 0:t.value)||d.default))};exports.buildLocaleContext=l;exports.buildTranslator=o;exports.localeContextKey=s;exports.translate=c;exports.useLocale=i;
|
|
@@ -17,7 +17,7 @@ declare function __VLS_template(): {
|
|
|
17
17
|
};
|
|
18
18
|
refs: {
|
|
19
19
|
target: unknown;
|
|
20
|
-
|
|
20
|
+
portalRootRef: HTMLDivElement;
|
|
21
21
|
};
|
|
22
22
|
rootEl: any;
|
|
23
23
|
};
|
|
@@ -32,7 +32,7 @@ declare const __VLS_component: DefineComponent<FullScreenProps, {
|
|
|
32
32
|
toggle: typeof toggle;
|
|
33
33
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<FullScreenProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
34
34
|
target: unknown;
|
|
35
|
-
|
|
35
|
+
portalRootRef: HTMLDivElement;
|
|
36
36
|
}, any>;
|
|
37
37
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
38
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../hooks/index.js");require("../portal/index.js");require("../config-provider/index.js");const b=require("@vueuse/core"),y=require("../hooks/useFullScreen.js"),g=require("../config-provider/hooks/use-namespace.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../hooks/index.js");require("../portal/index.js");require("../config-provider/index.js");const b=require("@vueuse/core"),y=require("../hooks/useFullScreen.js"),g=require("../config-provider/hooks/use-namespace.js"),k=require("../portal/index.vue.js"),q=e.defineComponent({name:"FullScreen",__name:"index",props:{wrapperElementName:{default:"div"},zIndex:{default:2147483647}},setup(x,{expose:f}){const{target:s,full:d,enter:p,exit:v}=y.useFullScreen(),{b:w,bm:m,be:_}=g.useNamespace("full-screen"),t=e.ref(!1),l=e.ref(),i=b.useScrollLock(document.body),n=e.ref();e.watch(()=>e.unref(d),r=>{r||(t.value=!1,l.value=void 0)});async function u(r,a=!1){await o(),t.value=!0,l.value=r,r==="browser"?p(a):i.value=!0}async function o(r=!1){t.value=!1,l.value==="browser"?await v(r):i.value=!1,l.value=void 0}async function c(r,a=!1){t.value?l.value!==r?await u(r,a):await o(a):await u(r,a)}return f({target:e.computed(()=>e.unref(s)),portalRoot:e.computed(()=>e.unref(n)),full:e.computed(()=>e.unref(t)),mode:e.computed(()=>e.unref(l)),enter:u,exit:o,toggle:c}),(r,a)=>(e.openBlock(),e.createBlock(e.unref(k.default),{to:"body",disabled:l.value!=="window"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.wrapperElementName),e.mergeProps({ref_key:"target",ref:s},r.$attrs,{class:[e.unref(w)("wrapper"),t.value&&l.value==="window"?e.unref(m)("wrapper","full"):null],style:{zIndex:t.value&&l.value==="window"?r.zIndex:"unset"}}),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{full:t.value,enter:u,exit:o,toggle:c,mode:l.value,portalRoot:n.value}),e.createElementVNode("div",{ref_key:"portalRootRef",ref:n,class:e.normalizeClass(e.unref(_)("wrapper","portal-root"))},null,2)]),_:3},16,["class","style"]))]),_:3},8,["disabled"]))}});exports.default=q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),s=new WeakMap,a=new Set;document.addEventListener("fullscreenchange",()=>{if(a.forEach(e=>e.value=!1),document.fullscreenElement){const e=s.get(document.fullscreenElement);e&&(e.value=!0)}});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@vueuse/core"),n=require("vue"),s=new WeakMap,a=new Set;i.isClient&&document.addEventListener("fullscreenchange",()=>{if(a.forEach(e=>e.value=!1),document.fullscreenElement){const e=s.get(document.fullscreenElement);e&&(e.value=!0)}});const m=(e=n.ref(null))=>{const f=n.computed({get:()=>n.unref(e),set:t=>{n.isRef(e)&&(e.value=t)}}),l=n.ref(!1);a.add(l),n.watch(()=>e.value,(t,u)=>{t&&s.set(t,l),u&&s.delete(u)},{immediate:!0,flush:"post"});async function c(t=!1){await r();const u=n.unref(e);return u&&(t||!document.fullscreenElement)?(await u.requestFullscreen(),l.value=!0,!0):!1}async function r(t=!1){const u=n.unref(e);return t||u&&document.fullscreenElement===u?(await document.exitFullscreen(),l.value=!1,!0):!1}async function o(t=!1){return await(n.unref(l)?r(t):c(t))}return{target:f,full:n.computed(()=>n.unref(l)),enter:c,exit:r,toggle:o}};exports.useFullScreen=m;
|
|
@@ -5,82 +5,65 @@ type Timezone = LiteralUnion<ZoneAlias, string>;
|
|
|
5
5
|
/**
|
|
6
6
|
* 指定时区格式化
|
|
7
7
|
* @param {Timezone} [timezone] - 时区
|
|
8
|
+
* @param {number} [currentDate] - 当前时间
|
|
8
9
|
*/
|
|
9
|
-
export declare const presetsGetTimezoneFormat: (timezone?: Timezone) => dayjs.Dayjs;
|
|
10
|
+
export declare const presetsGetTimezoneFormat: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs;
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
+
* 根据时区获取今天
|
|
12
13
|
* @param {Timezone} [timezone] - 时区
|
|
14
|
+
* @param {number} [currentDate] - 当前时间
|
|
13
15
|
*/
|
|
14
|
-
export declare const presetsGetToday: (timezone?: Timezone) =>
|
|
15
|
-
label: string;
|
|
16
|
-
value: dayjs.Dayjs[];
|
|
17
|
-
};
|
|
16
|
+
export declare const presetsGetToday: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
18
|
+
* 根据时区获取昨天
|
|
20
19
|
* @param {Timezone} [timezone] - 时区
|
|
20
|
+
* @param {number} [currentDate] - 当前时间
|
|
21
21
|
*/
|
|
22
|
-
export declare const presetsGetYesterday: (timezone?: Timezone) =>
|
|
23
|
-
label: string;
|
|
24
|
-
value: dayjs.Dayjs[];
|
|
25
|
-
};
|
|
22
|
+
export declare const presetsGetYesterday: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
26
23
|
/**
|
|
27
24
|
* 根据时区获取本周
|
|
28
25
|
* @param {Timezone} [timezone] - 时区
|
|
26
|
+
* @param {number} [currentDate] - 当前时间
|
|
29
27
|
*/
|
|
30
|
-
export declare const presetsGetThisWeek: (timezone?: Timezone) =>
|
|
31
|
-
label: string;
|
|
32
|
-
value: dayjs.Dayjs[];
|
|
33
|
-
};
|
|
28
|
+
export declare const presetsGetThisWeek: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
34
29
|
/**
|
|
35
30
|
* 根据时区获取上周
|
|
36
31
|
* @param {Timezone} [timezone] - 时区
|
|
32
|
+
* @param {number} [currentDate] - 当前时间
|
|
37
33
|
*/
|
|
38
|
-
export declare const presetsGetLastWeek: (timezone?: Timezone) =>
|
|
39
|
-
label: string;
|
|
40
|
-
value: dayjs.Dayjs[];
|
|
41
|
-
};
|
|
34
|
+
export declare const presetsGetLastWeek: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
42
35
|
/**
|
|
43
36
|
* 根据时区获取本月
|
|
44
37
|
* @param {Timezone} [timezone] - 时区
|
|
38
|
+
* @param {number} [currentDate] - 当前时间
|
|
45
39
|
*/
|
|
46
|
-
export declare const presetsGetThisMonth: (timezone?: Timezone) =>
|
|
47
|
-
label: string;
|
|
48
|
-
value: dayjs.Dayjs[];
|
|
49
|
-
};
|
|
40
|
+
export declare const presetsGetThisMonth: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
50
41
|
/**
|
|
51
42
|
* 根据时区获取上月
|
|
52
43
|
* @param {Timezone} [timezone] - 时区
|
|
44
|
+
* @param {number} [currentDate] - 当前时间
|
|
53
45
|
*/
|
|
54
|
-
export declare const presetsGetLastMonth: (timezone?: Timezone) =>
|
|
55
|
-
label: string;
|
|
56
|
-
value: dayjs.Dayjs[];
|
|
57
|
-
};
|
|
46
|
+
export declare const presetsGetLastMonth: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
58
47
|
/**
|
|
59
48
|
* 根据时区获取今年
|
|
60
49
|
* @param {Timezone} [timezone] - 时区
|
|
50
|
+
* @param {number} [currentDate] - 当前时间
|
|
61
51
|
*/
|
|
62
|
-
export declare const presetsGetThisYear: (timezone?: Timezone) =>
|
|
63
|
-
label: string;
|
|
64
|
-
value: dayjs.Dayjs[];
|
|
65
|
-
};
|
|
52
|
+
export declare const presetsGetThisYear: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
66
53
|
/**
|
|
67
54
|
* 根据时区获取去年
|
|
68
55
|
* @param {Timezone} [timezone] - 时区
|
|
56
|
+
* @param {number} [currentDate] - 当前时间
|
|
69
57
|
*/
|
|
70
|
-
export declare const presetsGetLastYear: (timezone?: Timezone) =>
|
|
71
|
-
label: string;
|
|
72
|
-
value: dayjs.Dayjs[];
|
|
73
|
-
};
|
|
58
|
+
export declare const presetsGetLastYear: (timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
74
59
|
/**
|
|
75
60
|
* 根据时区获取近x天
|
|
76
61
|
* @param {number} day - 天数
|
|
77
62
|
* @param {Timezone} [timezone] - 时区
|
|
63
|
+
* @param {number} [currentDate] - 当前时间
|
|
78
64
|
*/
|
|
79
|
-
export declare const presetsGetLastXDays: (day: number, timezone?: Timezone) =>
|
|
80
|
-
|
|
81
|
-
value: dayjs.Dayjs[];
|
|
82
|
-
};
|
|
83
|
-
export declare const presetsDefault: (timezone?: Timezone) => {
|
|
65
|
+
export declare const presetsGetLastXDays: (day: number, timezone?: Timezone, currentDate?: number) => dayjs.Dayjs[];
|
|
66
|
+
export declare const presetsDefault: (timezone?: Timezone, currentDate?: number, t?: (path: string, option?: any) => string) => {
|
|
84
67
|
label: string;
|
|
85
68
|
value: dayjs.Dayjs[];
|
|
86
69
|
}[];
|