vue3
This commit is contained in:
@@ -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])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user