UNPKG

@ohu-mobile/core

Version:
17 lines (16 loc) 475 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = navigate; function navigate(instance) { var to = instance.to, url = instance.url, replace = instance.replace; var router = instance === null || instance === void 0 ? void 0 : instance.$router; if (to && router) { replace ? router.replace(to) : router.push(to); } else if (url) { replace ? window.location.replace(url) : window.location.href = url; } }