UNPKG

@tanstack/vue-router

Version:

Modern and scalable routing for Vue applications

21 lines (20 loc) 863 B
import * as Vue from "vue"; //#region src/nonRouteComponentContext.tsx var nonRouteComponentContext = process.env.NODE_ENV !== "production" ? Symbol("nonRouteComponentContext") : void 0; var NonRouteComponentContextProvider = process.env.NODE_ENV !== "production" ? Vue.defineComponent({ name: "NonRouteComponentContextProvider", props: { value: { type: String, required: true } }, setup(props, { slots }) { Vue.provide(nonRouteComponentContext, Vue.computed(() => props.value)); return () => slots.default?.(); } }) : void 0; function renderInNonRouteComponentContext(component, props, context) { return Vue.h(NonRouteComponentContextProvider, { value: context }, { default: () => Vue.h(component, props) }); } //#endregion export { nonRouteComponentContext, renderInNonRouteComponentContext }; //# sourceMappingURL=nonRouteComponentContext.js.map