This commit is contained in:
2019-07-01 20:58:02 +02:00
parent dae1a68ef8
commit dbca57d7e1
7 changed files with 102 additions and 21 deletions

View File

@@ -15,7 +15,11 @@
<script>
import dayjs from 'dayjs'
export default {
props: ['activeWindow'],
props: {
activeWindow: {
type: [Object, String]
}
},
data() {
return {
windows: [{
@@ -64,7 +68,10 @@ export default {
}
},
mounted() {
if (!this.activeWindow.label) {
if (typeof this.activeWindow === 'string') {
const window = this.windows.find(w => w.label === this.activeWindow.replace('-', ' '))
this.$emit('setWindow', window)
} else if (!this.activeWindow.label) {
this.$emit('setWindow', this.windows[1])
}
}