mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-04 23:30:03 +08:00
在多个视图组件中添加动态按钮功能,支持不同操作的弹窗显示,优化按钮显示逻辑以提升用户交互体验。
This commit is contained in:
@@ -7,6 +7,7 @@ import SubscribeCard from '@/components/cards/SubscribeCard.vue'
|
||||
import SubscribeHistoryDialog from '@/components/dialog/SubscribeHistoryDialog.vue'
|
||||
import { useUserStore } from '@/stores'
|
||||
import { useDisplay } from 'vuetify'
|
||||
import { useDynamicButton } from '@/composables/useDynamicButton'
|
||||
|
||||
// APP
|
||||
const display = useDisplay()
|
||||
@@ -148,6 +149,14 @@ onActivated(async () => {
|
||||
fetchData()
|
||||
}
|
||||
})
|
||||
|
||||
// 使用动态按钮钩子
|
||||
useDynamicButton({
|
||||
icon: 'mdi-history',
|
||||
onClick: () => {
|
||||
historyDialog.value = true
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -175,7 +184,7 @@ onActivated(async () => {
|
||||
<!-- 底部操作按钮 -->
|
||||
<div v-if="isRefreshed">
|
||||
<VFab
|
||||
v-if="userStore.superUser"
|
||||
v-if="userStore.superUser && !appMode"
|
||||
icon="mdi-history"
|
||||
color="info"
|
||||
location="bottom"
|
||||
|
||||
Reference in New Issue
Block a user