清理一下

This commit is contained in:
aixianling
2024-06-17 18:20:13 +08:00
parent 27ea4bc032
commit 07b7474af1
5 changed files with 69 additions and 105 deletions

26
src/components/menu.vue Normal file
View File

@@ -0,0 +1,26 @@
<script>
export default {
name: "menu",
data() {
return {
menu: []
}
},
created() {
this.menu = localStorage.getItem('routes') ? JSON.parse(localStorage.getItem('routes')) : []
}
}
</script>
<template>
<div class="menu">
<div v-for="item in menu" :key="item.name" v-text="item.label" @click="$router.push({name: item.name})"/>
</div>
</template>
<style scoped>
.menu {
width: 200px;
height: 100vh;
background: #f3f6f9;
}
</style>