@nutui/nutui-react 2.0.18-beta.1 → 2.0.19-beta.0

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/dist/style.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.0.18 Wed Sep 20 2023 14:59:40 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.0.19-beta.0 Mon Sep 25 2023 18:02:10 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,3 +1,3 @@
1
1
  import { Menu } from './menu';
2
- export type { MenuProps } from './menu';
2
+ export type { MenuProps, TriggerType, CallBackFunction } from './menu';
3
3
  export default Menu;
@@ -1,6 +1,8 @@
1
1
  import React, { FunctionComponent } from 'react';
2
2
  import { MenuItem } from '../../packages/menuitem/menuitem';
3
3
  import { BasicComponent } from '../../utils/typings';
4
+ export type TriggerType = 'NORMAL' | 'REF';
5
+ export type CallBackFunction = (index: number, from?: TriggerType) => void;
4
6
  export interface MenuProps extends BasicComponent {
5
7
  /**
6
8
  * 选项的选中态图标颜色
@@ -33,12 +35,12 @@ export interface MenuProps extends BasicComponent {
33
35
  * menu 展开触发
34
36
  * @default -
35
37
  */
36
- onOpen: (index: number) => void
38
+ onOpen: CallBackFunction
37
39
  /**
38
40
  * menu 关闭触发
39
41
  * @default -
40
42
  */
41
- onClose: (index: number) => void
43
+ onClose: CallBackFunction
42
44
  }
43
45
  export declare const Menu: FunctionComponent<Partial<MenuProps>> & {
44
46
  Item: typeof MenuItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react",
3
- "version": "2.0.18-beta.1",
3
+ "version": "2.0.19-beta.0",
4
4
  "style": "dist/style.css",
5
5
  "main": "dist/nutui.react.umd.js",
6
6
  "module": "dist/esm/nutui-react.es.js",