fix toggle sidebar
This commit is contained in:
parent
95311ebcff
commit
336e51bd1d
@ -36,7 +36,8 @@
|
|||||||
</AppContent>
|
</AppContent>
|
||||||
<Sidebar
|
<Sidebar
|
||||||
:show-sidebar="showSidebar"
|
:show-sidebar="showSidebar"
|
||||||
:sidebar-station="sidebarStation" />
|
:sidebar-station="sidebarStation"
|
||||||
|
@toggleSidebar="toggleSidebar" />
|
||||||
</Content>
|
</Content>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -332,9 +333,13 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleSidebar(station) {
|
toggleSidebar(station = null) {
|
||||||
this.showSidebar = true
|
if (station) {
|
||||||
this.sidebarStation = station
|
this.showSidebar = true
|
||||||
|
this.sidebarStation = station
|
||||||
|
} else {
|
||||||
|
this.showSidebar = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
:subtitle="stationTags"
|
:subtitle="stationTags"
|
||||||
:background="sidebarStation.favicon"
|
:background="sidebarStation.favicon"
|
||||||
class="has-preview"
|
class="has-preview"
|
||||||
@close="showSidebar=false">
|
@close="toggleSidebar">
|
||||||
<div class="configBox">
|
<div class="configBox">
|
||||||
<span class="icon icon-link" />
|
<span class="icon icon-link" />
|
||||||
<span class="title">
|
<span class="title">
|
||||||
@ -90,6 +90,11 @@ export default {
|
|||||||
return ''
|
return ''
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
toggleSidebar(station) {
|
||||||
|
this.$emit('toggleSidebar')
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user