From 05dc2c7eb2ddf6015fa448700b526d475f3f92ec Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 28 Oct 2025 22:56:01 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90mall=E3=80=91diy=20editor?= =?UTF-8?q?=20=E7=9A=84=20hot-zone=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8880%=EF=BC=89=E8=BF=9B=E4=B8=80=E6=AD=A5=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=20Modal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/app-link-input/select-dialog.vue | 8 +++----- .../components/hot-zone-edit-dialog/index.vue | 15 ++++----------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue b/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue index 818f8764b..445060aee 100644 --- a/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue +++ b/apps/web-ele/src/views/mall/promotion/components/app-link-input/select-dialog.vue @@ -48,8 +48,6 @@ const [Modal, modalApi] = useVbenModal({ }, }); -defineExpose({ open }); - /** 打开弹窗 */ async function open(link: string) { activeAppLink.value.path = link; @@ -71,6 +69,8 @@ async function open(link: string) { } } +defineExpose({ open }); + /** 处理 APP 链接选中 */ function handleAppLinkSelected(appLink: AppLink) { if (!isSameLink(appLink.path, activeAppLink.value.path)) { @@ -139,7 +139,7 @@ function scrollToGroupBtn(group: string) { /** 是否为相同的链接(不比较参数,只比较链接) */ function isSameLink(link1: string, link2: string) { - return link2 ? link1.split('?')[0] === link2.split('?')[0] : false; + return link2 ? link1?.split('?')[0] === link2.split('?')[0] : false; } /** 处理详情选择 */ @@ -166,7 +166,6 @@ function handleProductCategorySelected(id: number) { view-class="flex flex-col" class="border-r border-gray-200 pr-2" > - - ([]); const [Modal, modalApi] = useVbenModal({ - onClosed() { + showCancelButton: false, + onConfirm() { const list = zoomOut(formData.value); emit('update:modelValue', list); + modalApi.close(); }, }); @@ -162,11 +164,6 @@ const setHeight = (item: HotZoneItemProperty, height: number) => { } }; -/** 处理对话框确定 */ -const handleSubmit = () => { - modalApi.close(); -}; - const activeHotZone = ref(); const appLinkDialogRef = ref(); @@ -224,15 +221,11 @@ const handleAppLinkChange = (appLink: AppLink) => { > -