@zgfe/business-lib 1.2.71-hxd.14 → 1.2.71-hxd.16
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.
|
@@ -3,5 +3,6 @@ declare const BizDate: React.ForwardRefExoticComponent<{
|
|
|
3
3
|
selectRange?: number | undefined;
|
|
4
4
|
timeRangeOpen?: number | undefined;
|
|
5
5
|
selectRangeUnit?: "quarter" | "months" | "weeks" | "days" | "minute" | undefined;
|
|
6
|
+
setOpen?: any;
|
|
6
7
|
} & React.RefAttributes<any>>;
|
|
7
8
|
export default BizDate;
|
|
@@ -20,12 +20,14 @@ var BizDateBeyondRange = false;
|
|
|
20
20
|
var BizDate = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
21
21
|
var selectRange = _ref.selectRange,
|
|
22
22
|
selectRangeUnit = _ref.selectRangeUnit,
|
|
23
|
-
timeRangeOpen = _ref.timeRangeOpen
|
|
23
|
+
timeRangeOpen = _ref.timeRangeOpen,
|
|
24
|
+
setOpen = _ref.setOpen;
|
|
24
25
|
var _useContext = useContext(DatePickerContext),
|
|
25
26
|
includeToday = _useContext.includeToday,
|
|
26
27
|
currentType = _useContext.currentType,
|
|
27
28
|
dateRange = _useContext.dateRange,
|
|
28
|
-
setRelative = _useContext.setRelative
|
|
29
|
+
setRelative = _useContext.setRelative,
|
|
30
|
+
setDateRange = _useContext.setDateRange;
|
|
29
31
|
var _useContext2 = useContext(BizGlobalDataContext),
|
|
30
32
|
envs = _useContext2.envs;
|
|
31
33
|
function disabledDate(current) {
|
|
@@ -120,6 +122,13 @@ var BizDate = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
120
122
|
onChange: function onChange(date) {
|
|
121
123
|
if (date) {
|
|
122
124
|
setValue(currentType === DatePickerTypes.Unit.minute ? moment(date, 'YYYY-MM-DD HH') : moment(date, 'YYYY-MM-DD'));
|
|
125
|
+
if (currentType === DatePickerTypes.Unit.minute && setDateRange) {
|
|
126
|
+
setDateRange({
|
|
127
|
+
begin: moment(date).format('YYYY-MM-DD HH'),
|
|
128
|
+
end: moment(date).format('YYYY-MM-DD HH')
|
|
129
|
+
});
|
|
130
|
+
setOpen(false);
|
|
131
|
+
}
|
|
123
132
|
}
|
|
124
133
|
}
|
|
125
134
|
})) : (/*#__PURE__*/React.createElement(RangePicker, {
|
|
@@ -35,7 +35,7 @@ export default (function (props) {
|
|
|
35
35
|
ref: ref
|
|
36
36
|
}, props)), /*#__PURE__*/React.createElement("div", {
|
|
37
37
|
className: "".concat(classPrefix, "-popoverContent-btns")
|
|
38
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
38
|
+
}, currentType !== DatePickerTypes.Unit.minute && (/*#__PURE__*/React.createElement(Button, {
|
|
39
39
|
type: "primary",
|
|
40
40
|
onClick: function onClick() {
|
|
41
41
|
if (ref.current) {
|
|
@@ -48,5 +48,5 @@ export default (function (props) {
|
|
|
48
48
|
setOpen(false);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
}, "\u786E\u5B9A"))));
|
|
51
|
+
}, "\u786E\u5B9A")))));
|
|
52
52
|
});
|
package/es/select/handle.js
CHANGED
|
@@ -147,7 +147,7 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
147
147
|
return /*#__PURE__*/React.createElement("div", {
|
|
148
148
|
ref: handleRef,
|
|
149
149
|
className: "".concat(classPrefix, "-input ").concat(props.theme ? props.theme : '', "\n ").concat(props.disable ? 'disable' : '', " ").concat(focus ? 'active' : '', "\n ").concat(mergedStatus ? "".concat(classPrefix, "-status-").concat(mergedStatus) : '', "\n ").concat(border ? '' : 'borderless', " ").concat(props.size ? props.size : 'middle'),
|
|
150
|
-
title: "".concat(props.label || (optionData === null || optionData === void 0 ? void 0 : optionData[aliasField || '']) || (optionData === null || optionData === void 0 ? void 0 : optionData[labelField]) || '').concat(extraLabel)
|
|
150
|
+
title: "".concat(props.label || (optionData === null || optionData === void 0 ? void 0 : optionData[aliasField || '']) || (optionData === null || optionData === void 0 ? void 0 : optionData[labelField]) || '').concat(extraLabel || '')
|
|
151
151
|
}, /*#__PURE__*/React.createElement("span", {
|
|
152
152
|
className: "".concat(classPrefix, "-content")
|
|
153
153
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -156,7 +156,7 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
156
156
|
className: "".concat(classPrefix, "-icon")
|
|
157
157
|
}, props.value.icon)), props.children || props.label || (optionData === null || optionData === void 0 ? void 0 : optionData[aliasField || '']) || (optionData === null || optionData === void 0 ? void 0 : optionData[labelField]) || (/*#__PURE__*/React.createElement("span", {
|
|
158
158
|
className: "".concat(classPrefix, "-holder")
|
|
159
|
-
}, placeholder || '请选择')), extraLabel)), /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
}, placeholder || '请选择')), extraLabel || '')), /*#__PURE__*/React.createElement("div", {
|
|
160
160
|
className: "".concat(classPrefix, "-content-icon-list"),
|
|
161
161
|
style: onSelectDelete ? {
|
|
162
162
|
width: 50
|
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.16",
|
|
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": "16628c4b683c111b494f339dc2c1cd809d6832e3",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|