From 235e0145427371bb4bcf5468b1959f5672d5a64e Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 12 Jan 2025 16:40:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=20PluginCard=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=9B=BF=E6=8D=A2=20DynamicRender=20?= =?UTF-8?q?=E4=B8=BA=20FormRender=EF=BC=9B=E5=9C=A8=20ForkSubscribeDialog?= =?UTF-8?q?=20=E7=BB=84=E4=BB=B6=E4=B8=AD=E6=B7=BB=E5=8A=A0=E5=A4=84?= =?UTF-8?q?=E7=90=86=E7=8A=B6=E6=80=81=E4=BB=A5=E4=BC=98=E5=8C=96=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BD=93=E9=AA=8C=EF=BC=9B=E5=88=A0=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E4=BD=BF=E7=94=A8=E7=9A=84=20DynamicRender=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/cards/PluginCard.vue | 9 ++------- src/components/dialog/ForkSubscribeDialog.vue | 16 ++++++++++++++-- .../render/{DynamicRender.vue => FormRender.vue} | 0 3 files changed, 16 insertions(+), 9 deletions(-) rename src/components/render/{DynamicRender.vue => FormRender.vue} (100%) diff --git a/src/components/cards/PluginCard.vue b/src/components/cards/PluginCard.vue index c3dafae3..a3d01c2e 100644 --- a/src/components/cards/PluginCard.vue +++ b/src/components/cards/PluginCard.vue @@ -3,7 +3,7 @@ import { useToast } from 'vue-toast-notification' import { useConfirm } from 'vuetify-use-dialog' import api from '@/api' import type { Plugin } from '@/api/types' -import DynamicRender from '@/components/render/DynamicRender.vue' +import FormRender from '@/components/render/FormRender.vue' import PageRender from '@/components/render/PageRender.vue' import VersionHistory from '@/components/misc/VersionHistory.vue' import { isNullOrEmptyObject } from '@core/utils' @@ -490,12 +490,7 @@ watch( - + diff --git a/src/components/dialog/ForkSubscribeDialog.vue b/src/components/dialog/ForkSubscribeDialog.vue index 7f8e1ada..c2c75337 100644 --- a/src/components/dialog/ForkSubscribeDialog.vue +++ b/src/components/dialog/ForkSubscribeDialog.vue @@ -20,6 +20,9 @@ const globalSettings: any = inject('globalSettings') // 提示框 const $toast = useToast() +// 处理中 +const processing = ref(false) + // 计算海报图片地址 const posterUrl = computed(() => { const url = props.media?.poster @@ -45,9 +48,9 @@ async function doFork() { // 开始处理 startNProgress() try { + processing.value = true // 请求API const result: { [key: string]: any } = await api.post('subscribe/fork', props.media) - // 订阅状态 if (result.success) { $toast.success(`${props.media?.share_title} 添加订阅成功!`) @@ -59,6 +62,7 @@ async function doFork() { } catch (error) { console.error(error) } finally { + processing.value = false doneNProgress() } } @@ -113,7 +117,15 @@ async function doFork() {
- 添加到我的订阅 + + 添加到我的订阅 +
diff --git a/src/components/render/DynamicRender.vue b/src/components/render/FormRender.vue similarity index 100% rename from src/components/render/DynamicRender.vue rename to src/components/render/FormRender.vue