@zgfe/business-lib 1.2.51-ljy.24 → 1.2.51-ljy.25
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.
|
@@ -135,7 +135,7 @@ var BizDate = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
135
135
|
if (includeToday && value && value.length === 2 && isTodayInRange(value[0], value[1])) {
|
|
136
136
|
subtractDays = 1;
|
|
137
137
|
}
|
|
138
|
-
if (value && value.length === 2 && moment(_.cloneDeep(value[1]).subtract(subtractDays, 'days').format('YYYY-MM-DD')).diff(moment(value[0].format('YYYY-MM-DD')), selectRangeUnit || 'months')
|
|
138
|
+
if (value && value.length === 2 && moment(_.cloneDeep(value[1]).subtract(subtractDays, 'days').format('YYYY-MM-DD')).diff(moment(value[0].format('YYYY-MM-DD')), selectRangeUnit || 'months') > (selectRange ? selectRange : 12)) {
|
|
139
139
|
BizDateBeyondRange = true;
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
@@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
import { BizDatePicker } from '@zgfe/business-lib';
|
|
9
9
|
import '@zgfe/business-lib/es/assets/styles/resetAntd.less';
|
|
10
|
-
import {
|
|
10
|
+
import { Switch } from 'antd';
|
|
11
11
|
export default (function () {
|
|
12
12
|
var _useState = useState({
|
|
13
13
|
begin: '2022-05-03',
|
|
@@ -27,16 +27,10 @@ export default (function () {
|
|
|
27
27
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, "\u5305\u542B\u300C\u4ECA\u5929\u300D: ", /*#__PURE__*/React.createElement(Switch, {
|
|
28
28
|
defaultChecked: includeToday,
|
|
29
29
|
onChange: setIncludeToday
|
|
30
|
-
})), /*#__PURE__*/React.createElement(
|
|
31
|
-
onChange: handleChange,
|
|
32
|
-
dateTypeList: ['week', 'month', 'quarter', 'custom'],
|
|
33
|
-
includeToday: includeToday,
|
|
34
|
-
defaultValue: time
|
|
35
|
-
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(BizDatePicker, {
|
|
30
|
+
})), /*#__PURE__*/React.createElement(BizDatePicker, {
|
|
36
31
|
onChange: handleChange,
|
|
37
32
|
dateTypeList: ['week', 'month', 'quarter'],
|
|
38
|
-
|
|
39
|
-
selectRange: 400,
|
|
33
|
+
selectRange: 365,
|
|
40
34
|
selectRangeUnit: 'days',
|
|
41
35
|
includeToday: includeToday,
|
|
42
36
|
defaultValue: time
|
|
@@ -56,11 +56,12 @@ export default (function () {
|
|
|
56
56
|
defaultChecked: includeToday,
|
|
57
57
|
onChange: setIncludeToday
|
|
58
58
|
})), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(BizDatePickerOld, {
|
|
59
|
+
includeToday: includeToday,
|
|
59
60
|
value: time,
|
|
60
61
|
defaultValue: time,
|
|
61
62
|
dateTypeList: [DatePickerTypes.Unit.hour, DatePickerTypes.Unit.day, DatePickerTypes.Unit.week, DatePickerTypes.Unit.month, DatePickerTypes.Unit.quarter, DatePickerTypes.Unit.custom],
|
|
62
|
-
selectRange:
|
|
63
|
-
selectRangeUnit: "
|
|
63
|
+
selectRange: 365,
|
|
64
|
+
selectRangeUnit: "days",
|
|
64
65
|
onChange: handleChange
|
|
65
66
|
}), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u503C\uFF1A", JSON.stringify(time))));
|
|
66
67
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.51-ljy.
|
|
3
|
+
"version": "1.2.51-ljy.25",
|
|
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": "994b542b22fd4b9d51a83dbebd7962140971c8d8",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|