fix: lint && typecheck
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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[]);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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[]);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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[]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user