@esmx/router-vue
Version:
Vue integration for @esmx/router - A universal router that works seamlessly with both Vue 2.7+ and Vue 3
32 lines (31 loc) • 1.33 kB
TypeScript
/**
* RouterView component for rendering matched route components.
* Acts as a placeholder where route components are rendered based on the current route.
* Supports nested routing with proper depth tracking using Vue's provide/inject mechanism.
*
* @param props - Component properties (RouterView accepts no props)
* @param context - Vue setup context (not used)
* @param context.slots - Component slots (not used)
* @returns Vue render function that renders the matched route component at current depth
*
* @example
*
* ```vue
* <template>
* <div id="app">
* <!-- Navigation links -->
* <nav>
* <RouterLink to="/">Home</RouterLink>
* <RouterLink to="/about">About</RouterLink>
* <RouterLink to="/users">Users</RouterLink>
* </nav>
*
* <!-- Root level route components render here -->
* <RouterView />
* </div>
* </template>
* ```
*/
export declare const RouterView: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;