mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-10 17:42:50 +08:00
更新多个组件以支持新的事件通知机制,添加切换到配置页面的功能,调整文档以反映组件文件名的变化,提升用户交互体验。
This commit is contained in:
@@ -55,6 +55,10 @@
|
||||
<v-icon left>mdi-refresh</v-icon>
|
||||
刷新数据
|
||||
</v-btn>
|
||||
<v-btn color="primary" @click="notifySwitch">
|
||||
<v-icon left>mdi-cog</v-icon>
|
||||
配置
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</div>
|
||||
@@ -73,7 +77,7 @@ const status = ref('running')
|
||||
const lastUpdated = ref('')
|
||||
|
||||
// 自定义事件,用于通知主应用刷新数据
|
||||
const emit = defineEmits(['action'])
|
||||
const emit = defineEmits(['action', 'switch'])
|
||||
|
||||
// 获取状态图标
|
||||
function getItemIcon(type) {
|
||||
@@ -138,6 +142,11 @@ async function refreshData() {
|
||||
}
|
||||
}
|
||||
|
||||
// 通知主应用切换到配置页面
|
||||
function notifySwitch() {
|
||||
emit('switch')
|
||||
}
|
||||
|
||||
// 组件挂载时加载数据
|
||||
onMounted(() => {
|
||||
refreshData()
|
||||
|
||||
Reference in New Issue
Block a user