From 19aa06273a30d21a8520b2c0c49e2ce479756a0b Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Mon, 12 Sep 2022 15:44:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A6=81=E6=AD=A2=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=A9=BA=E7=9A=84=E9=A1=B5=E9=9D=A2=E8=B6=85=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useLink.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hooks/useLink.ts b/src/hooks/useLink.ts index d44709d6..e28fd066 100644 --- a/src/hooks/useLink.ts +++ b/src/hooks/useLink.ts @@ -14,6 +14,10 @@ export default () => { message.error('不是正确的网页链接地址') return false } + if (link.type === 'slide' && !link.target) { + message.error('请先选择链接目标') + return false + } const props = { link } slidesStore.updateElement({ id: handleElement.id, props }) addHistorySnapshot()