杂务:新增声明级注释覆盖率
This commit is contained in:
@@ -53,7 +53,15 @@ import { computed, inject, onMounted, ref } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { HomeOutlined, ShoppingOutlined, ShoppingCartOutlined, UserOutlined } from '@ant-design/icons-vue'
|
||||
|
||||
/**
|
||||
* Purpose: router supports BottomNav.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 BottomNav.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()
|
||||
|
||||
// 注入全局购物车数量状态
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
*/
|
||||
import { computed } from 'vue'
|
||||
|
||||
/**
|
||||
* Purpose: props supports DraftActions.vue by holding or executing the props 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 props = withDefaults(defineProps<{
|
||||
savedAt?: number | null
|
||||
disabled?: boolean
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
import { computed } from 'vue'
|
||||
import { BellOutlined, ClockCircleOutlined } from '@ant-design/icons-vue'
|
||||
|
||||
/**
|
||||
* Purpose: props supports SystemMessageCard.vue by holding or executing the props 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 props = withDefaults(defineProps<{
|
||||
title?: string
|
||||
content?: string
|
||||
@@ -24,8 +28,20 @@ const props = withDefaults(defineProps<{
|
||||
footerAlign: 'between'
|
||||
})
|
||||
|
||||
/**
|
||||
* Purpose: hasImage supports SystemMessageCard.vue by holding or executing the has image 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 hasImage = computed(() => Boolean(props.imageUrl))
|
||||
/**
|
||||
* Purpose: displayTitle supports SystemMessageCard.vue by holding or executing the display title 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 displayTitle = computed(() => props.title?.trim() || '系统消息')
|
||||
/**
|
||||
* Purpose: displayContent supports SystemMessageCard.vue by holding or executing the display content 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 displayContent = computed(() => props.content?.trim() || (hasImage.value ? '' : '你收到了一条新的系统消息。'))
|
||||
</script>
|
||||
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
*/
|
||||
import { computed } from 'vue'
|
||||
|
||||
/**
|
||||
* Purpose: props supports TableEllipsisText.vue by holding or executing the props 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 props = withDefaults(defineProps<{
|
||||
text?: string | number | null
|
||||
lines?: 1 | 2 | 3
|
||||
|
||||
@@ -29,8 +29,16 @@ import { computed, useAttrs } from 'vue'
|
||||
import { useAdminViewport } from '@/composables/useAdminViewport'
|
||||
import { CONFIRM_ENTER_DISABLED_CLASS } from '@/composables/useConfirmEnter'
|
||||
|
||||
/**
|
||||
* Purpose: modalInstanceSeed supports AdminResponsiveModal.vue by holding or executing the modal instance seed page or API role.
|
||||
* Usage: import, call, read, or update this let from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
let modalInstanceSeed = 0
|
||||
|
||||
/**
|
||||
* Purpose: props supports AdminResponsiveModal.vue by holding or executing the props 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 props = withDefaults(defineProps<{
|
||||
open: boolean
|
||||
title?: string
|
||||
@@ -44,6 +52,10 @@ const props = withDefaults(defineProps<{
|
||||
confirmOnEnter: true
|
||||
})
|
||||
|
||||
/**
|
||||
* Purpose: emit supports AdminResponsiveModal.vue by holding or executing the emit 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 emit = defineEmits<{
|
||||
(event: 'update:open', value: boolean): void
|
||||
(event: 'cancel', value?: unknown): void
|
||||
@@ -51,7 +63,15 @@ const emit = defineEmits<{
|
||||
}>()
|
||||
|
||||
const { isMobile } = useAdminViewport()
|
||||
/**
|
||||
* Purpose: attrs supports AdminResponsiveModal.vue by holding or executing the attrs 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 attrs = useAttrs()
|
||||
/**
|
||||
* Purpose: modalInstanceClass supports AdminResponsiveModal.vue by holding or executing the modal instance class 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 modalInstanceClass = `admin-responsive-modal-${modalInstanceSeed++}`
|
||||
|
||||
/** mergedWidth is a reactive state variable used by the template and event handlers. */
|
||||
@@ -66,6 +86,10 @@ const mergedStyle = computed(() => (
|
||||
}
|
||||
: undefined
|
||||
))
|
||||
/**
|
||||
* Purpose: mergedWrapClassName supports AdminResponsiveModal.vue by holding or executing the merged wrap class name 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 mergedWrapClassName = computed(() => (
|
||||
[
|
||||
attrs.wrapClassName || attrs['wrap-class-name'],
|
||||
|
||||
Reference in New Issue
Block a user