@zgfe/business-lib 1.2.51-ljy.6 → 1.2.51-ljy.7
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.
|
@@ -36,6 +36,7 @@ export default (function () {
|
|
|
36
36
|
key: "".concat(includeToday, "--2"),
|
|
37
37
|
onChange: handleChange,
|
|
38
38
|
includeToday: includeToday,
|
|
39
|
-
defaultValue: time
|
|
39
|
+
defaultValue: time,
|
|
40
|
+
selectRange: 1222
|
|
40
41
|
}), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u503C\uFF1A", JSON.stringify(time))));
|
|
41
42
|
});
|
|
@@ -16,6 +16,18 @@ var DateOptionMap = {
|
|
|
16
16
|
month: '月',
|
|
17
17
|
quarter: '季度'
|
|
18
18
|
};
|
|
19
|
+
var DateMaxMap = {
|
|
20
|
+
day: 365,
|
|
21
|
+
week: 52,
|
|
22
|
+
month: 12,
|
|
23
|
+
quarter: 4
|
|
24
|
+
};
|
|
25
|
+
var DateSingleMap = {
|
|
26
|
+
day: 1,
|
|
27
|
+
week: 7,
|
|
28
|
+
month: 30,
|
|
29
|
+
quarter: 120
|
|
30
|
+
};
|
|
19
31
|
var PickerShortcut = function PickerShortcut(_ref) {
|
|
20
32
|
var selectRange = _ref.selectRange;
|
|
21
33
|
var _useContext = useContext(DatePickerContext),
|
|
@@ -45,6 +57,7 @@ var PickerShortcut = function PickerShortcut(_ref) {
|
|
|
45
57
|
setActive(temp === null || temp === void 0 ? void 0 : temp.count);
|
|
46
58
|
}
|
|
47
59
|
}, [currentType, mode, includeToday]);
|
|
60
|
+
var max = selectRange ? Math.floor(selectRange / Reflect.get(DateSingleMap, currentType)) : Reflect.get(DateMaxMap, currentType);
|
|
48
61
|
return /*#__PURE__*/React.createElement("div", {
|
|
49
62
|
className: "".concat(classPrefix, "-shortcut")
|
|
50
63
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -67,7 +80,7 @@ var PickerShortcut = function PickerShortcut(_ref) {
|
|
|
67
80
|
className: "".concat(classPrefix, "-list-relative-content")
|
|
68
81
|
}, /*#__PURE__*/React.createElement("span", null, "\u8FD1"), /*#__PURE__*/React.createElement(InputNumber, {
|
|
69
82
|
min: 1,
|
|
70
|
-
max:
|
|
83
|
+
max: max,
|
|
71
84
|
controls: false,
|
|
72
85
|
style: {
|
|
73
86
|
width: '58px'
|
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.7",
|
|
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": "18998205fbc745e5c8f52a20e1af8012f411adb9",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|