杂务:新增声明级注释覆盖率
This commit is contained in:
@@ -27,15 +27,31 @@ import { CheckOutlined } from '@ant-design/icons-vue'
|
||||
import BottomNav from './components/BottomNav.vue'
|
||||
import SystemMessageCard from './components/SystemMessageCard.vue'
|
||||
import { cartApi } from './api/cart'
|
||||
/**
|
||||
* Purpose: SystemMessageVO supports App.vue by holding or executing the system message 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 SystemMessageVO } from './api/user'
|
||||
import antdLocale from './config/antdv-locale'
|
||||
import { useGlobalConfirmEnter } from './composables/useConfirmEnter'
|
||||
import { useShopTheme } from './composables/useShopTheme'
|
||||
|
||||
/**
|
||||
* Purpose: route supports App.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()
|
||||
/**
|
||||
* Purpose: router supports App.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()
|
||||
const { currentTheme, refreshShopTheme, resetShopTheme, setupShopThemeSync } = useShopTheme()
|
||||
useGlobalConfirmEnter()
|
||||
/**
|
||||
* Purpose: ButtonPropsWithClass supports App.vue by holding or executing the button props with class 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 ButtonPropsWithClass = ButtonProps & { class?: string }
|
||||
const popupMessageOkButtonProps: ButtonPropsWithClass = { class: 'popup-message-ok-button' }
|
||||
/** routerReady is a reactive state variable used by the template and event handlers. */
|
||||
@@ -55,6 +71,10 @@ const isHiddenNav = computed(() => {
|
||||
return route.matched.some(r => r.meta.hideNav) || route.matched.some(r => r.meta.isAdmin)
|
||||
})
|
||||
|
||||
/**
|
||||
* Purpose: antdTheme supports App.vue by holding or executing the antd theme 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 antdTheme = computed<ThemeConfig>(() => ({
|
||||
token: {
|
||||
colorPrimary: currentTheme.value.primaryColor,
|
||||
@@ -110,6 +130,10 @@ const updateCartCount = async () => {
|
||||
await loadCartCount()
|
||||
}
|
||||
|
||||
/**
|
||||
* Purpose: resolveSystemMessageActionPath supports App.vue by holding or executing the resolve system message action path 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 resolveSystemMessageActionPath = (item: SystemMessageVO) => {
|
||||
const actionPath = String(item.actionPath || '').trim()
|
||||
if (!actionPath || !actionPath.startsWith('/') || actionPath.startsWith('//')) {
|
||||
@@ -118,6 +142,10 @@ const resolveSystemMessageActionPath = (item: SystemMessageVO) => {
|
||||
return actionPath
|
||||
}
|
||||
|
||||
/**
|
||||
* Purpose: openSystemMessageAction supports App.vue by holding or executing the open system message action 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 openSystemMessageAction = async (item: SystemMessageVO) => {
|
||||
const actionPath = resolveSystemMessageActionPath(item)
|
||||
if (!actionPath) {
|
||||
|
||||
Reference in New Issue
Block a user