优化组件类型声明,添加用户信息检查逻辑,更新导航列表处理

This commit is contained in:
2025-12-23 20:17:18 +08:00
parent fc420ad4eb
commit 2f25bd8389
3 changed files with 7 additions and 4 deletions

2
components.d.ts vendored
View File

@ -12,11 +12,9 @@ declare module 'vue' {
DAside: typeof import('vue-devui/layout/index.es.js')['Aside'] DAside: typeof import('vue-devui/layout/index.es.js')['Aside']
DAvatar: typeof import('vue-devui/avatar/index.es.js')['Avatar'] DAvatar: typeof import('vue-devui/avatar/index.es.js')['Avatar']
DButton: typeof import('vue-devui/button/index.es.js')['Button'] DButton: typeof import('vue-devui/button/index.es.js')['Button']
DButtonGroup: typeof import('vue-devui/button-group/index.es.js')['ButtonGroup']
DCard: typeof import('vue-devui/card/index.es.js')['Card'] DCard: typeof import('vue-devui/card/index.es.js')['Card']
DContent: typeof import('vue-devui/layout/index.es.js')['Content'] DContent: typeof import('vue-devui/layout/index.es.js')['Content']
DDropdown: typeof import('vue-devui/dropdown/index.es.js')['Dropdown'] DDropdown: typeof import('vue-devui/dropdown/index.es.js')['Dropdown']
DDropdownItem: typeof import('vue-devui/dropdown-item/index.es.js')['DropdownItem']
DFooter: typeof import('vue-devui/layout/index.es.js')['Footer'] DFooter: typeof import('vue-devui/layout/index.es.js')['Footer']
DForm: typeof import('vue-devui/form/index.es.js')['Form'] DForm: typeof import('vue-devui/form/index.es.js')['Form']
DFormItem: typeof import('vue-devui/form/index.es.js')['FormItem'] DFormItem: typeof import('vue-devui/form/index.es.js')['FormItem']

View File

@ -21,7 +21,7 @@
import layIndex from './Index.vue' import layIndex from './Index.vue'
// 空白项目入口 // 空白项目入口
const route = useRoute() const route = useRoute()
const logStatus = $store.log.useLogStore()
const modal = reactive<any>({ const modal = reactive<any>({
visible: false, visible: false,
title: "", title: "",
@ -55,7 +55,7 @@ document.oncontextmenu = function () {
}; };
onMounted(() => { onMounted(() => {
if($cookies.get('userinfo')) logStatus.setIsLogin(true)
}) })
</script> </script>

View File

@ -150,6 +150,11 @@ const tagList: any = ref([
const usrLog = $store.log.useLogStore() const usrLog = $store.log.useLogStore()
async function getNavList() { async function getNavList() {
const userinfo = $cookies.get("userinfo")
if (!userinfo) {
navlist.value = []
return
}
const res = await $http.nav.getNavList() const res = await $http.nav.getNavList()
res.data?.forEach((i: any) => { res.data?.forEach((i: any) => {
i.icon_error = false i.icon_error = false