杂务:新增声明级注释覆盖率

This commit is contained in:
xiaowang
2026-05-23 18:44:57 +08:00
parent 8f038894e7
commit 844516988b
234 changed files with 8356 additions and 0 deletions
@@ -233,6 +233,10 @@ import {
UserOutlined
} from '@ant-design/icons-vue'
import { message, Modal } from 'ant-design-vue'
/**
* Purpose: UserVO supports AdminLayout.vue by holding or executing the user vo page or API role.
* Usage: import, call, read, or update this type from the owning page/module while preserving the surrounding loading and permission flow.
*/
import { adminAuthApi, type UserVO } from '@/api/admin'
import { DEFAULT_AVATAR } from '@/constants'
import { usePermission } from '@/utils/permission'
@@ -246,6 +250,10 @@ import {
isBootstrapAdminUser
} from './admin-helpers'
/**
* Purpose: AdminMenuItem supports AdminLayout.vue by holding or executing the admin menu item page or API role.
* Usage: import, call, read, or update this type from the owning page/module while preserving the surrounding loading and permission flow.
*/
type AdminMenuItem = {
key: string
icon: any
@@ -253,7 +261,15 @@ type AdminMenuItem = {
permissionCode: string
}
/**
* Purpose: router supports AdminLayout.vue by holding or executing the router page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const router = useRouter()
/**
* Purpose: route supports AdminLayout.vue by holding or executing the route page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const route = useRoute()
const { isMobile } = useAdminViewport()
@@ -261,8 +277,20 @@ const { isMobile } = useAdminViewport()
const collapsed = ref(false)
/** mobileDrawerOpen is a reactive state variable used by the template and event handlers. */
const mobileDrawerOpen = ref(false)
/**
* Purpose: userInfo supports AdminLayout.vue by holding or executing the user info page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const userInfo = ref<UserVO | null>(null)
/**
* Purpose: selectedKeys supports AdminLayout.vue by holding or executing the selected keys page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const selectedKeys = ref<string[]>([route.path])
/**
* Purpose: selectedShopId supports AdminLayout.vue by holding or executing the selected shop id page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const selectedShopId = ref<string>()
/** shopSwitchLoading is a reactive state variable used by the template and event handlers. */
const shopSwitchLoading = ref(false)
@@ -288,6 +316,10 @@ const menuItems: AdminMenuItem[] = [
{ key: '/admin/legal-agreements', icon: SafetyCertificateOutlined, label: '协议管理', permissionCode: 'legal_agreement:manage' }
]
/**
* Purpose: mobileTabs supports AdminLayout.vue by holding or executing the mobile tabs page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const mobileTabs = [
{ key: 'workbench', label: '工作台', path: '/admin', icon: HomeOutlined },
{ key: 'orders', label: '订单', path: '/admin/orders', icon: ShoppingOutlined },