| 1234567891011121314151617181920212223242526 |
- import { g as getCurrentInstance } from "./index-5e4623ce.js";
- const routeProps = {
- to: [String, Object],
- url: String,
- replace: Boolean
- };
- function route({
- to,
- url,
- replace,
- $router: router
- }) {
- if (to && router) {
- router[replace ? "replace" : "push"](to);
- } else if (url) {
- replace ? location.replace(url) : location.href = url;
- }
- }
- function useRoute() {
- const vm = getCurrentInstance().proxy;
- return () => route(vm);
- }
- export {
- routeProps as r,
- useRoute as u
- };
|