|
|
|
@ -6,7 +6,7 @@
|
|
|
|
|
<b-collapse is-nav id="nav_collapse">
|
|
|
|
|
|
|
|
|
|
<b-navbar-nav>
|
|
|
|
|
<b-nav-item-dropdown text="korpus" right>
|
|
|
|
|
<b-nav-item-dropdown :text=corpText right>
|
|
|
|
|
<b-dropdown-item v-for="option in optCorpora"
|
|
|
|
|
:value="option"
|
|
|
|
|
:key="option"
|
|
|
|
@ -18,11 +18,11 @@
|
|
|
|
|
</b-navbar-nav>
|
|
|
|
|
|
|
|
|
|
<b-navbar-nav>
|
|
|
|
|
<b-nav-item-dropdown text="prikaz" right>
|
|
|
|
|
<b-nav-item-dropdown :text=indexText right>
|
|
|
|
|
<b-dropdown-item v-for="option in optIndexes"
|
|
|
|
|
:value="option.val"
|
|
|
|
|
:key="option.val"
|
|
|
|
|
v-on:click="updateIndex(option.val)"
|
|
|
|
|
v-on:click="updateIndex(option)"
|
|
|
|
|
>
|
|
|
|
|
{{ option.key }}
|
|
|
|
|
</b-dropdown-item>
|
|
|
|
@ -59,24 +59,35 @@ export default {
|
|
|
|
|
name: "Nav",
|
|
|
|
|
props: ["appState"],
|
|
|
|
|
data() {return {
|
|
|
|
|
optCorpora: ["kres", "ssj"],
|
|
|
|
|
optIndexes: [
|
|
|
|
|
{key: "besede", val: "words"},
|
|
|
|
|
{key: "udeleženske vloge", val: "functors"},
|
|
|
|
|
],
|
|
|
|
|
optCorpora: ["kres", "ssj"],
|
|
|
|
|
indexText: "pregled: " + this.$root.store.selIndex.key,
|
|
|
|
|
corpText: "korpus: " + this.$root.store.selCorpus,
|
|
|
|
|
}},
|
|
|
|
|
methods: {
|
|
|
|
|
updateAll() {
|
|
|
|
|
this.$root.store.indexReloader += 1
|
|
|
|
|
this.$root.store.radio = "one"
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: "Home"
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
setCorpText(val) {
|
|
|
|
|
this.corpText = "kropus: " + val
|
|
|
|
|
},
|
|
|
|
|
updateCorpus(val) {
|
|
|
|
|
this.setCorpText(val)
|
|
|
|
|
this.$root.store.selCorpus = val
|
|
|
|
|
this.updateAll()
|
|
|
|
|
},
|
|
|
|
|
setIndexText(val) {
|
|
|
|
|
this.indexText = "index: " + val
|
|
|
|
|
},
|
|
|
|
|
updateIndex(val) {
|
|
|
|
|
this.setIndexText(val.key)
|
|
|
|
|
this.$root.store.selIndex = val
|
|
|
|
|
this.updateAll()
|
|
|
|
|
},
|
|
|
|
|