添加跳转日历

This commit is contained in:
2020-10-15 19:33:11 +08:00
parent 79a5882601
commit 7bf5fc86de
3 changed files with 12 additions and 8 deletions

View File

@@ -91,7 +91,7 @@
</a-menu>
</template>
</a-dropdown>
<div class="item" style="border-right: none;">
<div class="item" style="border-right: none;" @click="navto('/regime/date')">
<img src="@/static/images/rili.png" alt="" class="icon">
<div class="name">日历</div>
</div>
@@ -219,10 +219,15 @@ export default defineComponent({
return store.state.userinfo;
})
function navto(index: number){
router.push({
path: nav[index].route
})
function navto(index: number | string){
if(typeof index == "number"){
router.push({
path: nav[index].route
})
}else{
router.push(index)
}
}
return {
nav,