This commit is contained in:
2020-09-19 16:59:01 +02:00
parent b4420e6d57
commit bf3c4b7121
10 changed files with 5080 additions and 4438 deletions

View File

@@ -28,6 +28,7 @@ export default {
},
methods: {
async fetchData() {
console.log('fetch data')
if (this.window.label) {
this.loading = true
const typeApi = {

View File

@@ -46,7 +46,7 @@ export default {
},
mounted() {
if (!this.activeType) {
this.$emit('setType', this.navTypes[0])
this.$emit('set-type', this.navTypes[0])
}
},
methods: {
@@ -58,7 +58,7 @@ export default {
},
setType(type) {
this.toggled = false
this.$emit('setType', type)
this.$emit('set-type', type)
}
}
}

View File

@@ -4,7 +4,7 @@
<li
v-for="window in windows"
:key="window.label"
@click="$emit('setWindow', window)"
@click="$emit('set-window', window)"
:class="{'is-active': window.label === activeWindow.label}"
>
<a>{{window.label}}</a>
@@ -68,11 +68,12 @@ export default {
}
},
mounted() {
console.log('mounted')
if (typeof this.activeWindow === 'string') {
const window = this.windows.find(w => w.label === this.activeWindow.replace('-', ' '))
this.$emit('setWindow', window)
this.$emit('set-window', window)
} else if (!this.activeWindow.label) {
this.$emit('setWindow', this.windows[1])
this.$emit('set-window', this.windows[1])
}
}
}