@para-ui/core 3.0.64 → 3.0.65

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/Form/index.js CHANGED
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-76060636.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { DeepClone } from '@paraview/lib';
5
5
  import React__default from 'react';
6
- import { F as FormItem, v as validate } from '../_verture/index-12b7c22b.js';
6
+ import { F as FormItem, v as validate } from '../_verture/index-73c9acab.js';
7
7
  import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
8
8
  import '../_verture/unsupportedIterableToArray-cb478f24.js';
9
9
  import '../TextField/index.js';
package/FormItem/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'react';
3
- export { F as default } from '../_verture/index-12b7c22b.js';
3
+ export { F as default } from '../_verture/index-73c9acab.js';
4
4
  import 'clsx';
5
5
  import '../Label/index.js';
6
6
  import '../_verture/constant-66aa48a1.js';
package/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 版本: 3.0.65
2
+
3
+ para-ui/core@3.0.65 发布
4
+ 【表格-Table】修复下拉框下拉浮层上下抖动问题,去除延迟代码
5
+
1
6
  ## 版本: 3.0.64
2
7
 
3
8
  para-ui/core@3.0.64 发布
package/Select/index.js CHANGED
@@ -190,14 +190,11 @@ var Select = function Select(props) {
190
190
  _useState24 = _slicedToArray(_useState23, 2),
191
191
  loading = _useState24[0],
192
192
  setLoading = _useState24[1]; // 下拉加载loading
193
- var _useState25 = useState(false),
194
- _useState26 = _slicedToArray(_useState25, 2),
195
- emptyBol = _useState26[0],
196
- setEmptyBol = _useState26[1]; // 延迟显示空状态
193
+ // const [emptyBol, setEmptyBol] = useState<boolean>(false); // 延迟显示空状态
197
194
  var textDom = useRef(null);
198
- var _useState27 = useState({}),
199
- _useState28 = _slicedToArray(_useState27, 1),
200
- constData = _useState28[0]; // 不变的常量 多行 不换行定时器 搜索定时器
195
+ var _useState25 = useState({}),
196
+ _useState26 = _slicedToArray(_useState25, 1),
197
+ constData = _useState26[0]; // 不变的常量 多行 不换行定时器 搜索定时器
201
198
  var _React$useContext = React__default.useContext(GlobalContext),
202
199
  language = _React$useContext.language,
203
200
  locale = _React$useContext.locale;
@@ -297,27 +294,20 @@ var Select = function Select(props) {
297
294
  // 筛选下拉框数据
298
295
  useEffect(function () {
299
296
  if (!open) return;
300
- clearTimeout(constData.searchTimer);
301
- constData.searchTimer = setTimeout(function () {
302
- setLoading(true);
303
- if (props.fetchSuggestions) {
304
- props.fetchSuggestions && props.fetchSuggestions(searchValue, function (data) {
305
- var listHand = handList(data);
306
- handSelectList(listHand, true);
307
- });
308
- } else {
309
- var listHand = handList(list);
310
- handSelectList(listHand);
311
- }
312
- }, 100);
313
- // 延迟显示下拉框空状态
314
- clearTimeout(constData.timerEmpty);
315
- setEmptyBol(false);
316
- constData.timerEmpty = setTimeout(function () {
317
- constData.emptyBol = true;
318
- setEmptyBol(true);
319
- }, 200);
297
+ setLoading(true);
298
+ if (props.fetchSuggestions) {
299
+ props.fetchSuggestions && props.fetchSuggestions(searchValue, function (data) {
300
+ var listHand = handList(data);
301
+ handSelectList(listHand, true);
302
+ setLoading(false);
303
+ });
304
+ } else {
305
+ var listHand = handList(list);
306
+ handSelectList(listHand);
307
+ setLoading(false);
308
+ }
320
309
  }, [search, searchValue, list, open]);
310
+ // 搜索框自动得到焦点
321
311
  useEffect(function () {
322
312
  if (open) {
323
313
  setTimeout(function () {
@@ -335,10 +325,6 @@ var Select = function Select(props) {
335
325
  window.removeEventListener("keydown", keydownCom);
336
326
  };
337
327
  }, [open]);
338
- // 搜索框有值,显示下拉框
339
- useEffect(function () {
340
- if (searchValue) setOpen(true);
341
- }, [searchValue]);
342
328
  // 是否计算搜索框长度
343
329
  useEffect(function () {
344
330
  if (disabled === true) return;
@@ -1077,7 +1063,7 @@ var Select = function Select(props) {
1077
1063
  children: handContent(item)
1078
1064
  }), index);
1079
1065
  })
1080
- }) : !loading && emptyBol && jsx("div", Object.assign({
1066
+ }) : !loading && jsx("div", Object.assign({
1081
1067
  className: "select-nodata"
1082
1068
  }, {
1083
1069
  children: jsx(Empty, Object.assign({}, emptyProps, {
@@ -1085,7 +1071,7 @@ var Select = function Select(props) {
1085
1071
  }))
1086
1072
  })), loading && jsx(Loading, {})]
1087
1073
  }));
1088
- }, [listCom, showName, showValue, valueCom, onChange, multiple, loading, language, locale, emptyProps, emptyBol, renderContent, selectCheckIcon]);
1074
+ }, [listCom, showName, showValue, valueCom, onChange, multiple, loading, language, locale, emptyProps, renderContent, selectCheckIcon]);
1089
1075
  // 下拉框popover memo
1090
1076
  var SelectPopoverMemo = useMemo(function () {
1091
1077
  if (!showSelect) return '';
@@ -1114,7 +1100,7 @@ var Select = function Select(props) {
1114
1100
  })), jsx(SearchIcon, {})]
1115
1101
  })), SelectPopoverListMemo]
1116
1102
  }));
1117
- }, [open, posDom, listCom, childrenName, showValue, showName, valueCom, searchValue, search, classOneSelect, searchModel, multiple, searchPlaceholder, showSelect, loading, searchInputProps, language, locale, emptyProps, emptyBol, renderContent, selectCheckIcon]);
1103
+ }, [open, posDom, listCom, childrenName, showValue, showName, valueCom, searchValue, search, classOneSelect, searchModel, multiple, searchPlaceholder, showSelect, loading, searchInputProps, language, locale, emptyProps, renderContent, selectCheckIcon]);
1118
1104
  /** 处理下拉内容 */
1119
1105
  var handDropdown = function handDropdown() {
1120
1106
  return jsx(Dropdown, Object.assign({
package/index.js CHANGED
@@ -22,7 +22,7 @@ export { D as Dropdown } from './_verture/index-77f9e0fb.js';
22
22
  export { default as DynamicMultiBox } from './DynamicMultiBox/index.js';
23
23
  export { default as Empty } from './Empty/index.js';
24
24
  export { default as Form } from './Form/index.js';
25
- export { F as FormItem } from './_verture/index-12b7c22b.js';
25
+ export { F as FormItem } from './_verture/index-73c9acab.js';
26
26
  export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-e4983a79.js';
27
27
  export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
28
28
  export { default as Help } from './Help/index.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@para-ui/core",
3
3
  "private": false,
4
- "version": "3.0.64",
4
+ "version": "3.0.65",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
7
7
  "description": "Powered by Para FED",