@yilianjituan/yilian_dgerm 1.0.7-alpha.5 → 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.FC<DropDownSelectProps>;
4
+ declare const Index: React.ForwardRefExoticComponent<DropDownSelectProps & React.RefAttributes<BaseSelectRef>>;
4
5
  export default Index;
@@ -80,4 +80,8 @@ export interface DropDownSelectProps extends SelectProps {
80
80
  * @description 是否初始化搜索
81
81
  */
82
82
  isInitSearch?: boolean;
83
+ /**
84
+ * @description 失焦回调
85
+ */
86
+ onBlurCallback?: () => void;
83
87
  }
@@ -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 Index(props) {
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
  */
@@ -184,6 +190,7 @@ var Index = function Index(props) {
184
190
  if (!!paramsRef.current) {
185
191
  handleSelect === null || handleSelect === void 0 || handleSelect(paramsRef.current);
186
192
  }
193
+ onBlurCallback === null || onBlurCallback === void 0 || onBlurCallback();
187
194
  };
188
195
 
189
196
  // 聚焦
@@ -241,11 +248,12 @@ var Index = function Index(props) {
241
248
  return typeof _onChange === 'function' && _onChange(value);
242
249
  }
243
250
  });
244
- return /*#__PURE__*/React.createElement(Select, _extends({}, commonProps, {
245
- ref: selectRef,
251
+ return /*#__PURE__*/React.createElement(Select, _extends({
246
252
  filterOption: false
253
+ }, commonProps, {
254
+ ref: selectRef
247
255
  }), options);
248
256
  };
249
257
  return renderCom();
250
- };
258
+ });
251
259
  export default Index;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yilianjituan/yilian_dgerm",
3
- "version": "1.0.7-alpha.5",
3
+ "version": "1.0.7-alpha.7",
4
4
  "description": "A react library developed with dumi",
5
5
  "keywords": [
6
6
  "React",