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() + } +}