adui
Version:
<div> <img src="https://wxa.wxs.qq.com/mpweb/delivery/legacy/wxadtouch/upload/t1/od834zef_52939fc6.png" style="margin:40px 0 0 -8px; background-color: #fcfcfc; box-shadow: none;" /> </div>
22 lines (21 loc) • 647 B
TypeScript
import * as React from "react";
type ContextProps = {
/**
* 点击 Nav.Item 时的 handler,参数:index
*/
onChange?: (index: React.ReactText) => void;
/**
* Sub 收起 / 展开 时的 handler,参数:index
*/
onOpenChange?: (index: React.ReactText) => void;
/**
* 外部控制:展开的 SubNav indexes,请确保数组项合法,Nav 不会做过多验证
*/
openIndexes?: React.ReactText[] | null;
/**
* 外部控制:选中的 Nav.Item index
*/
selectedIndex?: React.ReactText | null;
};
export declare const NavContext: React.Context<ContextProps>;
export {};