@lemon-fe/components 0.1.68 → 0.1.71

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.
@@ -408,9 +408,9 @@ function Filter(props) {
408
408
  }
409
409
  });
410
410
  rows.push(currRow);
411
- value += simple ? 180 : 220;
411
+ value += simple ? 208 : 248;
412
412
 
413
- if (currRow.length > 0 && value > width) {
413
+ if (currRow.length > 0 && value >= width + getColStyle(1).width) {
414
414
  rows.push([]);
415
415
  }
416
416
 
@@ -5,7 +5,7 @@ interface Props {
5
5
  /**
6
6
  * @description 布局类型
7
7
  * 栅格系统同antd,总计24列,默认占8列
8
- * flex 弹性型,默认占24
8
+ * flex 弹性型,默认占24列,完全按照百分比进行布局
9
9
  * @default default
10
10
  */
11
11
  layout?: 'default' | 'flex';
@@ -75,6 +75,12 @@
75
75
  }
76
76
  }
77
77
 
78
+ &-layout-flex > div > .ant-form-item,
79
+ &-layout-flex &-col {
80
+ width: 100%;
81
+ min-width: 0;
82
+ }
83
+
78
84
  &-row {
79
85
  .row();
80
86
  }
@@ -87,13 +93,11 @@
87
93
  &-col-@{value} {
88
94
  .col(@value);
89
95
  }
90
- });
91
96
 
92
- &-layout-flex > div > .ant-form-item,
93
- &-layout-flex &-col {
94
- width: 100%;
95
- max-width: 100%;
96
- }
97
+ &-layout-flex &-col-@{value} {
98
+ width: percentage((@value / 24));
99
+ }
100
+ });
97
101
  }
98
102
 
99
103
  @media (max-width: 575px) {
@@ -45,6 +45,7 @@ interface Props<RecordType, ParamsType> {
45
45
  onChange: (value: Partial<ParamsType>) => void;
46
46
  style?: CSSProperties;
47
47
  }) => ReactElement;
48
+ onChange?: (value: ParamsType) => void;
48
49
  };
49
50
  rowSelection?: TableRowSelection<RecordType>;
50
51
  }
@@ -24,7 +24,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
24
24
 
25
25
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
26
26
 
27
- import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
27
+ import React, { useEffect, useMemo, useRef, useState } from 'react';
28
28
  import { Tabs, Button } from 'antd';
29
29
  import { get } from 'lodash';
30
30
  import Filter from '../Filter';
@@ -111,11 +111,15 @@ export default function SelectView(props) {
111
111
  onChange === null || onChange === void 0 ? void 0 : onChange(newRows);
112
112
  };
113
113
 
114
- var handleChangeParams = useCallback(function (mParams) {
115
- setParams(function (prev) {
116
- return _objectSpread(_objectSpread({}, prev), mParams);
117
- });
118
- }, []);
114
+ var handleChangeParams = function handleChangeParams(mParams) {
115
+ var nextParams = _objectSpread(_objectSpread({}, params), mParams);
116
+
117
+ if (filter === null || filter === void 0 ? void 0 : filter.onChange) {
118
+ filter.onChange(nextParams);
119
+ }
120
+
121
+ setParams(nextParams);
122
+ };
119
123
 
120
124
  var handleValuesChange = function handleValuesChange(changedValues, allValues) {
121
125
  var _filter$onValuesChang;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "0.1.68",
3
+ "version": "0.1.71",
4
4
  "description": "> TODO: description",
5
5
  "author": "鲁盛杰 <lusj@cnlemon.net>",
6
6
  "homepage": "",
@@ -41,5 +41,5 @@
41
41
  "react": "^17.0.2",
42
42
  "react-dom": "^17.0.2"
43
43
  },
44
- "gitHead": "c78284f7973b457f109c8b655a3d67c8ffca6d67"
44
+ "gitHead": "6497c7576c4a6ad3f4a98f64e8c8b7678646a946"
45
45
  }