@zgfe/business-lib 1.2.71-hxd.8 → 1.2.71-hxd.9
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/datePickerV2/index.js +4 -1
- package/es/datePickerV2/utils.js +1 -10
- package/package.json +2 -2
package/es/datePickerV2/index.js
CHANGED
|
@@ -146,13 +146,16 @@ var BizDatePicker = function BizDatePicker(_ref) {
|
|
|
146
146
|
return type.count == 0 ? '今天' : '最近' + type.value;
|
|
147
147
|
} else {
|
|
148
148
|
if (!includeToday) {
|
|
149
|
-
if ((currentType === null || currentType === void 0 ? void 0 : currentType.value) == DatePickerTypes.Unit.hour
|
|
149
|
+
if ((currentType === null || currentType === void 0 ? void 0 : currentType.value) == DatePickerTypes.Unit.hour) {
|
|
150
150
|
setDateRange(getDateRange(DatePickerTypes.Unit.day, 1, includeToday));
|
|
151
151
|
setRelative([1, 1]);
|
|
152
152
|
return '昨天';
|
|
153
153
|
}
|
|
154
154
|
return '最近' + relative[0] + Reflect.get(DateOptionMap, currentType === null || currentType === void 0 ? void 0 : currentType.value);
|
|
155
155
|
}
|
|
156
|
+
if ((currentType === null || currentType === void 0 ? void 0 : currentType.value) == DatePickerTypes.Unit.minute) {
|
|
157
|
+
return moment().format('YYYY-MM-DD HH');
|
|
158
|
+
}
|
|
156
159
|
return '最近' + relative[0] + Reflect.get(DateOptionMap, currentType === null || currentType === void 0 ? void 0 : currentType.value);
|
|
157
160
|
}
|
|
158
161
|
} else {
|
package/es/datePickerV2/utils.js
CHANGED
|
@@ -47,16 +47,7 @@ export var getTypeList = function getTypeList(currentType, includeToday, shortcu
|
|
|
47
47
|
var defaultShortcuts = [{
|
|
48
48
|
label: '按分钟',
|
|
49
49
|
value: DatePickerTypes.Unit.minute,
|
|
50
|
-
children: [
|
|
51
|
-
value: '今天',
|
|
52
|
-
count: 0
|
|
53
|
-
}, {
|
|
54
|
-
value: '昨天',
|
|
55
|
-
count: 1
|
|
56
|
-
}, {
|
|
57
|
-
value: '前天',
|
|
58
|
-
count: 2
|
|
59
|
-
}]
|
|
50
|
+
children: []
|
|
60
51
|
}, {
|
|
61
52
|
label: '按小时',
|
|
62
53
|
value: DatePickerTypes.Unit.hour,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.71-hxd.
|
|
3
|
+
"version": "1.2.71-hxd.9",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react": "^16.12.0 || ^17.0.0",
|
|
56
56
|
"yorkie": "^2.0.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "38e33082a26f918938ff22f3804d7cbe255f519a",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|