cnhis-design-vue 2.1.71 → 2.1.72
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/CHANGELOG.md +489 -395
- package/es/affix/index.js +8 -8
- package/es/age/index.js +10 -10
- package/es/alert/index.js +8 -8
- package/es/anchor/index.js +8 -8
- package/es/auto-complete/index.js +8 -8
- package/es/avatar/index.js +8 -8
- package/es/back-top/index.js +8 -8
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +68 -68
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +22 -22
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/carousel/index.js +8 -8
- package/es/cascader/index.js +8 -8
- package/es/checkbox/index.js +9 -9
- package/es/col/index.js +8 -8
- package/es/collapse/index.js +8 -8
- package/es/color-picker/index.js +1 -1
- package/es/comment/index.js +8 -8
- package/es/config-provider/index.js +8 -8
- package/es/date-picker/index.js +8 -8
- package/es/descriptions/index.js +8 -8
- package/es/divider/index.js +8 -8
- package/es/drag-layout/index.js +3 -3
- package/es/drawer/index.js +8 -8
- package/es/dropdown/index.js +8 -8
- package/es/editor/index.js +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +9 -9
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +66 -66
- package/es/index/index.js +394 -394
- package/es/input/index.js +9 -9
- package/es/input-number/index.js +8 -8
- package/es/layout/index.js +8 -8
- package/es/list/index.js +8 -8
- package/es/locale-provider/index.js +8 -8
- package/es/map/index.js +9 -9
- package/es/mentions/index.js +8 -8
- package/es/menu/index.js +8 -8
- package/es/message/index.js +8 -8
- package/es/multi-chat/index.js +76 -76
- package/es/multi-chat-client/index.js +70 -70
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +14 -14
- package/es/multi-chat-setting/index.js +22 -22
- package/es/multi-chat-sip/index.js +1 -1
- package/es/notification/index.js +8 -8
- package/es/page-header/index.js +8 -8
- package/es/pagination/index.js +8 -8
- package/es/popconfirm/index.js +8 -8
- package/es/popover/index.js +8 -8
- package/es/progress/index.js +8 -8
- package/es/radio/index.js +9 -9
- package/es/rate/index.js +8 -8
- package/es/result/index.js +8 -8
- package/es/row/index.js +8 -8
- package/es/scale-container/index.js +1 -1
- package/es/scale-view/index.js +27 -27
- package/es/select/index.js +12 -12
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +2 -2
- package/es/shortcut-setter/index.js +10 -10
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/space/index.js +8 -8
- package/es/spin/index.js +8 -8
- package/es/statistic/index.js +8 -8
- package/es/steps/index.js +8 -8
- package/es/switch/index.js +8 -8
- package/es/table-filter/index.js +49 -49
- package/es/tabs/index.js +8 -8
- package/es/tag/index.js +9 -9
- package/es/time-picker/index.js +8 -8
- package/es/timeline/index.js +8 -8
- package/es/tooltip/index.js +8 -8
- package/es/transfer/index.js +8 -8
- package/es/tree/index.js +8 -8
- package/es/tree-select/index.js +8 -8
- package/es/upload/index.js +8 -8
- package/es/utils/time-domain.js +30 -0
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +347 -317
- package/lib/cui.umd.js +347 -317
- package/lib/cui.umd.min.js +5 -5
- package/package.json +1 -1
- package/src/utils/time-domain.js +59 -3
package/package.json
CHANGED
package/src/utils/time-domain.js
CHANGED
|
@@ -60,6 +60,62 @@ const timeDomain = {
|
|
|
60
60
|
return [start, end];
|
|
61
61
|
},
|
|
62
62
|
|
|
63
|
+
LAST_YEAR() {
|
|
64
|
+
const start = moment()
|
|
65
|
+
.add(-1, 'y')
|
|
66
|
+
.startOf('year');
|
|
67
|
+
const end = moment()
|
|
68
|
+
.add(-1, 'y')
|
|
69
|
+
.endOf('year');
|
|
70
|
+
return [start, end];
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
LAST_MONTH() {
|
|
74
|
+
const start = moment()
|
|
75
|
+
.add(-1, 'M')
|
|
76
|
+
.startOf('month');
|
|
77
|
+
const end = moment()
|
|
78
|
+
.add(-1, 'M')
|
|
79
|
+
.endOf('month');
|
|
80
|
+
return [start, end];
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
LAST_WEEK() {
|
|
84
|
+
const start = moment()
|
|
85
|
+
.add(-1, 'w')
|
|
86
|
+
.startOf('week');
|
|
87
|
+
const end = moment()
|
|
88
|
+
.add(-1, 'w')
|
|
89
|
+
.endOf('week');
|
|
90
|
+
return [start, end];
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
THIS_QUARTER() {
|
|
94
|
+
const start = moment().startOf('quarter');
|
|
95
|
+
const end = moment().endOf('quarter');
|
|
96
|
+
return [start, end];
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
NEXT_QUARTER() {
|
|
100
|
+
const start = moment()
|
|
101
|
+
.add(1, 'Q')
|
|
102
|
+
.startOf('quarter');
|
|
103
|
+
const end = moment()
|
|
104
|
+
.add(1, 'Q')
|
|
105
|
+
.endOf('quarter');
|
|
106
|
+
return [start, end];
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
LAST_QUARTER() {
|
|
110
|
+
const start = moment()
|
|
111
|
+
.add(-1, 'Q')
|
|
112
|
+
.startOf('quarter');
|
|
113
|
+
const end = moment()
|
|
114
|
+
.add(-1, 'Q')
|
|
115
|
+
.endOf('quarter');
|
|
116
|
+
return [start, end];
|
|
117
|
+
},
|
|
118
|
+
|
|
63
119
|
NEXT_WEEK() {
|
|
64
120
|
return timeDomain.getNextWeek(1);
|
|
65
121
|
},
|
|
@@ -179,9 +235,9 @@ const timeDomain = {
|
|
|
179
235
|
|
|
180
236
|
getTimeDomain(type, format) {
|
|
181
237
|
if (timeDomain[type]) {
|
|
182
|
-
let res =
|
|
183
|
-
if(typeof format === 'string'){
|
|
184
|
-
return res.map(v => v.format(type))
|
|
238
|
+
let res = timeDomain[type]();
|
|
239
|
+
if (typeof format === 'string') {
|
|
240
|
+
return res.map(v => v.format(type));
|
|
185
241
|
}
|
|
186
242
|
return res;
|
|
187
243
|
} else {
|