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) => { > -