@aplus-frontend/ui 0.4.6 → 0.4.8
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 +46 -42
- package/es/src/ap-field/hooks/use-default-presets.d.ts +11 -0
- package/es/src/ap-field/hooks/use-default-presets.mjs +15 -0
- package/es/src/ap-field/interface.d.ts +2 -1
- package/es/src/ap-field/number/index.vue.d.ts +1 -1
- package/es/src/ap-field/slider/index.vue.d.ts +1 -1
- package/es/src/ap-form/items/number/index.vue.d.ts +8 -8
- package/es/src/ap-table/ap-table.vue2.mjs +87 -85
- package/es/src/ap-table/components/dynamic-component/diff.d.ts +2 -0
- package/es/src/ap-table/components/dynamic-component/index.vue.d.ts +4 -0
- package/es/src/ap-table/components/dynamic-component/index.vue.mjs +4 -0
- package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +14 -0
- package/es/src/ap-table/components/interface.d.ts +3 -0
- package/es/src/ap-table/constants.d.ts +7 -7
- package/es/src/ap-table/utils.d.ts +1551 -1541
- package/es/src/ap-table/utils.mjs +115 -104
- package/es/src/ap-upload/components/Picture.vue2.mjs +59 -55
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +13 -4
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +220 -108
- package/es/src/business/ap-ladder/HelpMessageIcon.vue.d.ts +14 -0
- package/es/src/business/ap-ladder/HelpMessageIcon.vue.mjs +4 -0
- package/es/src/business/ap-ladder/HelpMessageIcon.vue2.mjs +35 -0
- package/es/src/business/ap-ladder/index.d.ts +31 -4
- package/es/src/business/ap-ladder/interface.d.ts +124 -4
- package/es/src/business/ap-size-input/ApSizeInput.d.ts +1 -1
- package/es/src/business/ap-size-input/index.d.ts +3 -3
- package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +33 -25
- package/es/src/business/batch-input-group/form-item.vue.d.ts +0 -1
- package/es/src/business/batch-input-group/form-item.vue.mjs +43 -39
- package/es/src/business/hooks/usePageListApTable.d.ts +2 -2
- package/es/src/locale/lang/en.mjs +10 -1
- package/es/src/locale/lang/zh-cn.mjs +10 -1
- package/es/src/utils/data-range-persets.d.ts +87 -0
- package/es/src/utils/data-range-persets.mjs +107 -0
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/hooks/use-default-presets.d.ts +11 -0
- package/lib/src/ap-field/hooks/use-default-presets.js +1 -0
- package/lib/src/ap-field/interface.d.ts +2 -1
- package/lib/src/ap-field/number/index.vue.d.ts +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +8 -8
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/dynamic-component/diff.d.ts +2 -0
- package/lib/src/ap-table/components/dynamic-component/index.vue.d.ts +4 -0
- package/lib/src/ap-table/components/dynamic-component/index.vue.js +1 -0
- package/lib/src/ap-table/components/dynamic-component/index.vue2.js +1 -0
- package/lib/src/ap-table/components/interface.d.ts +3 -0
- package/lib/src/ap-table/constants.d.ts +7 -7
- package/lib/src/ap-table/utils.d.ts +1551 -1541
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +13 -4
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
- package/lib/src/business/ap-ladder/HelpMessageIcon.vue.d.ts +14 -0
- package/lib/src/business/ap-ladder/HelpMessageIcon.vue.js +1 -0
- package/lib/src/business/ap-ladder/HelpMessageIcon.vue2.js +1 -0
- package/lib/src/business/ap-ladder/index.d.ts +31 -4
- package/lib/src/business/ap-ladder/interface.d.ts +124 -4
- package/lib/src/business/ap-size-input/ApSizeInput.d.ts +1 -1
- package/lib/src/business/ap-size-input/index.d.ts +3 -3
- package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
- package/lib/src/business/batch-input-group/form-item.vue.d.ts +0 -1
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/hooks/usePageListApTable.d.ts +2 -2
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/utils/data-range-persets.d.ts +87 -0
- package/lib/src/utils/data-range-persets.js +1 -0
- package/package.json +2 -2
- package/theme/ap-ladder/ap-ladder.css +10 -1
- package/theme/ap-ladder/ap-ladder.less +10 -1
- package/theme/index.css +10 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ZoneAlias } from '@aplus-frontend/utils';
|
|
2
|
+
import { LiteralUnion } from '@aplus-frontend/utils/src/vue/types';
|
|
3
|
+
import { default as dayjs } from 'dayjs';
|
|
4
|
+
type Timezone = LiteralUnion<ZoneAlias, string>;
|
|
5
|
+
/**
|
|
6
|
+
* 指定时区格式化
|
|
7
|
+
* @param {Timezone} [timezone] - 时区
|
|
8
|
+
*/
|
|
9
|
+
export declare const presetsGetTimezoneFormat: (timezone?: Timezone) => dayjs.Dayjs;
|
|
10
|
+
/**
|
|
11
|
+
* 根据时区获取今日
|
|
12
|
+
* @param {Timezone} [timezone] - 时区
|
|
13
|
+
*/
|
|
14
|
+
export declare const presetsGetToday: (timezone?: Timezone) => {
|
|
15
|
+
label: string;
|
|
16
|
+
value: dayjs.Dayjs[];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 根据时区获取昨日
|
|
20
|
+
* @param {Timezone} [timezone] - 时区
|
|
21
|
+
*/
|
|
22
|
+
export declare const presetsGetYesterday: (timezone?: Timezone) => {
|
|
23
|
+
label: string;
|
|
24
|
+
value: dayjs.Dayjs[];
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 根据时区获取本周
|
|
28
|
+
* @param {Timezone} [timezone] - 时区
|
|
29
|
+
*/
|
|
30
|
+
export declare const presetsGetThisWeek: (timezone?: Timezone) => {
|
|
31
|
+
label: string;
|
|
32
|
+
value: dayjs.Dayjs[];
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* 根据时区获取上周
|
|
36
|
+
* @param {Timezone} [timezone] - 时区
|
|
37
|
+
*/
|
|
38
|
+
export declare const presetsGetLastWeek: (timezone?: Timezone) => {
|
|
39
|
+
label: string;
|
|
40
|
+
value: dayjs.Dayjs[];
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* 根据时区获取本月
|
|
44
|
+
* @param {Timezone} [timezone] - 时区
|
|
45
|
+
*/
|
|
46
|
+
export declare const presetsGetThisMonth: (timezone?: Timezone) => {
|
|
47
|
+
label: string;
|
|
48
|
+
value: dayjs.Dayjs[];
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* 根据时区获取上月
|
|
52
|
+
* @param {Timezone} [timezone] - 时区
|
|
53
|
+
*/
|
|
54
|
+
export declare const presetsGetLastMonth: (timezone?: Timezone) => {
|
|
55
|
+
label: string;
|
|
56
|
+
value: dayjs.Dayjs[];
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* 根据时区获取今年
|
|
60
|
+
* @param {Timezone} [timezone] - 时区
|
|
61
|
+
*/
|
|
62
|
+
export declare const presetsGetThisYear: (timezone?: Timezone) => {
|
|
63
|
+
label: string;
|
|
64
|
+
value: dayjs.Dayjs[];
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* 根据时区获取去年
|
|
68
|
+
* @param {Timezone} [timezone] - 时区
|
|
69
|
+
*/
|
|
70
|
+
export declare const presetsGetLastYear: (timezone?: Timezone) => {
|
|
71
|
+
label: string;
|
|
72
|
+
value: dayjs.Dayjs[];
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* 根据时区获取近x天
|
|
76
|
+
* @param {number} day - 天数
|
|
77
|
+
* @param {Timezone} [timezone] - 时区
|
|
78
|
+
*/
|
|
79
|
+
export declare const presetsGetLastXDays: (day: number, timezone?: Timezone) => {
|
|
80
|
+
label: string;
|
|
81
|
+
value: dayjs.Dayjs[];
|
|
82
|
+
};
|
|
83
|
+
export declare const presetsDefault: (timezone?: Timezone) => {
|
|
84
|
+
label: string;
|
|
85
|
+
value: dayjs.Dayjs[];
|
|
86
|
+
}[];
|
|
87
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@aplus-frontend/utils"),d=require("dayjs");require("../config-provider/index.js");const r=require("../config-provider/hooks/use-locale.js"),a=e=>d(l.getTimeFormatToZone(d().valueOf(),e??l.userTimezone)),f=e=>{const{t:s}=r.useLocale(),t=a(e);return{label:s?s("ap.field.today"):"今天",value:[t.startOf("day"),t.endOf("day")]}},c=e=>{const{t:s}=r.useLocale(),t=a(e);return{label:s?s("ap.field.yesterday"):"昨天",value:[t.startOf("day").subtract(1,"day").startOf("day"),t.endOf("day").subtract(1,"day").endOf("day")]}},u=e=>{const{t:s}=r.useLocale(),t=a(e);return{label:s?s("ap.field.thisWeek"):"本周",value:[t.startOf("week").startOf("day"),t.endOf("week").endOf("day")]}},y=e=>{const{t:s}=r.useLocale(),t=a(e);return{label:s?s("ap.field.lastWeek"):"上周",value:[t.startOf("week").subtract(1,"week").startOf("day"),t.endOf("week").subtract(1,"week").endOf("day")]}},O=e=>{const{t:s}=r.useLocale(),t=a(e);return{label:s?s("ap.field.thisMonth"):"本月",value:[t.startOf("month").startOf("day"),t.endOf("month").endOf("day")]}},i=e=>{const{t:s}=r.useLocale(),t=a(e);return{label:s?s("ap.field.lastMonth"):"上月",value:[t.startOf("month").subtract(1,"month").startOf("day"),t.endOf("month").subtract(1,"month").endOf("day")]}},p=e=>{const{t:s}=r.useLocale(),t=a(e);return{label:s?s("ap.field.thisYear"):"今年",value:[t.startOf("year").startOf("day"),t.endOf("year").endOf("day")]}},m=e=>{const{t:s}=r.useLocale(),t=a(e);return{label:s?s("ap.field.lastYear"):"去年",value:[t.startOf("year").subtract(1,"year").startOf("day"),t.endOf("year").subtract(1,"year").endOf("day")]}},o=(e,s)=>{const{t}=r.useLocale(),n=a(s);return{label:t?t("ap.field.lastXDays",{day:e}):`近${e}天`,value:[n.subtract(e-1,"day").startOf("day"),n.endOf("day")]}},T=e=>[f(e),c(e),u(e),y(e),O(e),i(e),o(7,e),o(30,e)];exports.presetsDefault=T;exports.presetsGetLastMonth=i;exports.presetsGetLastWeek=y;exports.presetsGetLastXDays=o;exports.presetsGetLastYear=m;exports.presetsGetThisMonth=O;exports.presetsGetThisWeek=u;exports.presetsGetThisYear=p;exports.presetsGetTimezoneFormat=a;exports.presetsGetToday=f;exports.presetsGetYesterday=c;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aplus-frontend/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
67
67
|
"vuedraggable": "^4.1.0",
|
|
68
68
|
"@aplus-frontend/hooks": "1.0.7",
|
|
69
|
-
"@aplus-frontend/utils": "1.0.
|
|
69
|
+
"@aplus-frontend/utils": "1.0.47"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@aplus-frontend/antdv": "^1.0.10",
|
|
@@ -6,12 +6,21 @@
|
|
|
6
6
|
/** Aplus端样式 */
|
|
7
7
|
/** Admin端样式 */
|
|
8
8
|
}
|
|
9
|
+
.aplus-ap-ladder__cross-bar {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
}
|
|
9
13
|
.aplus-ap-ladder__ellipsis {
|
|
10
14
|
overflow: hidden;
|
|
11
15
|
text-overflow: ellipsis;
|
|
12
16
|
white-space: nowrap;
|
|
13
17
|
word-break: break-all;
|
|
14
18
|
}
|
|
19
|
+
.aplus-ap-ladder__help-message {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
margin-left: 4px;
|
|
23
|
+
}
|
|
15
24
|
.aplus-ap-ladder__major {
|
|
16
25
|
line-height: 22px;
|
|
17
26
|
color: #182948;
|
|
@@ -21,6 +30,7 @@
|
|
|
21
30
|
color: #8896B0;
|
|
22
31
|
}
|
|
23
32
|
.aplus-ap-ladder__label {
|
|
33
|
+
display: inline-block;
|
|
24
34
|
color: #8896B0;
|
|
25
35
|
word-break: break-all;
|
|
26
36
|
}
|
|
@@ -29,7 +39,6 @@
|
|
|
29
39
|
word-break: break-all;
|
|
30
40
|
}
|
|
31
41
|
.aplus-ap-ladder__unit {
|
|
32
|
-
margin-left: 5px;
|
|
33
42
|
color: #182948;
|
|
34
43
|
}
|
|
35
44
|
.aplus-ap-ladder__link {
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
position: relative;
|
|
7
7
|
width: inherit;
|
|
8
8
|
font-size: 14px;
|
|
9
|
+
&__cross-bar {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
}
|
|
9
13
|
/** 自动溢出省略 */
|
|
10
14
|
&__ellipsis {
|
|
11
15
|
// min-width: 120px;
|
|
@@ -14,6 +18,11 @@
|
|
|
14
18
|
white-space: nowrap;
|
|
15
19
|
word-break: break-all;
|
|
16
20
|
}
|
|
21
|
+
&__help-message {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
margin-left: 4px;
|
|
25
|
+
}
|
|
17
26
|
|
|
18
27
|
/** Aplus端样式 */
|
|
19
28
|
&__major {
|
|
@@ -25,6 +34,7 @@
|
|
|
25
34
|
color: #8896B0;
|
|
26
35
|
}
|
|
27
36
|
&__label {
|
|
37
|
+
display: inline-block;
|
|
28
38
|
color: #8896B0;
|
|
29
39
|
word-break: break-all;
|
|
30
40
|
}
|
|
@@ -33,7 +43,6 @@
|
|
|
33
43
|
word-break: break-all;
|
|
34
44
|
}
|
|
35
45
|
&__unit {
|
|
36
|
-
margin-left: 5px;
|
|
37
46
|
color: #182948;
|
|
38
47
|
}
|
|
39
48
|
&__link {
|
package/theme/index.css
CHANGED
|
@@ -554,12 +554,21 @@
|
|
|
554
554
|
/** Aplus端样式 */
|
|
555
555
|
/** Admin端样式 */
|
|
556
556
|
}
|
|
557
|
+
.aplus-ap-ladder__cross-bar {
|
|
558
|
+
display: flex;
|
|
559
|
+
align-items: center;
|
|
560
|
+
}
|
|
557
561
|
.aplus-ap-ladder__ellipsis {
|
|
558
562
|
overflow: hidden;
|
|
559
563
|
text-overflow: ellipsis;
|
|
560
564
|
white-space: nowrap;
|
|
561
565
|
word-break: break-all;
|
|
562
566
|
}
|
|
567
|
+
.aplus-ap-ladder__help-message {
|
|
568
|
+
display: flex;
|
|
569
|
+
align-items: center;
|
|
570
|
+
margin-left: 4px;
|
|
571
|
+
}
|
|
563
572
|
.aplus-ap-ladder__major {
|
|
564
573
|
line-height: 22px;
|
|
565
574
|
color: #182948;
|
|
@@ -569,6 +578,7 @@
|
|
|
569
578
|
color: #8896B0;
|
|
570
579
|
}
|
|
571
580
|
.aplus-ap-ladder__label {
|
|
581
|
+
display: inline-block;
|
|
572
582
|
color: #8896B0;
|
|
573
583
|
word-break: break-all;
|
|
574
584
|
}
|
|
@@ -577,7 +587,6 @@
|
|
|
577
587
|
word-break: break-all;
|
|
578
588
|
}
|
|
579
589
|
.aplus-ap-ladder__unit {
|
|
580
|
-
margin-left: 5px;
|
|
581
590
|
color: #182948;
|
|
582
591
|
}
|
|
583
592
|
.aplus-ap-ladder__link {
|