改进 菜单项
This commit is contained in:
parent
75a8efb735
commit
1ea0db0f3b
@ -21,6 +21,13 @@
|
|||||||
title="首页"
|
title="首页"
|
||||||
:to="route_names.home"
|
:to="route_names.home"
|
||||||
></v-list-item>
|
></v-list-item>
|
||||||
|
|
||||||
|
<v-list-item
|
||||||
|
rounded="lg"
|
||||||
|
prepend-icon="mdi-account"
|
||||||
|
:title="userStore.access_token ? '注销' : '登录'"
|
||||||
|
:to="route_names.login"
|
||||||
|
></v-list-item>
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-navigation-drawer>
|
</v-navigation-drawer>
|
||||||
|
|
||||||
@ -37,21 +44,19 @@ import { ref } from "vue";
|
|||||||
import app from "../../config/app";
|
import app from "../../config/app";
|
||||||
import {useUserStore} from "@/stores/user";
|
import {useUserStore} from "@/stores/user";
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
import {mdiHome} from "@mdi/js/commonjs/mdi";
|
|
||||||
|
|
||||||
const drawer = ref(false);
|
const drawer = ref(false);
|
||||||
|
|
||||||
const items = ref([
|
|
||||||
{ icon: "mdi-home", text: "首页", to: { name: "home" } },
|
|
||||||
// { icon: "mdi-content-copy", text: "资料库", to: { name: "libraries" } },
|
|
||||||
// { icon: "mdi-history", text: "Frequently contacted", to: "/documents" },
|
|
||||||
{ icon: "mdi-account", text: userStore.access_token ? "注销" : "登录", to: { name: "login" } },
|
|
||||||
])
|
|
||||||
|
|
||||||
const route_names = ref({
|
const route_names = ref({
|
||||||
"home": {
|
"home": {
|
||||||
name: "home"
|
name: "home"
|
||||||
|
},
|
||||||
|
"login": {
|
||||||
|
name: "login"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user