@yilianjituan/yilian_dgerm 1.0.7-alpha.4 → 1.0.7-alpha.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.0.7-alpha.7](http://git.yljt.cn/web-module/yl_dgerm/compare/v1.0.6...v1.0.7-alpha.7) (2026-01-05)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- 修改版本号 ([1df3e91](http://git.yljt.cn/web-module/yl_dgerm/commits/1df3e913400d9be84684e6b2eaafed981b986454))
|
|
6
|
+
- 修改保留参数默认为保留 ([42dea96](http://git.yljt.cn/web-module/yl_dgerm/commits/42dea96b0bbecabe6640441932f0ecce3c9b2ee2))
|
|
7
|
+
- 修改文档 ([3dd6c72](http://git.yljt.cn/web-module/yl_dgerm/commits/3dd6c72639396daeb60b3982f018795436b3ddd9))
|
|
8
|
+
- 修改下拉加载框触发下拉加载的计算方式 ([2dc1e3e](http://git.yljt.cn/web-module/yl_dgerm/commits/2dc1e3e42518a0d602f4dcd27993513c02c94574))
|
|
9
|
+
- 修改 pageTemplate 分页问题 ([09b6fa0](http://git.yljt.cn/web-module/yl_dgerm/commits/09b6fa09e2f0c5e9dca124bbcff561a8b24d4575))
|
|
10
|
+
- modal 优化 ([c12924c](http://git.yljt.cn/web-module/yl_dgerm/commits/c12924c683305be02fe5d32ac3a16a8bc5c7f157))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- pageTemplate 增加保留参数的功能 ([c551c56](http://git.yljt.cn/web-module/yl_dgerm/commits/c551c56e4c89dde6bee54188e49290f5f58bce0d))
|
|
15
|
+
|
|
1
16
|
## [1.0.7-alpha.3](http://git.yljt.cn/web-module/yl_dgerm/compare/v1.0.6...v1.0.7-alpha.3) (2025-10-15)
|
|
2
17
|
|
|
3
18
|
### Bug Fixes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { BaseSelectRef } from 'rc-select';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { DropDownSelectProps } from './index.interface';
|
|
3
|
-
declare const Index: React.
|
|
4
|
+
declare const Index: React.ForwardRefExoticComponent<DropDownSelectProps & React.RefAttributes<BaseSelectRef>>;
|
|
4
5
|
export default Index;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["http", "url", "method", "handleSelect", "showValue", "customInput", "searchValue", "additionalParameters", "dynamicParameter", "beforeSearch", "filterOptionsCallback", "onChange", "changeNoSearch", "mode", "isInitSearch"];
|
|
2
|
+
var _excluded = ["http", "url", "method", "handleSelect", "showValue", "customInput", "searchValue", "additionalParameters", "dynamicParameter", "beforeSearch", "filterOptionsCallback", "onChange", "onBlurCallback", "changeNoSearch", "mode", "isInitSearch"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
5
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -23,9 +23,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
23
23
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
24
24
|
import { Select, Spin } from 'antd';
|
|
25
25
|
import _ from 'lodash';
|
|
26
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
26
|
+
import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
27
27
|
var Option = Select.Option;
|
|
28
|
-
var Index = function
|
|
28
|
+
var Index = /*#__PURE__*/forwardRef(function (props, forwardedRef) {
|
|
29
29
|
var http = props.http,
|
|
30
30
|
url = props.url,
|
|
31
31
|
_props$method = props.method,
|
|
@@ -41,6 +41,7 @@ var Index = function Index(props) {
|
|
|
41
41
|
beforeSearch = props.beforeSearch,
|
|
42
42
|
filterOptionsCallback = props.filterOptionsCallback,
|
|
43
43
|
_onChange = props.onChange,
|
|
44
|
+
onBlurCallback = props.onBlurCallback,
|
|
44
45
|
_props$changeNoSearch = props.changeNoSearch,
|
|
45
46
|
changeNoSearch = _props$changeNoSearch === void 0 ? true : _props$changeNoSearch,
|
|
46
47
|
_props$mode = props.mode,
|
|
@@ -71,6 +72,11 @@ var Index = function Index(props) {
|
|
|
71
72
|
isFetchedData = _useState6[0],
|
|
72
73
|
setIsFetchedData = _useState6[1]; // 是否需要获取数据
|
|
73
74
|
|
|
75
|
+
// 如果父组件传了 ref,就把它和 selectRef 同步
|
|
76
|
+
useImperativeHandle(forwardedRef, function () {
|
|
77
|
+
return selectRef.current;
|
|
78
|
+
}, [selectRef.current]);
|
|
79
|
+
|
|
74
80
|
/**
|
|
75
81
|
* 查询接口
|
|
76
82
|
*/
|
|
@@ -163,10 +169,13 @@ var Index = function Index(props) {
|
|
|
163
169
|
// 下拉加载
|
|
164
170
|
var companyScroll = function companyScroll(e) {
|
|
165
171
|
var target = e.target;
|
|
166
|
-
var
|
|
172
|
+
var scrollTop = target.scrollTop,
|
|
167
173
|
scrollHeight = target.scrollHeight,
|
|
168
|
-
|
|
169
|
-
|
|
174
|
+
clientHeight = target.clientHeight;
|
|
175
|
+
|
|
176
|
+
// 使用更宽松的阈值来判断是否滚动到底部
|
|
177
|
+
var isBottom = Math.abs(scrollHeight - scrollTop - clientHeight) < 1;
|
|
178
|
+
if (isBottom) {
|
|
170
179
|
if (pageRef.current < totalPagesRef.current) {
|
|
171
180
|
// 检查当前页是否小于总页数
|
|
172
181
|
pageRef.current += 1; // 增加当前页码
|
|
@@ -181,6 +190,7 @@ var Index = function Index(props) {
|
|
|
181
190
|
if (!!paramsRef.current) {
|
|
182
191
|
handleSelect === null || handleSelect === void 0 || handleSelect(paramsRef.current);
|
|
183
192
|
}
|
|
193
|
+
onBlurCallback === null || onBlurCallback === void 0 || onBlurCallback();
|
|
184
194
|
};
|
|
185
195
|
|
|
186
196
|
// 聚焦
|
|
@@ -238,11 +248,12 @@ var Index = function Index(props) {
|
|
|
238
248
|
return typeof _onChange === 'function' && _onChange(value);
|
|
239
249
|
}
|
|
240
250
|
});
|
|
241
|
-
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
242
|
-
ref: selectRef,
|
|
251
|
+
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
243
252
|
filterOption: false
|
|
253
|
+
}, commonProps, {
|
|
254
|
+
ref: selectRef
|
|
244
255
|
}), options);
|
|
245
256
|
};
|
|
246
257
|
return renderCom();
|
|
247
|
-
};
|
|
258
|
+
});
|
|
248
259
|
export default Index;
|