You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bsdgy-front/src/pages/shop/IncreaseManager.vue

47 lines
1.2 KiB
Vue

<template>
<div>
<Menu ref="menu" mode="horizontal" :active-name="selectedItemName" v-model="this.threeLevel[0].id">
<MenuItem :name="cItem.id" :to="cItem.resource" v-for="cItem in threeLevel"
:key="cItem.id">
{{cItem.name}}
</MenuItem>
</Menu>
<div>
<router-view/>
</div>
</div>
</template>
<script>
export default {
name: "ShopIncrease",
data() {
return {
threeLevel: [],
selectedItemName: null,
}
},
created() {
this.threeLevel = JSON.parse(sessionStorage.getItem("threeLevel"));
this.menuInit();
},
mounted() {
this.threeLevel = JSON.parse(sessionStorage.getItem("threeLevel"));
this.menuInit();
},
methods:{
menuInit(){
let that = this;
that.selectedItemName = that.threeLevel[0].id;
this.$nextTick(() => {
that.$refs.menu.updateActiveName();
});
}
}
}
</script>
<style scoped>
</style>