Package-level declarations

Types

Link copied to clipboard
object Constants
Link copied to clipboard
object MRouter

路由库的本体

Link copied to clipboard
data class PanelState(val windowWidthSize: WindowWidthSize? = null, val windowHeightSize: WindowHeightSize? = null)

Functions

Link copied to clipboard
Link copied to clipboard
fun mRouterComposeUIViewController(content: @Composable () -> Unit): UIViewController
Link copied to clipboard
fun PanelHost(key: String = Constants.DEFAULT_PANEL, startRoute: String = Constants.DEFAULT_PAGE, onPanelChange: (isAttach: Boolean) -> Unit = {}, panelState: PanelState = rememberPanelState(), modifier: Modifier = Modifier)

在一个页面中可以有多个局部路由,如果需要路由到这些界面上则需要指明key。 比如 key:page?var=data,即可跳转到当前页面中的key局部路由的page页面上,并传入参数data

Link copied to clipboard
fun rememberPanelState(windowWidthSize: WindowWidthSize? = WindowWidthSize.Compact, windowHeightSize: WindowHeightSize? = null): PanelState

当其中一个不为空时,将以不为空的为主,当两个都不为空时,只需满足一个条件即可显示

Link copied to clipboard
fun RouteHost(startRoute: String, startWindowOptions: WindowOptions = WindowOptions(Constants.DEFAULT_WINDOW, ""), builder: Register.() -> Unit)

路由起点

Link copied to clipboard
fun MRouter.setRootViewController(rootViewController: UIViewController)

设置ViewController,只有设置了根ViewController才能从compose跳转到对应的VC上。