From cb0fda7a69b081fce4523140a6fc206fc0939e71 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Mon, 29 Jun 2026 15:36:33 +0800 Subject: [PATCH] fix: lint && typecheck --- .../src/views/mall/product/spu/components/spu-showcase.vue | 5 ++++- .../views/mall/promotion/combination/components/showcase.vue | 3 ++- .../src/views/mall/promotion/point/components/showcase.vue | 5 ++++- .../src/views/mall/promotion/seckill/components/showcase.vue | 3 ++- .../src/views/mall/product/spu/components/spu-showcase.vue | 5 ++++- .../views/mall/promotion/combination/components/showcase.vue | 3 ++- .../src/views/mall/promotion/point/components/showcase.vue | 5 ++++- .../src/views/mall/promotion/seckill/components/showcase.vue | 5 ++++- .../src/views/mall/product/spu/components/spu-showcase.vue | 5 ++++- .../views/mall/promotion/combination/components/showcase.vue | 5 ++++- .../src/views/mall/promotion/point/components/showcase.vue | 5 ++++- .../src/views/mall/promotion/seckill/components/showcase.vue | 5 ++++- 12 files changed, 42 insertions(+), 12 deletions(-) diff --git a/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue b/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue index d339cb2af..f2c21fb9c 100644 --- a/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue +++ b/apps/web-antd/src/views/mall/product/spu/components/spu-showcase.vue @@ -5,6 +5,7 @@ import type { MallSpuApi } from '#/api/mall/product/spu'; import { computed, ref, watch } from 'vue'; import { IconifyIcon } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { Image, Tooltip } from 'ant-design-vue'; @@ -58,7 +59,9 @@ watch( // 只有商品发生变化时才重新查询 if ( productSpus.value.length === 0 || - productSpus.value.some((spu) => spu.id === null || !ids.includes(spu.id)) + productSpus.value.some( + (spu) => isUndefined(spu.id) || !ids.includes(spu.id), + ) ) { productSpus.value = await getSpuDetailList(ids); } diff --git a/apps/web-antd/src/views/mall/promotion/combination/components/showcase.vue b/apps/web-antd/src/views/mall/promotion/combination/components/showcase.vue index e04abe99c..45d4e795e 100644 --- a/apps/web-antd/src/views/mall/promotion/combination/components/showcase.vue +++ b/apps/web-antd/src/views/mall/promotion/combination/components/showcase.vue @@ -5,6 +5,7 @@ import type { MallCombinationActivityApi } from '#/api/mall/promotion/combinatio import { computed, ref, watch } from 'vue'; import { CloseCircleFilled, PlusOutlined } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { Image, Tooltip } from 'ant-design-vue'; @@ -60,7 +61,7 @@ watch( if ( activityList.value.length === 0 || activityList.value.some( - (activity) => activity.id === null || !ids.includes(activity.id), + (activity) => isUndefined(activity.id) || !ids.includes(activity.id), ) ) { activityList.value = await getCombinationActivityListByIds(ids); diff --git a/apps/web-antd/src/views/mall/promotion/point/components/showcase.vue b/apps/web-antd/src/views/mall/promotion/point/components/showcase.vue index 9cb2d74a1..6a0b83b4c 100644 --- a/apps/web-antd/src/views/mall/promotion/point/components/showcase.vue +++ b/apps/web-antd/src/views/mall/promotion/point/components/showcase.vue @@ -5,6 +5,7 @@ import type { MallPointActivityApi } from '#/api/mall/promotion/point'; import { computed, ref, watch } from 'vue'; import { IconifyIcon } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { Image, Tooltip } from 'ant-design-vue'; @@ -54,7 +55,9 @@ watch( // 只有活动发生变化时才重新查询 if ( pointActivityList.value.length === 0 || - pointActivityList.value.some((activity) => !ids.includes(activity.id)) + pointActivityList.value.some( + (activity) => isUndefined(activity.id) || !ids.includes(activity.id), + ) ) { pointActivityList.value = await getPointActivityListByIds(ids); } diff --git a/apps/web-antd/src/views/mall/promotion/seckill/components/showcase.vue b/apps/web-antd/src/views/mall/promotion/seckill/components/showcase.vue index 769feaa44..1424d9f8d 100644 --- a/apps/web-antd/src/views/mall/promotion/seckill/components/showcase.vue +++ b/apps/web-antd/src/views/mall/promotion/seckill/components/showcase.vue @@ -5,6 +5,7 @@ import type { MallSeckillActivityApi } from '#/api/mall/promotion/seckill/seckil import { computed, ref, watch } from 'vue'; import { IconifyIcon } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { Image, Tooltip } from 'ant-design-vue'; @@ -59,7 +60,7 @@ watch( if ( activityList.value.length === 0 || activityList.value.some( - (activity) => activity.id === null || !ids.includes(activity.id), + (activity) => isUndefined(activity.id) || !ids.includes(activity.id), ) ) { activityList.value = await getSeckillActivityListByIds(ids as number[]); diff --git a/apps/web-antdv-next/src/views/mall/product/spu/components/spu-showcase.vue b/apps/web-antdv-next/src/views/mall/product/spu/components/spu-showcase.vue index c0a44b5ba..a25f90223 100644 --- a/apps/web-antdv-next/src/views/mall/product/spu/components/spu-showcase.vue +++ b/apps/web-antdv-next/src/views/mall/product/spu/components/spu-showcase.vue @@ -5,6 +5,7 @@ import type { MallSpuApi } from '#/api/mall/product/spu'; import { computed, ref, watch } from 'vue'; import { IconifyIcon } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { Image, Tooltip } from 'antdv-next'; @@ -58,7 +59,9 @@ watch( // 只有商品发生变化时才重新查询 if ( productSpus.value.length === 0 || - productSpus.value.some((spu) => spu.id === null || !ids.includes(spu.id)) + productSpus.value.some( + (spu) => isUndefined(spu.id) || !ids.includes(spu.id), + ) ) { productSpus.value = await getSpuDetailList(ids); } diff --git a/apps/web-antdv-next/src/views/mall/promotion/combination/components/showcase.vue b/apps/web-antdv-next/src/views/mall/promotion/combination/components/showcase.vue index bf9d2a705..eae9ce366 100644 --- a/apps/web-antdv-next/src/views/mall/promotion/combination/components/showcase.vue +++ b/apps/web-antdv-next/src/views/mall/promotion/combination/components/showcase.vue @@ -5,6 +5,7 @@ import type { MallCombinationActivityApi } from '#/api/mall/promotion/combinatio import { computed, ref, watch } from 'vue'; import { CloseCircleFilled, PlusOutlined } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { Image, Tooltip } from 'antdv-next'; @@ -60,7 +61,7 @@ watch( if ( activityList.value.length === 0 || activityList.value.some( - (activity) => activity.id === null || !ids.includes(activity.id), + (activity) => isUndefined(activity.id) || !ids.includes(activity.id), ) ) { activityList.value = await getCombinationActivityListByIds(ids); diff --git a/apps/web-antdv-next/src/views/mall/promotion/point/components/showcase.vue b/apps/web-antdv-next/src/views/mall/promotion/point/components/showcase.vue index 1b34d7289..d8b53998a 100644 --- a/apps/web-antdv-next/src/views/mall/promotion/point/components/showcase.vue +++ b/apps/web-antdv-next/src/views/mall/promotion/point/components/showcase.vue @@ -5,6 +5,7 @@ import type { MallPointActivityApi } from '#/api/mall/promotion/point'; import { computed, ref, watch } from 'vue'; import { IconifyIcon } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { Image, Tooltip } from 'antdv-next'; @@ -54,7 +55,9 @@ watch( // 只有活动发生变化时才重新查询 if ( pointActivityList.value.length === 0 || - pointActivityList.value.some((activity) => !ids.includes(activity.id!)) + pointActivityList.value.some( + (activity) => isUndefined(activity.id) || !ids.includes(activity.id), + ) ) { pointActivityList.value = await getPointActivityListByIds(ids); } diff --git a/apps/web-antdv-next/src/views/mall/promotion/seckill/components/showcase.vue b/apps/web-antdv-next/src/views/mall/promotion/seckill/components/showcase.vue index 147245344..83f704cf5 100644 --- a/apps/web-antdv-next/src/views/mall/promotion/seckill/components/showcase.vue +++ b/apps/web-antdv-next/src/views/mall/promotion/seckill/components/showcase.vue @@ -5,6 +5,7 @@ import type { MallSeckillActivityApi } from '#/api/mall/promotion/seckill/seckil import { computed, ref, watch } from 'vue'; import { IconifyIcon } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { Image, Tooltip } from 'antdv-next'; @@ -54,7 +55,9 @@ watch( // 只有活动发生变化时才重新查询 if ( activityList.value.length === 0 || - activityList.value.some((activity) => !ids.includes(activity.id!)) + activityList.value.some( + (activity) => isUndefined(activity.id) || !ids.includes(activity.id), + ) ) { activityList.value = await getSeckillActivityListByIds(ids as number[]); } diff --git a/apps/web-ele/src/views/mall/product/spu/components/spu-showcase.vue b/apps/web-ele/src/views/mall/product/spu/components/spu-showcase.vue index c794c145c..fcd956756 100644 --- a/apps/web-ele/src/views/mall/product/spu/components/spu-showcase.vue +++ b/apps/web-ele/src/views/mall/product/spu/components/spu-showcase.vue @@ -5,6 +5,7 @@ import type { MallSpuApi } from '#/api/mall/product/spu'; import { computed, ref, watch } from 'vue'; import { IconifyIcon } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { ElImage, ElTooltip } from 'element-plus'; @@ -54,7 +55,9 @@ watch( // 只有商品发生变化时才重新查询 if ( productSpus.value.length === 0 || - productSpus.value.some((spu) => !ids.includes(spu.id!)) + productSpus.value.some( + (spu) => isUndefined(spu.id) || !ids.includes(spu.id), + ) ) { productSpus.value = await getSpuDetailList(ids); } diff --git a/apps/web-ele/src/views/mall/promotion/combination/components/showcase.vue b/apps/web-ele/src/views/mall/promotion/combination/components/showcase.vue index 1b51c4ba8..98a148fb6 100644 --- a/apps/web-ele/src/views/mall/promotion/combination/components/showcase.vue +++ b/apps/web-ele/src/views/mall/promotion/combination/components/showcase.vue @@ -5,6 +5,7 @@ import type { MallCombinationActivityApi } from '#/api/mall/promotion/combinatio import { computed, ref, watch } from 'vue'; import { IconifyIcon } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { ElImage, ElTooltip } from 'element-plus'; @@ -55,7 +56,9 @@ watch( // 只有活动发生变化时才重新查询 if ( activityList.value.length === 0 || - activityList.value.some((activity) => !ids.includes(activity.id!)) + activityList.value.some( + (activity) => isUndefined(activity.id) || !ids.includes(activity.id), + ) ) { activityList.value = await getCombinationActivityListByIds(ids); } diff --git a/apps/web-ele/src/views/mall/promotion/point/components/showcase.vue b/apps/web-ele/src/views/mall/promotion/point/components/showcase.vue index 0af0b51c2..0f2e87279 100644 --- a/apps/web-ele/src/views/mall/promotion/point/components/showcase.vue +++ b/apps/web-ele/src/views/mall/promotion/point/components/showcase.vue @@ -5,6 +5,7 @@ import type { MallPointActivityApi } from '#/api/mall/promotion/point'; import { computed, ref, watch } from 'vue'; import { IconifyIcon } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { ElImage, ElTooltip } from 'element-plus'; @@ -54,7 +55,9 @@ watch( // 只有活动发生变化时才重新查询 if ( pointActivityList.value.length === 0 || - pointActivityList.value.some((activity) => !ids.includes(activity.id!)) + pointActivityList.value.some( + (activity) => isUndefined(activity.id) || !ids.includes(activity.id), + ) ) { pointActivityList.value = await getPointActivityListByIds(ids); } diff --git a/apps/web-ele/src/views/mall/promotion/seckill/components/showcase.vue b/apps/web-ele/src/views/mall/promotion/seckill/components/showcase.vue index 4eecdc671..789cdebd9 100644 --- a/apps/web-ele/src/views/mall/promotion/seckill/components/showcase.vue +++ b/apps/web-ele/src/views/mall/promotion/seckill/components/showcase.vue @@ -5,6 +5,7 @@ import type { MallSeckillActivityApi } from '#/api/mall/promotion/seckill/seckil import { computed, ref, watch } from 'vue'; import { IconifyIcon } from '@vben/icons'; +import { isUndefined } from '@vben/utils'; import { ElImage, ElTooltip } from 'element-plus'; @@ -54,7 +55,9 @@ watch( // 只有活动发生变化时才重新查询 if ( activityList.value.length === 0 || - activityList.value.some((activity) => !ids.includes(activity.id!)) + activityList.value.some( + (activity) => isUndefined(activity.id) || !ids.includes(activity.id), + ) ) { activityList.value = await getSeckillActivityListByIds(ids as number[]); }