杂务:新增声明级注释覆盖率
This commit is contained in:
@@ -245,6 +245,10 @@ import { DeleteOutlined, RightOutlined } from '@ant-design/icons-vue'
|
||||
import { message } from 'ant-design-vue'
|
||||
import type { ButtonProps } from 'ant-design-vue/es/button/buttonTypes'
|
||||
import { cartApi } from '../api/cart'
|
||||
/**
|
||||
* Purpose: UserCoupon supports CartView.vue by holding or executing the user coupon 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 { couponApi, type UserCoupon } from '../api/coupon'
|
||||
import { fileApi } from '../api/index'
|
||||
import { orderApi } from '../api/order'
|
||||
@@ -253,14 +257,34 @@ import type { IdType } from '@/utils/id'
|
||||
import { sameId, toOptionalIdString } from '@/utils/id'
|
||||
import { runWithGlobalLoading } from '@/utils/action-loading'
|
||||
|
||||
/**
|
||||
* Purpose: router supports CartView.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: updateCartCount supports CartView.vue by holding or executing the update cart count 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 updateCartCount = inject<() => Promise<void>>('updateCartCount', async () => {})
|
||||
|
||||
/**
|
||||
* Purpose: NO_COUPON_KEY supports CartView.vue by holding or executing the no coupon key 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 NO_COUPON_KEY = 'NONE'
|
||||
/**
|
||||
* Purpose: ButtonPropsWithClass supports CartView.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 couponModalOkButtonProps: ButtonPropsWithClass = { class: 'cart-coupon-modal__ok' }
|
||||
const couponModalCancelButtonProps: ButtonPropsWithClass = { class: 'cart-coupon-modal__cancel' }
|
||||
|
||||
/**
|
||||
* Purpose: ArtistOption supports CartView.vue by holding or executing the artist option page or API role.
|
||||
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
interface ArtistOption {
|
||||
id: IdType
|
||||
name: string
|
||||
@@ -270,6 +294,10 @@ interface ArtistOption {
|
||||
participateProduction?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Purpose: CartItem supports CartView.vue by holding or executing the cart item page or API role.
|
||||
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
interface CartItem {
|
||||
id: IdType
|
||||
productId: IdType
|
||||
@@ -293,16 +321,40 @@ interface CartItem {
|
||||
artist?: ArtistOption
|
||||
}
|
||||
|
||||
/**
|
||||
* Purpose: CheckoutIssue supports CartView.vue by holding or executing the checkout issue page or API role.
|
||||
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
interface CheckoutIssue {
|
||||
key: string
|
||||
message: string
|
||||
itemId?: IdType
|
||||
}
|
||||
|
||||
/**
|
||||
* Purpose: cartItems supports CartView.vue by holding or executing the cart 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 cartItems = ref<CartItem[]>([])
|
||||
/**
|
||||
* Purpose: imageIdCache supports CartView.vue by holding or executing the image id cache 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 imageIdCache = ref<Record<string, string>>({})
|
||||
/**
|
||||
* Purpose: itemRefs supports CartView.vue by holding or executing the item refs 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 itemRefs = ref<Record<string, HTMLElement>>({})
|
||||
/**
|
||||
* Purpose: availableCoupons supports CartView.vue by holding or executing the available coupons 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 availableCoupons = ref<UserCoupon[]>([])
|
||||
/**
|
||||
* Purpose: selectedCoupon supports CartView.vue by holding or executing the selected coupon 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 selectedCoupon = ref<UserCoupon | null>(null)
|
||||
/** couponSelectionKey is a reactive state variable used by the template and event handlers. */
|
||||
const couponSelectionKey = ref(NO_COUPON_KEY)
|
||||
@@ -312,8 +364,20 @@ const couponSelectionTouched = ref(false)
|
||||
const showCouponModal = ref(false)
|
||||
/** showBookingModal is a reactive state variable used by the template and event handlers. */
|
||||
const showBookingModal = ref(false)
|
||||
/**
|
||||
* Purpose: currentItem supports CartView.vue by holding or executing the current item 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 currentItem = ref<CartItem | null>(null)
|
||||
/**
|
||||
* Purpose: availableArtists supports CartView.vue by holding or executing the available artists 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 availableArtists = ref<ArtistOption[]>([])
|
||||
/**
|
||||
* Purpose: draftArtistId supports CartView.vue by holding or executing the draft artist 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 draftArtistId = ref<IdType>()
|
||||
/** draftAppointmentTime is a reactive state variable used by the template and event handlers. */
|
||||
const draftAppointmentTime = ref('')
|
||||
|
||||
Reference in New Issue
Block a user