vxui-react 1.2.1 → 1.2.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.
@@ -1,4 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
+ export interface BottomNavSubMenuItem {
3
+ key: string;
4
+ label: string;
5
+ icon?: ReactNode;
6
+ onSelect?: () => void;
7
+ }
2
8
  export interface BottomNavItem {
3
9
  key: string;
4
10
  label: string;
@@ -7,6 +13,8 @@ export interface BottomNavItem {
7
13
  badge?: string | number;
8
14
  active?: boolean;
9
15
  onSelect?: () => void;
16
+ /** 子菜单项,有值时点击 item 将弹出子菜单而非直接触发 onSelect */
17
+ submenu?: BottomNavSubMenuItem[];
10
18
  }
11
19
  export interface BottomNavProps {
12
20
  items: BottomNavItem[];
@@ -22,6 +22,10 @@ export interface DrawerNavItemProps {
22
22
  export declare function DrawerNavItem({ icon, label, badge, active, onClick }: DrawerNavItemProps): import("react/jsx-runtime").JSX.Element;
23
23
  export interface DrawerNavSectionProps {
24
24
  title?: string;
25
+ /** 是否可折叠,默认 false */
26
+ collapsible?: boolean;
27
+ /** 初始展开状态,collapsible=true 时有效,默认 true */
28
+ defaultOpen?: boolean;
25
29
  children: ReactNode;
26
30
  }
27
- export declare function DrawerNavSection({ title, children }: DrawerNavSectionProps): import("react/jsx-runtime").JSX.Element;
31
+ export declare function DrawerNavSection({ title, collapsible, defaultOpen, children }: DrawerNavSectionProps): import("react/jsx-runtime").JSX.Element;