This commit is contained in:
iVampireSP.com 2023-03-15 21:43:17 +08:00
parent 1477a9af07
commit 8f35439cde
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -1,20 +1,49 @@
<template> <template>
<ul class="navbar-nav me-auto"> <ul class="navbar-nav me-auto">
<!-- <template v-for="item in modules"> <template v-for="item in items">
<li class="nav-item"> <li class="nav-item">
<router-link class="nav-link text-auto" :to="{ name: item.route }">{{ <router-link
item.name class="nav-link text-auto"
}}</router-link> :to="{ name: item.route }"
</li> active-class="active"
</template> --> >{{ item.name }}</router-link
</ul> >
</li>
</template>
</ul>
</template> </template>
<script setup> <script setup>
// import { ref } from 'vue' import { ref } from "vue";
// import axios from 'axios'
// const modules = ref({}) const items = ref([
// axios.get('/modules.json').then((res) => { {
// modules.value = res.data name: "首页",
// }) route: "index",
// </script> },
{
name: "隧道",
route: "tunnels",
},
{
name: "服务器列表",
route: "servers",
},
{
name: "创建隧道",
route: "tunnels.create",
},
]);
//
if (window.Base.User.is_admin) {
// items.value.push({
// name: "",
// route: "servers",
// });
items.value.push({
name: "创建服务器",
route: "servers.create",
});
}
</script>