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

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
@@ -213,7 +213,15 @@ import { authApi } from '@/api/auth'
import { couponApi } from '@/api/coupon'
import { fileApi } from '@/api/file'
import { orderApi } from '@/api/order'
/**
* Purpose: UserVO supports ProfileView.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 { userApi, type UserVO } from '@/api/user'
/**
* Purpose: ChunkUploadTask supports ProfileView.vue by holding or executing the chunk upload task 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 { createChunkUploadTask, type ChunkUploadTask } from '@/utils/chunk-upload'
import { buildDraftStorageKey, clearDraftRecord, loadDraftRecord, saveDraftRecord } from '@/utils/form-draft'
import { wishlistApi } from '@/api/wishlist'
@@ -221,8 +229,16 @@ import { DEFAULT_AVATAR } from '@/constants'
import { runWithGlobalLoading } from '@/utils/action-loading'
import { notifyShopThemeChanged } from '@/utils/shop-theme'
/**
* Purpose: router supports ProfileView.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: userInfo supports ProfileView.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>({
id: 0,
nickname: '',
@@ -256,14 +272,26 @@ const artistCalendarAccessible = ref(false)
const shopSwitchVisible = ref(false)
/** shopSwitchLoading is a reactive state variable used by the template and event handlers. */
const shopSwitchLoading = ref(false)
/**
* Purpose: selectedShopId supports ProfileView.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>()
/** avatarUploadProgress is a reactive state variable used by the template and event handlers. */
const avatarUploadProgress = ref(0)
/** avatarUploadPending is a reactive state variable used by the template and event handlers. */
const avatarUploadPending = ref(false)
let avatarUploadTask: ChunkUploadTask<string> | null = null
/**
* Purpose: draftSavedAt supports ProfileView.vue by holding or executing the draft saved at 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 draftSavedAt = ref<number | null>(null)
/**
* Purpose: editForm supports ProfileView.vue by holding or executing the edit form 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 editForm = reactive({
nickname: '',
avatar: '',
@@ -335,6 +363,10 @@ const shopSwitchTip = computed(() => {
return '当前暂无可用门店'
})
/**
* Purpose: coreMenuItems supports ProfileView.vue by holding or executing the core menu items 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 coreMenuItems = [
{
key: 'orders',
@@ -401,6 +433,10 @@ const canViewArtistCalendar = computed(() => {
return userType === 3 || (userType === 2 && artistCalendarAccessible.value)
})
/**
* Purpose: profileMenuItems supports ProfileView.vue by holding or executing the profile menu items 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 profileMenuItems = computed(() => {
return coreMenuItems.filter((item: any) => !item.serviceOnly || canViewArtistCalendar.value)
})