@para-ui/core 3.0.43 → 3.0.44

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.
Files changed (56) hide show
  1. package/Form/index.js +1 -1
  2. package/FormItem/index.js +1 -1
  3. package/README.md +7 -0
  4. package/Search/index.d.ts +1 -0
  5. package/Search/index.js +6 -4
  6. package/Table/index.js +25 -16
  7. package/index.js +1 -1
  8. package/package.json +1 -1
  9. package/umd/AutoBox.js +7 -7
  10. package/umd/AutoTips.js +3 -3
  11. package/umd/Breadcrumbs.js +4 -4
  12. package/umd/Button.js +3 -3
  13. package/umd/ButtonGroup.js +5 -5
  14. package/umd/Checkbox.js +3 -3
  15. package/umd/CheckboxGroup.js +2 -2
  16. package/umd/ComboSelect.js +3 -3
  17. package/umd/DatePicker.js +2 -2
  18. package/umd/Desktop.js +2 -2
  19. package/umd/Drawer.js +2 -2
  20. package/umd/DynamicMultiBox.js +2 -2
  21. package/umd/Form.js +2 -2
  22. package/umd/FormItem.js +2 -2
  23. package/umd/FunctionModal.js +4 -4
  24. package/umd/Help.js +5 -5
  25. package/umd/InputLang.js +2 -2
  26. package/umd/InputNumber.js +4 -4
  27. package/umd/Label.js +3 -3
  28. package/umd/Modal.js +4 -4
  29. package/umd/MultiBox.js +2 -2
  30. package/umd/OperateBtn.js +3 -3
  31. package/umd/PageHeader.js +2 -2
  32. package/umd/Pagination.js +4 -4
  33. package/umd/PopConfirm.js +4 -4
  34. package/umd/Popover.js +3 -3
  35. package/umd/Radio.js +6 -6
  36. package/umd/RadioGroup.js +4 -4
  37. package/umd/Search.js +5 -5
  38. package/umd/Select.js +2 -2
  39. package/umd/SelectInput.js +2 -2
  40. package/umd/Selector.js +2 -2
  41. package/umd/SelectorPicker.js +2 -2
  42. package/umd/SingleBox.js +4 -4
  43. package/umd/Slider.js +2 -2
  44. package/umd/Switch.js +3 -3
  45. package/umd/Table.js +3 -3
  46. package/umd/Tabs.js +2 -2
  47. package/umd/Tag.js +2 -2
  48. package/umd/TextEditor.js +2 -2
  49. package/umd/TextField.js +4 -4
  50. package/umd/TimePicker.js +3 -3
  51. package/umd/ToggleButton.js +3 -3
  52. package/umd/Tooltip.js +2 -2
  53. package/umd/Transfer.js +5 -5
  54. package/umd/Tree.js +7 -7
  55. package/umd/Upload.js +8 -8
  56. /package/_verture/{index-694b816f.js → index-e0747afb.js} +0 -0
package/Form/index.js CHANGED
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-708dbb18.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-694b816f.js';
6
+ import { F as FormItem, v as validate } from '../_verture/index-e0747afb.js';
7
7
  import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
8
8
  import '../TextField/index.js';
9
9
  import '../_verture/typeof-498dd2b1.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-694b816f.js';
3
+ export { F as default } from '../_verture/index-e0747afb.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,10 @@
1
+ ## 版本: 3.0.44
2
+
3
+ para-ui/core@3.0.44 发布
4
+ 【搜索框-Search】默认不填充。支持继承输入框属性(不建议使用)
5
+ 【表格-Table】修复加载更多,刷新数据一直在追加问题
6
+ 【表格-Table】过滤undefined搜索值
7
+
1
8
  ## 版本: 3.0.43
2
9
 
3
10
  para-ui/core@3.0.43 发布
package/Search/index.d.ts CHANGED
@@ -51,6 +51,7 @@ export interface SearchProps {
51
51
  onClear?: () => void;
52
52
  /** 回车事件 */
53
53
  onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
54
+ [name: string]: any;
54
55
  }
55
56
  export declare const Search: FunctionComponent<SearchProps>;
56
57
  export default Search;
package/Search/index.js CHANGED
@@ -68,7 +68,8 @@ var Search = function Search(props) {
68
68
  onClickBtn = props.onClickBtn,
69
69
  onClickRightIcon = props.onClickRightIcon,
70
70
  onEnter = props.onEnter,
71
- onClear = props.onClear;
71
+ onClear = props.onClear,
72
+ otherProps = props.otherProps;
72
73
  var _useState = useState(''),
73
74
  _useState2 = _slicedToArray(_useState, 2),
74
75
  valueCom = _useState2[0],
@@ -173,8 +174,8 @@ var Search = function Search(props) {
173
174
  className: handClass(),
174
175
  style: style
175
176
  }, {
176
- children: [jsx(TextField, {
177
- className: 'search-text-field',
177
+ children: [jsx(TextField, Object.assign({
178
+ className: "search-text-field",
178
179
  size: size,
179
180
  placeholder: placeholder,
180
181
  value: handValue(),
@@ -187,10 +188,11 @@ var Search = function Search(props) {
187
188
  onKeydown: onKeydown,
188
189
  onKeyUp: onKeyUp,
189
190
  onEnter: onEnter,
191
+ autoComplete: "new-password",
190
192
  addonAfter: buttonDom(),
191
193
  allowClear: allowClear,
192
194
  onClear: onClear
193
- }), showBtn && btnType === 'outside' && jsx(Button, Object.assign({
195
+ }, otherProps)), showBtn && btnType === 'outside' && jsx(Button, Object.assign({
194
196
  className: 'search-button',
195
197
  size: size,
196
198
  startIcon: searchBtnIcon(),
package/Table/index.js CHANGED
@@ -1917,6 +1917,7 @@ var Table = function Table(propsInit) {
1917
1917
  // 设置总数对象
1918
1918
  useEffect(function () {
1919
1919
  if (data) {
1920
+ constData.current.historyData = [];
1920
1921
  var dataHand = handLocalData();
1921
1922
  var handTotalDataJson = ArrayToObject(rowKey, dataHand);
1922
1923
  setTotalDataJson(handTotalDataJson);
@@ -1929,6 +1930,12 @@ var Table = function Table(propsInit) {
1929
1930
  handPage(1);
1930
1931
  constData.current.historyData = [];
1931
1932
  }, [search, url]);
1933
+ useEffect(function () {
1934
+ if (constData.current.loadMoreUrl) {
1935
+ constData.current.historyData = [];
1936
+ }
1937
+ handPage(1);
1938
+ }, [refresh]);
1932
1939
  // 表格数据获取赋值
1933
1940
  useEffect(function () {
1934
1941
  clearTimeout(constData.current.reqTimer);
@@ -1953,7 +1960,8 @@ var Table = function Table(propsInit) {
1953
1960
  }
1954
1961
  }
1955
1962
  if (selectFilterCom && Object.keys(selectFilterCom).length > 0) {
1956
- postBody.filter = handFilterReq();
1963
+ var filterValue = handFilterReq();
1964
+ if (Object.keys(filterValue).length > 0) postBody.filter = filterValue;
1957
1965
  }
1958
1966
  if (constData.current.search) {
1959
1967
  if (_typeof(constData.current.search) === 'object') {
@@ -2009,7 +2017,7 @@ var Table = function Table(propsInit) {
2009
2017
  if (props.loading === undefined) setLoadState(false);
2010
2018
  }
2011
2019
  }, 50);
2012
- }, [refresh, refreshCom]);
2020
+ }, [refreshCom]);
2013
2021
  // 单选赋值默认值
2014
2022
  useEffect(function () {
2015
2023
  if (radioDefaultValue !== undefined && radioDefaultValue !== radioValue) {
@@ -2080,6 +2088,20 @@ var Table = function Table(propsInit) {
2080
2088
  target: containerRef.current
2081
2089
  });
2082
2090
  });
2091
+ /** 设置size */
2092
+ var handSize = function handSize(num) {
2093
+ constData.current.size = num;
2094
+ setSizeCom(num);
2095
+ setRefreshCom(Math.random());
2096
+ };
2097
+ /**
2098
+ * 处理page
2099
+ * */
2100
+ var handPage = function handPage(num) {
2101
+ constData.current.page = num;
2102
+ setPageCom(num);
2103
+ setRefreshCom(Math.random());
2104
+ };
2083
2105
  /** 处理本地data */
2084
2106
  var handLocalData = function handLocalData() {
2085
2107
  var _a;
@@ -2145,12 +2167,6 @@ var Table = function Table(propsInit) {
2145
2167
  }
2146
2168
  return false;
2147
2169
  };
2148
- /** 设置size */
2149
- var handSize = function handSize(num) {
2150
- constData.current.size = num;
2151
- setSizeCom(num);
2152
- setRefreshCom(Math.random());
2153
- };
2154
2170
  /** 本地显示列key */
2155
2171
  var getTableHeadKey = function getTableHeadKey() {
2156
2172
  // 自定义key
@@ -2440,6 +2456,7 @@ var Table = function Table(propsInit) {
2440
2456
  for (var i = 0, l = arr.length; i < l; i++) {
2441
2457
  var name = arr[i];
2442
2458
  var itemValue = selectFilterCom[name];
2459
+ if (itemValue.length === 0) continue; // 未选择的过滤项不参与请求
2443
2460
  var item = headDataJson[name];
2444
2461
  if (item && item.filterRadio) {
2445
2462
  json[name] = itemValue[0];
@@ -2590,14 +2607,6 @@ var Table = function Table(propsInit) {
2590
2607
  setTotalDataJson(Object.assign(Object.assign({}, totalDataJson), handDataJson));
2591
2608
  }
2592
2609
  };
2593
- /**
2594
- * 处理page
2595
- * */
2596
- var handPage = function handPage(num) {
2597
- constData.current.page = num;
2598
- setPageCom(num);
2599
- setRefreshCom(Math.random());
2600
- };
2601
2610
  /**
2602
2611
  * 改变页数
2603
2612
  * @param num {number | undefined} 页数
package/index.js CHANGED
@@ -22,7 +22,7 @@ export { D as Dropdown } from './_verture/index-be4faaee.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-694b816f.js';
25
+ export { F as FormItem } from './_verture/index-e0747afb.js';
26
26
  export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-d01400f6.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.43",
4
+ "version": "3.0.44",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
7
7
  "description": "Powered by Para FED",