@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 +1 -1
- package/FormItem/index.js +1 -1
- package/README.md +5 -0
- package/Select/index.js +20 -34
- package/index.js +1 -1
- package/package.json +1 -1
- package/umd/ComboSelect.js +4 -4
- package/umd/DynamicMultiBox.js +1 -1
- package/umd/Form.js +1 -1
- package/umd/FormItem.js +1 -1
- package/umd/Pagination.js +4 -4
- package/umd/Select.js +1 -1
- package/umd/SelectInput.js +1 -1
- package/umd/Table.js +1 -1
- /package/_verture/{index-12b7c22b.js → index-73c9acab.js} +0 -0
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-
|
|
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
package/README.md
CHANGED
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
|
-
|
|
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
|
|
199
|
-
|
|
200
|
-
constData =
|
|
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
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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 &&
|
|
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,
|
|
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,
|
|
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-
|
|
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';
|