@lemon-fe/components 1.6.1 → 1.6.3

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.
@@ -44,8 +44,7 @@ export interface ColType<TData> extends Omit<ColDef<TData>, 'editable'> {
44
44
  ellipsis?: boolean;
45
45
  /**
46
46
  * @description
47
- * @en cell renderer. it should be a pure function, do not use the state from the closure but from cellContext
48
- * @zh 单元格渲染函数. 需要是一个纯函数,不使用外部组件的状态变量,而是通过context引入
47
+ * 单元格自定义渲染函数。需要是一个纯函数,不使用外部组件的状态变量,而是通过context引入。第一个参数受单元格的valueFormatter属性影响。
49
48
  */
50
49
  render?: (formattedValue: any, record: TData, index: number, params: ICellRendererParams) => ReactElement | string | number | null;
51
50
  /**
@@ -28,6 +28,10 @@ interface Props<KeyType> extends Omit<TreeProps, 'onSelect' | 'selectedKeys' | '
28
28
  * @description 是否高亮关键词
29
29
  */
30
30
  highlightKeywords?: boolean;
31
+ /**
32
+ * @description 搜索框右侧内容,传入后展示。需要开启 showSearch,并且优先级低于 header
33
+ */
34
+ searchAddonAfter?: ReactNode;
31
35
  }
32
36
  declare function SiderTreeTabs(props: {
33
37
  tabs: {
@@ -1,6 +1,6 @@
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
2
  var _excluded = ["tabs", "children"],
3
- _excluded2 = ["data", "showSearch", "placeholder", "onSelect", "filterNode", "operation", "header", "footer", "height", "filterKeepParents", "filterKeepDescendants", "highlightKeywords", "onScroll"];
3
+ _excluded2 = ["data", "showSearch", "placeholder", "onSelect", "filterNode", "operation", "header", "footer", "height", "filterKeepParents", "filterKeepDescendants", "highlightKeywords", "onScroll", "searchAddonAfter"];
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."); }
6
6
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
@@ -83,6 +83,7 @@ export default function SiderTree(props) {
83
83
  filterKeepDescendants = props.filterKeepDescendants,
84
84
  highlightKeywords = props.highlightKeywords,
85
85
  onScroll = props.onScroll,
86
+ searchAddonAfter = props.searchAddonAfter,
86
87
  restProps = _objectWithoutProperties(props, _excluded2);
87
88
  var _useState = useState(''),
88
89
  _useState2 = _slicedToArray(_useState, 2),
@@ -167,7 +168,8 @@ export default function SiderTree(props) {
167
168
  return handleChange(e.currentTarget.value);
168
169
  },
169
170
  placeholder: placeholder,
170
- prefix: /*#__PURE__*/React.createElement(Icons.Search, null)
171
+ prefix: /*#__PURE__*/React.createElement(Icons.Search, null),
172
+ addonAfter: searchAddonAfter ? searchAddonAfter : null
171
173
  });
172
174
  }
173
175
  var prefixCls = prefix();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "registry": "https://registry.npmjs.org"
60
60
  },
61
- "gitHead": "98bd762090b853c65c146bd1fc955fdccd4fa4af"
61
+ "gitHead": "bbc2ebe7a5a3ddf625a7d845693d4aee3408ae0e"
62
62
  }