From b1289f61777b16d1457c9842aae60d57f3106aa2 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 23 Aug 2025 21:20:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E8=AE=A2=E9=98=85=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 1 - src/components/cards/SubscribeCard.vue | 26 ++- src/locales/en-US.ts | 17 ++ src/locales/zh-CN.ts | 17 ++ src/locales/zh-TW.ts | 17 ++ src/pages/subscribe.vue | 12 ++ src/views/subscribe/SubscribeListView.vue | 243 +++++++++++++++++++++- 7 files changed, 327 insertions(+), 6 deletions(-) diff --git a/components.d.ts b/components.d.ts index 5dc83003..43ffe278 100644 --- a/components.d.ts +++ b/components.d.ts @@ -19,6 +19,5 @@ declare module 'vue' { RouterView: typeof import('vue-router')['RouterView'] ScrollToTopBtn: typeof import('./src/@core/components/ScrollToTopBtn.vue')['default'] StatIcon: typeof import('./src/@core/components/StatIcon.vue')['default'] - VDialog: typeof import('./src/@core/components/VDialog.vue')['default'] } } diff --git a/src/components/cards/SubscribeCard.vue b/src/components/cards/SubscribeCard.vue index 836901d0..89337343 100644 --- a/src/components/cards/SubscribeCard.vue +++ b/src/components/cards/SubscribeCard.vue @@ -21,6 +21,14 @@ const { t } = useI18n() // 输入参数 const props = defineProps({ media: Object as PropType, + batchMode: { + type: Boolean, + default: false, + }, + selected: { + type: Boolean, + default: false, + }, }) // 从 provide 中获取全局设置 @@ -29,7 +37,7 @@ const globalSettingsStore = useGlobalSettingsStore() const globalSettings = globalSettingsStore.globalSettings // 定义触发的自定义事件 -const emit = defineEmits(['remove', 'save']) +const emit = defineEmits(['remove', 'save', 'select']) // 确认框 const createConfirm = useConfirm() @@ -297,6 +305,17 @@ function onSubscribeEditRemove() { subscribeEditDialog.value = false emit('remove') } + +// 处理卡片点击事件 +function handleCardClick() { + if (props.batchMode) { + // 批量模式下触发选择事件 + emit('select') + } else { + // 非批量模式下打开编辑弹窗 + editSubscribeDialog() + } +}