|
Lines 38-49
export default {
Link Here
|
| 38 |
methods: { |
38 |
methods: { |
| 39 |
redirect(url) { |
39 |
redirect(url) { |
| 40 |
const redirectParams = url ? url : this.to; |
40 |
const redirectParams = url ? url : this.to; |
| 41 |
if (typeof redirectParams === "string") |
41 |
window.location.href = this.formatUrl( |
| 42 |
window.location.href = this.formatUrl(redirectParams); |
42 |
typeof redirectParams === "object" |
| 43 |
if (typeof redirectParams === "object") { |
43 |
? this.handleQuery(redirectParams) |
| 44 |
const url = this.handleQuery(redirectParams); |
44 |
: redirectParams |
| 45 |
window.location.href = this.formatUrl(url); |
45 |
); |
| 46 |
} |
|
|
| 47 |
}, |
46 |
}, |
| 48 |
formatUrl(url) { |
47 |
formatUrl(url) { |
| 49 |
if (url.includes("http://") || url.includes("https://")) return url; |
48 |
if (url.includes("http://") || url.includes("https://")) return url; |
| 50 |
- |
|
|