@teamias/rex-design 0.1.23 → 0.1.24

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.
@@ -10,9 +10,9 @@ export default (function () {
10
10
  return /*#__PURE__*/_jsx(RexProConfigProvider, {
11
11
  value: {},
12
12
  children: /*#__PURE__*/_jsx(DataCell, {
13
- onClick: function onClick(item, subItem, dropdownKey) {
14
- if (dropdownKey) {
15
- message.info("\u83DC\u5355\u9879\u70B9\u51FB: key=".concat(dropdownKey, ", type=").concat(item.type));
13
+ onClick: function onClick(item, dropdownItemOrSubitem) {
14
+ if (dropdownItemOrSubitem) {
15
+ message.info("\u83DC\u5355\u9879\u70B9\u51FB: key=".concat(dropdownItemOrSubitem.key, ", type=").concat(item.type));
16
16
  }
17
17
  },
18
18
  items: [
@@ -18,9 +18,9 @@ export interface IDataCellProps {
18
18
  /** 每一行展示内容 */
19
19
  items: Array<TGroupV2 | IDataCellItem<TDataCellType>>;
20
20
  /** 点击回调(action='custom' 或 Dropdown 菜单项点击时触发) */
21
- onClick?: (item: IDataCellItem, subItem?: Exclude<TGroupV2['props'], undefined>['items'][number],
22
- /** Dropdown 菜单项 */
23
- dropdownItem?: IDataCellDropdown['items'][number]) => void;
21
+ onClick?: (item: IDataCellItem,
22
+ /** group-v2 子项 或 Dropdown 菜单项(优先级高) */
23
+ subItem?: Exclude<TGroupV2['props'], undefined>['items'][number] | IDataCellDropdown['items'][number]) => void;
24
24
  }
25
25
  export interface IDataCellItem<T extends TDataCellType = TDataCellType> {
26
26
  /** 组件类型 */
@@ -45,7 +45,7 @@ export var buildDropdownMenu = function buildDropdownMenu(dropdown, _onClick, it
45
45
  if (!matched) return;
46
46
  executeAction(matched, navigate);
47
47
  if (matched.action === 'custom') {
48
- _onClick === null || _onClick === void 0 || _onClick(item, subItem, matched);
48
+ _onClick === null || _onClick === void 0 || _onClick(item, matched || subItem);
49
49
  }
50
50
  }
51
51
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamias/rex-design",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",