From ac39f5d8507a44ef5d92581e57fdc84b054bb00e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=9F=91=E8=9E=82?= Date: Fri, 17 Apr 2026 03:00:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8E=A8=E5=B9=BF?= =?UTF-8?q?=E8=B4=B9=E7=BC=96=E8=BE=91=E5=BC=B9=E7=AA=97=20feeDate=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF=E5=AF=BC=E8=87=B4=20DatePi?= =?UTF-8?q?cker=20=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PromotionFeeFormModal.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/promotion-fee/components/PromotionFeeFormModal.vue b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/promotion-fee/components/PromotionFeeFormModal.vue index 0bbec953..d93d5d39 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/promotion-fee/components/PromotionFeeFormModal.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/views/ecommerce/promotion-fee/components/PromotionFeeFormModal.vue @@ -6,7 +6,9 @@ import type { } from '#/api/ecommerce/promotion-fee/types'; import type { ShopVO } from '#/api/ecommerce/shop/types'; -import { onMounted, ref, watch } from 'vue'; +import { nextTick, onMounted, ref, watch } from 'vue'; + +import dayjs from 'dayjs'; import { useVbenModal } from '@vben/common-ui'; @@ -111,8 +113,10 @@ const feeTypeListLoading = ref(false); // 监听props变化 watch( () => props.open, - (newVal) => { + async (newVal) => { if (newVal) { + // 等渲染周期完成后再 open,避免 Slot 依赖追踪失效 + await nextTick(); modalApi.open(); isEdit.value = !!props.promotionFeeData; if (props.promotionFeeData) { @@ -129,7 +133,9 @@ watch( clickCount: props.promotionFeeData.clickCount, impressionCount: props.promotionFeeData.impressionCount, conversionCount: props.promotionFeeData.conversionCount, - feeDate: props.promotionFeeData.feeDate, + feeDate: props.promotionFeeData.feeDate + ? dayjs(props.promotionFeeData.feeDate) + : undefined, remark: props.promotionFeeData.remark || '', }; } else { @@ -140,7 +146,6 @@ watch( modalApi.close(); } }, - { immediate: true }, ); // 加载店铺列表