vue3
This commit is contained in:
10
src/App.vue
10
src/App.vue
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<NavBar :activeType="type" @setType="setType"></NavBar>
|
||||
<NavBar :activeType="type" @set-type="setType"></NavBar>
|
||||
<section class="section">
|
||||
<TimeWindows :activeWindow="window" @setWindow="setWindow"></TimeWindows>
|
||||
<TimeWindows :activeWindow="window" @set-window="setWindow"></TimeWindows>
|
||||
<Chart :window="window" :type="type"></Chart>
|
||||
</section>
|
||||
</div>
|
||||
@@ -39,13 +39,15 @@ export default {
|
||||
},
|
||||
updateRoute() {
|
||||
if (this.type) {
|
||||
this.$router.push({
|
||||
const route = {
|
||||
name: 'view',
|
||||
params: {
|
||||
type: this.type,
|
||||
window: this.window.label ? this.window.label.replace(' ', '-') : undefined
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log(route)
|
||||
this.$router.push(route)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user