From 047e99e27ccc5cfd0b40d479d937c160e02917ce Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 9 Jan 2025 16:19:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20SubscribeShareDialog.vue?= =?UTF-8?q?=EF=BC=9A=E6=B7=BB=E5=8A=A0=E5=88=86=E4=BA=AB=E5=A4=84=E7=90=86?= =?UTF-8?q?=E7=8A=B6=E6=80=81=EF=BC=8C=E7=A6=81=E7=94=A8=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E4=BB=A5=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dialog/SubscribeShareDialog.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/dialog/SubscribeShareDialog.vue b/src/components/dialog/SubscribeShareDialog.vue index 78ebf371..ed6a187e 100644 --- a/src/components/dialog/SubscribeShareDialog.vue +++ b/src/components/dialog/SubscribeShareDialog.vue @@ -16,6 +16,9 @@ const props = defineProps({ // 定义触发的自定义事件 const emit = defineEmits(['close']) +// 分享处理状态 +const shareDoing = ref(false) + // 订阅编辑表单 const shareForm = ref({ subscribe_id: props.sub?.id ?? 0, @@ -25,7 +28,9 @@ const shareForm = ref({ async function doShare() { if (!shareForm.value.share_title || !shareForm.value.share_comment || !shareForm.value.share_user) return try { + shareDoing.value = true const result: { [key: string]: any } = await api.post('subscribe/share', shareForm.value) + shareDoing.value = false // 提示 if (result.success) { $toast.success(`${props.sub?.name} 分享成功!`) @@ -85,7 +90,7 @@ const $toast = useToast() - 确认分享 + 确认分享